mirror of
https://github.com/YGGverse/btracker-gemini.git
synced 2026-04-01 09:35:32 +00:00
rename argument mod to config; implement name, tracker config options
This commit is contained in:
parent
bdc5496d45
commit
e8b409c4d6
2 changed files with 39 additions and 14 deletions
|
|
@ -1,33 +0,0 @@
|
|||
use clap::Parser;
|
||||
use std::{
|
||||
net::{Ipv4Addr, SocketAddr, SocketAddrV4},
|
||||
path::PathBuf,
|
||||
};
|
||||
|
||||
#[derive(Parser, Debug)]
|
||||
#[command(version, about, long_about = None)]
|
||||
pub struct Argument {
|
||||
/// Bind server `host:port` to listen incoming connections on it
|
||||
#[arg(short, long, default_value_t = SocketAddr::V4(SocketAddrV4::new(Ipv4Addr::LOCALHOST, 1965)))]
|
||||
pub bind: SocketAddr,
|
||||
|
||||
/// Filepath to server identity in PKCS (PFX) format
|
||||
#[arg(short, long)]
|
||||
pub identity: PathBuf,
|
||||
|
||||
/// Passphrase to unlock encrypted identity
|
||||
#[arg(short, long, default_value_t = String::new())]
|
||||
pub password: String,
|
||||
|
||||
/// btracker-fs directory
|
||||
#[arg(short, long)]
|
||||
pub storage: PathBuf,
|
||||
|
||||
/// Listing items limit
|
||||
#[arg(short, long, default_value_t = 10)]
|
||||
pub limit: usize,
|
||||
|
||||
/// Default index capacity
|
||||
#[arg(short, long, default_value_t = 1000)]
|
||||
pub capacity: usize,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue