diff --git a/Cargo.lock b/Cargo.lock index 5bd8498e7..8f27df130 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3623,7 +3623,7 @@ dependencies = [ [[package]] name = "kcp-sys" version = "0.1.0" -source = "git+https://github.com/rustdesk-org/kcp-sys#00e8865454615a5c554d899efd8bc6eae812aaf1" +source = "git+https://github.com/rustdesk-org/kcp-sys#1e5e30ab8b8c2f7787ab0f88822de36476531562" dependencies = [ "anyhow", "auto_impl", diff --git a/src/common.rs b/src/common.rs index 8ca291b2b..f2f9d763e 100644 --- a/src/common.rs +++ b/src/common.rs @@ -971,7 +971,10 @@ pub fn get_api_server(api: String, custom: String) -> String { if res.ends_with('/') { res.pop(); } - if res.starts_with("https") && res.ends_with(":21114") { + if res.starts_with("https") + && res.ends_with(":21114") + && get_builtin_option(config::keys::OPTION_ALLOW_HTTPS_21114) != "Y" + { return res.replace(":21114", ""); } res