mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-03-18 02:31:00 +03:00
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:
@@ -891,7 +891,10 @@ pub fn main_set_option(key: String, value: String) {
|
||||
);
|
||||
}
|
||||
|
||||
if key.eq("custom-rendezvous-server") {
|
||||
if key.eq("custom-rendezvous-server")
|
||||
|| key.eq(config::keys::OPTION_ALLOW_WEBSOCKET)
|
||||
|| key.eq("api-server")
|
||||
{
|
||||
set_option(key, value.clone());
|
||||
#[cfg(target_os = "android")]
|
||||
crate::rendezvous_mediator::RendezvousMediator::restart();
|
||||
@@ -2533,7 +2536,10 @@ pub fn main_set_common(_key: String, _value: String) {
|
||||
);
|
||||
} else if _key == "update-me" {
|
||||
if let Some(new_version_file) = get_download_file_from_url(&_value) {
|
||||
log::debug!("New version file is downloaed, update begin, {:?}", new_version_file.to_str());
|
||||
log::debug!(
|
||||
"New version file is downloaed, update begin, {:?}",
|
||||
new_version_file.to_str()
|
||||
);
|
||||
if let Some(f) = new_version_file.to_str() {
|
||||
// 1.4.0 does not support "--update"
|
||||
// But we can assume that the new version supports it.
|
||||
|
||||
Reference in New Issue
Block a user