Remove some arc, and add some custom client

This commit is contained in:
rustdesk
2024-03-10 12:48:00 +08:00
parent 866ec097c0
commit 7060257051
6 changed files with 174 additions and 59 deletions

View File

@@ -3,8 +3,9 @@ use hbb_common::password_security;
use hbb_common::{
allow_err,
bytes::Bytes,
config::{self, Config, LocalConfig, PeerConfig},
config::{CONNECT_TIMEOUT, RENDEZVOUS_PORT},
config::{
self, Config, LocalConfig, PeerConfig, CONNECT_TIMEOUT, HARD_SETTINGS, RENDEZVOUS_PORT,
},
directories_next,
futures::future::join_all,
log,
@@ -171,6 +172,16 @@ pub fn get_local_option(key: String) -> String {
LocalConfig::get_option(&key)
}
#[inline]
pub fn get_hard_option(key: String) -> String {
config::HARD_SETTINGS
.read()
.unwrap()
.get(&key)
.cloned()
.unwrap_or_default()
}
#[inline]
pub fn set_local_option(key: String, value: String) {
LocalConfig::set_option(key, value);