mirror of
https://github.com/YGGverse/aquatic-crawler.git
synced 2026-03-31 09:05:33 +00:00
update listener init
This commit is contained in:
parent
3014db81e7
commit
fc27f46cdf
1 changed files with 10 additions and 8 deletions
18
src/main.rs
18
src/main.rs
|
|
@ -51,17 +51,19 @@ async fn main() -> Result<()> {
|
|||
None => PathBuf::new(),
|
||||
},
|
||||
SessionOptions {
|
||||
listen: Some(match config.listen {
|
||||
Some(l) => ListenerOptions {
|
||||
listen: match config.listen {
|
||||
Some(l) => Some(ListenerOptions {
|
||||
listen_addr: std::net::SocketAddr::from_str(&l)?,
|
||||
enable_upnp_port_forwarding: config.listen_upnp,
|
||||
..ListenerOptions::default()
|
||||
},
|
||||
None => ListenerOptions {
|
||||
enable_upnp_port_forwarding: config.listen_upnp,
|
||||
..ListenerOptions::default()
|
||||
},
|
||||
}),
|
||||
}),
|
||||
None => {
|
||||
if config.listen_upnp {
|
||||
panic!("`--listen` argument is required!")
|
||||
}
|
||||
None
|
||||
}
|
||||
},
|
||||
connect: Some(ConnectionOptions {
|
||||
enable_tcp: config.enable_tcp,
|
||||
proxy_url: config.proxy_url,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue