Revert "http/https proxy (#7600)" (#7801)

This reverts commit da57fcb641.
This commit is contained in:
RustDesk
2024-04-23 15:26:16 +08:00
committed by GitHub
parent da57fcb641
commit ac7f8a6447
68 changed files with 133 additions and 1231 deletions

View File

@@ -15,7 +15,6 @@ use hbb_common::{
config::{self, Config, CONNECT_TIMEOUT, READ_TIMEOUT, REG_INTERVAL, RENDEZVOUS_PORT},
futures::future::join_all,
log,
proxy::Proxy,
protobuf::Message as _,
rendezvous_proto::*,
sleep,
@@ -389,14 +388,7 @@ 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 {
if cfg!(debug_assertions) && option_env!("TEST_TCP").is_some() {
Self::start_tcp(server, host).await
} else {
Self::start_udp(server, host).await