mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-05-06 17:59:11 +00:00
Support custom STUN servers configuration (#1212)
* Support custom STUN servers Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -112,7 +112,12 @@ impl GlobalCtx {
|
||||
|
||||
let (event_bus, _) = tokio::sync::broadcast::channel(8);
|
||||
|
||||
let stun_info_collection = Arc::new(StunInfoCollector::new_with_default_servers());
|
||||
let stun_servers = config_fs.get_stun_servers();
|
||||
let stun_info_collection = Arc::new(if stun_servers.is_empty() {
|
||||
StunInfoCollector::new_with_default_servers()
|
||||
} else {
|
||||
StunInfoCollector::new(stun_servers)
|
||||
});
|
||||
|
||||
let enable_exit_node = config_fs.get_flags().enable_exit_node || cfg!(target_env = "ohos");
|
||||
let proxy_forward_by_system = config_fs.get_flags().proxy_forward_by_system;
|
||||
|
||||
Reference in New Issue
Block a user