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:
parent
86bbdf7a5d
commit
9475743b4e
61 changed files with 413 additions and 64 deletions
|
|
@ -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");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue