test nat type for outgoing-only client (#11962)

* test nat type for outgoing-only client

Signed-off-by: 21pages <sunboeasy@gmail.com>

* test nat type for ios

Signed-off-by: 21pages <sunboeasy@gmail.com>

---------

Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
21pages 2025-06-03 09:27:02 +08:00 committed by GitHub
parent 32e96e3705
commit e0f35b9046
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View File

@ -64,6 +64,7 @@ fn initialize(app_dir: &str, custom_client_config: &str) {
{
use hbb_common::env_logger::*;
init_from_env(Env::default().filter_or(DEFAULT_FILTER_ENV, "debug"));
crate::common::test_nat_type();
}
#[cfg(not(any(target_os = "android", target_os = "ios")))]
{

View File

@ -57,6 +57,7 @@ impl RendezvousMediator {
}
pub async fn start_all() {
crate::test_nat_type();
if config::is_outgoing_only() {
loop {
sleep(1.).await;
@ -69,7 +70,6 @@ impl RendezvousMediator {
}
check_zombie();
let server = new_server();
crate::test_nat_type();
if config::option2bool("stop-service", &Config::get_option("stop-service")) {
crate::test_rendezvous_server();
}