diff --git a/veilid-core/src/intf/native/network/network_class_discovery.rs b/veilid-core/src/intf/native/network/network_class_discovery.rs index ab4853a7..5be2ac37 100644 --- a/veilid-core/src/intf/native/network/network_class_discovery.rs +++ b/veilid-core/src/intf/native/network/network_class_discovery.rs @@ -56,11 +56,25 @@ impl DiscoveryContext { // Pick the best network class we have seen so far pub fn set_detected_network_class(&self, network_class: NetworkClass) { let mut inner = self.inner.lock(); + log_net!( debug + "=== set_detected_network_class {:?} {:?}: {:?} ===", + inner.protocol_type, + inner.address_type, + network_class + ); + inner.detected_network_class = Some(network_class); } pub fn set_detected_public_dial_info(&self, dial_info: DialInfo, class: DialInfoClass) { let mut inner = self.inner.lock(); + log_net!( debug + "=== set_detected_public_dial_info {:?} {:?}: {} {:?} ===", + inner.protocol_type, + inner.address_type, + dial_info, + class + ); inner.detected_public_dial_info = Some(DetectedPublicDialInfo { dial_info, class }); } @@ -353,6 +367,11 @@ impl Network { // Loop for restricted NAT retries loop { + log_net!(debug + "=== update_ipv4_protocol_dialinfo {:?} tries_left={} ===", + protocol_type, + retry_count + ); // Get our external address from some fast node, call it node 1 if !context.protocol_get_external_address_1().await { // If we couldn't get an external address, then we should just try the whole network class detection again later @@ -402,6 +421,8 @@ impl Network { // Start doing ipv6 protocol context.protocol_begin(protocol_type, AddressType::IPV6); + log_net!(debug "=== update_ipv6_protocol_dialinfo {:?} ===", protocol_type); + // Get our external address from some fast node, call it node 1 if !context.protocol_get_external_address_1().await { // If we couldn't get an external address, then we should just try the whole network class detection again later diff --git a/veilid-core/src/network_manager.rs b/veilid-core/src/network_manager.rs index 55b28449..627b744a 100644 --- a/veilid-core/src/network_manager.rs +++ b/veilid-core/src/network_manager.rs @@ -291,6 +291,7 @@ impl NetworkManager { { let mut inner = self.inner.lock(); inner.components = None; + inner.relay_node = None; } // send update diff --git a/veilid-server/src/settings.rs b/veilid-server/src/settings.rs index 69e36739..b6acdcab 100644 --- a/veilid-server/src/settings.rs +++ b/veilid-server/src/settings.rs @@ -91,11 +91,11 @@ core: set_value_fanout: 5 min_peer_count: 1 # 20 min_peer_refresh_time_ms: 2000 - validate_dial_info_receipt_time_ms: 5000 + validate_dial_info_receipt_time_ms: 1000 upnp: false natpmp: false enable_local_peer_scope: false - restricted_nat_retries: 3 + restricted_nat_retries: 5 tls: certificate_path: '%CERTIFICATE_DIRECTORY%/server.crt' private_key_path: '%PRIVATE_KEY_DIRECTORY%/server.key'