use tcp only for socks5

This commit is contained in:
rustdesk 2025-05-02 03:41:55 +08:00
parent 7196dbed6e
commit 04e2792f5f
2 changed files with 2 additions and 8 deletions

@ -1 +1 @@
Subproject commit 4eca5b45b95b2f3d71789dc001595149c015fe72
Subproject commit 3afaf6494475ef58dcaaae6b4e6d2303cc3d632b

View file

@ -383,14 +383,8 @@ impl RendezvousMediator {
pub async fn start(server: ServerPtr, host: String) -> ResultType<()> {
log::info!("start rendezvous mediator of {}", host);
//If the investment agent type is http or https, then tcp forwarding is enabled.
let is_http_proxy = if let Some(conf) = Config::get_socks() {
let proxy = Proxy::from_conf(&conf, None)?;
proxy.is_http_or_https()
} else {
false
};
if (cfg!(debug_assertions) && option_env!("TEST_TCP").is_some())
|| is_http_proxy
|| Config::is_proxy()
|| get_builtin_option(config::keys::OPTION_DISABLE_UDP) == "Y"
{
Self::start_tcp(server, host).await