diff --git a/src/config/defaults.rs b/src/config/defaults.rs index 2dee3e0..f4180c9 100644 --- a/src/config/defaults.rs +++ b/src/config/defaults.rs @@ -37,7 +37,7 @@ pub(crate) fn default_replay_window_secs() -> u64 { } pub(crate) fn default_handshake_timeout() -> u64 { - 15 + 30 } pub(crate) fn default_connect_timeout() -> u64 { @@ -52,11 +52,11 @@ pub(crate) fn default_ack_timeout() -> u64 { 300 } pub(crate) fn default_me_one_retry() -> u8 { - 3 + 12 } pub(crate) fn default_me_one_timeout() -> u64 { - 1500 + 1200 } pub(crate) fn default_listen_addr() -> String { @@ -83,7 +83,7 @@ pub(crate) fn default_unknown_dc_log_path() -> Option { } pub(crate) fn default_pool_size() -> usize { - 2 + 16 } pub(crate) fn default_keepalive_interval() -> u64 { @@ -207,4 +207,4 @@ where } } Ok(out) -} +} \ No newline at end of file diff --git a/src/config/types.rs b/src/config/types.rs index 6c54598..1983433 100644 --- a/src/config/types.rs +++ b/src/config/types.rs @@ -118,7 +118,7 @@ impl Default for NetworkConfig { fn default() -> Self { Self { ipv4: true, - ipv6: None, + ipv6: Some(false), prefer: 4, multipath: false, stun_servers: default_stun_servers(), @@ -140,7 +140,7 @@ pub struct GeneralConfig { #[serde(default = "default_true")] pub fast_mode: bool, - #[serde(default)] + #[serde(default = "default_true")] pub use_middle_proxy: bool, #[serde(default)] @@ -157,7 +157,7 @@ pub struct GeneralConfig { pub middle_proxy_nat_ip: Option, /// Enable STUN-based NAT probing to discover public IP:port for ME KDF. - #[serde(default)] + #[serde(default = "default_true")] pub middle_proxy_nat_probe: bool, /// Optional STUN server address (host:port) for NAT probing. @@ -283,15 +283,15 @@ impl Default for GeneralConfig { modes: ProxyModes::default(), prefer_ipv6: false, fast_mode: true, - use_middle_proxy: false, + use_middle_proxy: true, ad_tag: None, proxy_secret_path: None, middle_proxy_nat_ip: None, - middle_proxy_nat_probe: false, + middle_proxy_nat_probe: true, middle_proxy_nat_stun: None, middle_proxy_nat_stun_servers: Vec::new(), middle_proxy_pool_size: default_pool_size(), - middle_proxy_warm_standby: 0, + middle_proxy_warm_standby: 8, me_keepalive_enabled: true, me_keepalive_interval_secs: default_keepalive_interval(), me_keepalive_jitter_secs: default_keepalive_jitter(), @@ -302,7 +302,7 @@ impl Default for GeneralConfig { me_reconnect_max_concurrent_per_dc: 1, me_reconnect_backoff_base_ms: default_reconnect_backoff_base_ms(), me_reconnect_backoff_cap_ms: default_reconnect_backoff_cap_ms(), - me_reconnect_fast_retry_count: 1, + me_reconnect_fast_retry_count: 11, stun_iface_mismatch_ignore: false, unknown_dc_log_path: default_unknown_dc_log_path(), log_level: LogLevel::Normal, @@ -455,7 +455,7 @@ pub struct AntiCensorshipConfig { pub fake_cert_len: usize, /// Enable TLS certificate emulation using cached real certificates. - #[serde(default)] + #[serde(default = "default_true")] pub tls_emulation: bool, /// Directory to store TLS front cache (on disk). @@ -489,7 +489,7 @@ impl Default for AntiCensorshipConfig { mask_port: default_mask_port(), mask_unix_sock: None, fake_cert_len: default_fake_cert_len(), - tls_emulation: false, + tls_emulation: true, tls_front_dir: default_tls_front_dir(), server_hello_delay_min_ms: default_server_hello_delay_min_ms(), server_hello_delay_max_ms: default_server_hello_delay_max_ms(), @@ -615,9 +615,9 @@ pub struct ListenerConfig { /// - omitted — show no links (default) #[derive(Debug, Clone)] pub enum ShowLink { - /// Don't show any links (default when omitted). + /// Don't show any links. None, - /// Show links for all configured users. + /// Show links for all configured users (default). All, /// Show links for specific users. Specific(Vec), @@ -625,7 +625,7 @@ pub enum ShowLink { impl Default for ShowLink { fn default() -> Self { - ShowLink::None + ShowLink::All } }