Browse Source

update ipstack version

pull/230/head
ssrlive 8 months ago
parent
commit
08db6806c3
  1. 2
      Cargo.toml
  2. 4
      src/lib.rs

2
Cargo.toml

@ -38,7 +38,7 @@ env_logger = "0.11"
hashlink = "0.10"
hickory-proto = "0.25"
httparse = "1"
ipstack = { version = "0.4" }
ipstack = { version = "0.5" }
log = { version = "0.4", features = ["std"] }
mimalloc = { version = "0.1", default-features = false, optional = true }
percent-encoding = "2"

4
src/lib.rs

@ -234,7 +234,9 @@ where
let mut ipstack_config = ipstack::IpStackConfig::default();
ipstack_config.mtu(mtu);
ipstack_config.tcp_timeout(std::time::Duration::from_secs(args.tcp_timeout));
let mut tcp_cfg = ipstack::TcpConfig::default();
tcp_cfg.timeout = std::time::Duration::from_secs(args.tcp_timeout);
ipstack_config.with_tcp_config(tcp_cfg);
ipstack_config.udp_timeout(std::time::Duration::from_secs(args.udp_timeout));
let mut ip_stack = ipstack::IpStack::new(ipstack_config, device);

Loading…
Cancel
Save