allow use websocket (#11677)
1. Enable the RustDesk client to use WebSocket for either controlling or being controlled. 2. Fix TCP sending `register_pk` frequently Note: 1. Because hbb_common directly uses `use_ws` to read config directly, rustdesk also directly reads config Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
@@ -429,7 +429,10 @@ pub fn set_option(key: String, value: String) {
|
||||
ipc::set_options(options.clone()).ok();
|
||||
}
|
||||
#[cfg(any(target_os = "android", target_os = "ios"))]
|
||||
Config::set_option(key, value);
|
||||
{
|
||||
let _nat = crate::CheckTestNatType::new();
|
||||
Config::set_option(key, value);
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
@@ -479,12 +482,12 @@ pub fn set_socks(proxy: String, username: String, password: String) {
|
||||
ipc::set_socks(socks).ok();
|
||||
#[cfg(target_os = "android")]
|
||||
{
|
||||
let _nat = crate::CheckTestNatType::new();
|
||||
if socks.proxy.is_empty() {
|
||||
Config::set_socks(None);
|
||||
} else {
|
||||
Config::set_socks(Some(socks));
|
||||
}
|
||||
crate::common::test_nat_type();
|
||||
crate::RendezvousMediator::restart();
|
||||
log::info!("socks updated");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user