mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-05-07 10:14:35 +00:00
disable nat4 hole punch (#1277)
This commit is contained in:
@@ -288,7 +288,6 @@ struct NetworkOptions {
|
||||
long,
|
||||
env = "ET_ENCRYPTION_ALGORITHM",
|
||||
help = t!("core_clap.encryption_algorithm").to_string(),
|
||||
default_value = "aes-gcm",
|
||||
value_parser = get_avaliable_encrypt_methods()
|
||||
)]
|
||||
encryption_algorithm: Option<String>,
|
||||
@@ -425,6 +424,15 @@ struct NetworkOptions {
|
||||
)]
|
||||
disable_udp_hole_punching: Option<bool>,
|
||||
|
||||
#[arg(
|
||||
long,
|
||||
env = "ET_DISABLE_SYM_HOLE_PUNCHING",
|
||||
help = t!("core_clap.disable_sym_hole_punching").to_string(),
|
||||
num_args = 0..=1,
|
||||
default_missing_value = "true"
|
||||
)]
|
||||
disable_sym_hole_punching: Option<bool>,
|
||||
|
||||
#[arg(
|
||||
long,
|
||||
env = "ET_RELAY_ALL_PEER_RPC",
|
||||
@@ -919,6 +927,7 @@ impl NetworkOptions {
|
||||
f.enable_relay_foreign_network_kcp = self
|
||||
.enable_relay_foreign_network_kcp
|
||||
.unwrap_or(f.enable_relay_foreign_network_kcp);
|
||||
f.disable_sym_hole_punching = self.disable_sym_hole_punching.unwrap_or(false);
|
||||
cfg.set_flags(f);
|
||||
|
||||
if !self.exit_nodes.is_empty() {
|
||||
|
||||
Reference in New Issue
Block a user