mirror of
https://github.com/YGGverse/aquatic-crawler.git
synced 2026-03-31 17:15:35 +00:00
add enable_upnp_port_forwarding, enable_upload, socks_proxy_url arguments
This commit is contained in:
parent
1da27bfffe
commit
8bb525ec5e
4 changed files with 27 additions and 3 deletions
|
|
@ -14,7 +14,7 @@ repository = "https://github.com/YGGverse/aquatic-crawler"
|
|||
anyhow = "1.0.98"
|
||||
clap = { version = "4.5", features = ["derive"] }
|
||||
hyper-util = "0.1.14"
|
||||
librqbit = "8.1.0"
|
||||
librqbit = {version = "8.1.0", features = ["disable-upload"]}
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
tokio = { version = "1.45", features = ["full"] }
|
||||
|
|
|
|||
11
README.md
11
README.md
|
|
@ -67,7 +67,16 @@ Options:
|
|||
--disable-dht
|
||||
Disable DHT resolver (useful with `torrent_tracker`)
|
||||
|
||||
-s, --sleep <SLEEP>
|
||||
--enable-upnp-port-forwarding
|
||||
Enable UPnP
|
||||
|
||||
--enable-upload
|
||||
Enable upload
|
||||
|
||||
--socks-proxy-url <SOCKS_PROXY_URL>
|
||||
Use `socks5://[username:password@]host:port`
|
||||
|
||||
-s <SLEEP>
|
||||
Crawl loop delay in seconds
|
||||
|
||||
[default: 300]
|
||||
|
|
|
|||
|
|
@ -32,7 +32,19 @@ pub struct Argument {
|
|||
#[arg(long, default_value_t = false)]
|
||||
pub disable_dht: bool,
|
||||
|
||||
/// Enable UPnP
|
||||
#[arg(long, default_value_t = false)]
|
||||
pub enable_upnp_port_forwarding: bool,
|
||||
|
||||
/// Enable upload
|
||||
#[arg(long, default_value_t = false)]
|
||||
pub enable_upload: bool,
|
||||
|
||||
/// Use `socks5://[username:password@]host:port`
|
||||
#[arg(long)]
|
||||
pub socks_proxy_url: Option<String>,
|
||||
|
||||
/// Crawl loop delay in seconds
|
||||
#[arg(short, long, default_value_t = 300)]
|
||||
#[arg(short, default_value_t = 300)]
|
||||
pub sleep: u64,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,6 +45,9 @@ async fn main() -> anyhow::Result<()> {
|
|||
std::path::PathBuf::new(),
|
||||
SessionOptions {
|
||||
disable_dht: argument.disable_dht,
|
||||
disable_upload: !argument.enable_upload,
|
||||
enable_upnp_port_forwarding: argument.enable_upnp_port_forwarding,
|
||||
socks_proxy_url: argument.socks_proxy_url.clone(),
|
||||
trackers: trackers.clone(),
|
||||
..SessionOptions::default()
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue