mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
@@ -1098,6 +1098,10 @@ pub fn version_to_number(v: String) -> i64 {
|
||||
hbb_common::get_version_number(&v)
|
||||
}
|
||||
|
||||
pub fn option_synced() -> bool {
|
||||
crate::ui_interface::option_synced()
|
||||
}
|
||||
|
||||
pub fn main_is_installed() -> SyncReturn<bool> {
|
||||
SyncReturn(is_installed())
|
||||
}
|
||||
|
||||
@@ -394,5 +394,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Use one-time password", ""),
|
||||
("One-time password length", ""),
|
||||
("Request access to your device", ""),
|
||||
("Hide connection management window", ""),
|
||||
("hide_cm_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
||||
@@ -395,5 +395,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Use one-time password", "使用一次性密码"),
|
||||
("One-time password length", "一次性密码长度"),
|
||||
("Request access to your device", "请求访问你的设备"),
|
||||
("Hide connection management window", "隐藏连接管理窗口"),
|
||||
("hide_cm_tip", "在只允许密码连接并且只用固定密码的情况下才允许隐藏"),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
||||
@@ -395,5 +395,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Use one-time password", ""),
|
||||
("One-time password length", ""),
|
||||
("Request access to your device", ""),
|
||||
("Hide connection management window", ""),
|
||||
("hide_cm_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
||||
@@ -395,5 +395,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Use one-time password", ""),
|
||||
("One-time password length", ""),
|
||||
("Request access to your device", ""),
|
||||
("Hide connection management window", ""),
|
||||
("hide_cm_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
||||
@@ -395,5 +395,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Use one-time password", "Einmalpasswort verwenden"),
|
||||
("One-time password length", "Länge des Einmalpassworts"),
|
||||
("Request access to your device", "Zugriff zu Ihrem Gerät erbitten"),
|
||||
("Hide connection management window", ""),
|
||||
("hide_cm_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
||||
@@ -33,7 +33,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("elevated_foreground_window_tip", "The current window of the remote desktop requires higher privilege to operate, so it's unable to use the mouse and keyboard temporarily. You can request the remote user to minimize the current window, or click elevation button on the connection management window. To avoid this problem, it is recommended to install the software on the remote device."),
|
||||
("JumpLink", "View"),
|
||||
("Stop service", "Stop Service"),
|
||||
("or", ""),
|
||||
("Continue with", ""),
|
||||
("hide_cm_tip", "Allow hiding only if accepting sessions via password and using pernament password"),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
||||
@@ -395,5 +395,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Use one-time password", ""),
|
||||
("One-time password length", ""),
|
||||
("Request access to your device", ""),
|
||||
("Hide connection management window", ""),
|
||||
("hide_cm_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
||||
@@ -395,5 +395,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Use one-time password", "Usar contraseña de un solo uso"),
|
||||
("One-time password length", "Longitud de la contraseña de un solo uso"),
|
||||
("Request access to your device", "Solicitud de acceso a su dispositivo"),
|
||||
("Hide connection management window", ""),
|
||||
("hide_cm_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
||||
@@ -394,5 +394,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Use one-time password", "استفاده از رمز عبور یکبار مصرف"),
|
||||
("One-time password length", "طول رمز عبور یکبار مصرف"),
|
||||
("Request access to your device", ""),
|
||||
("Hide connection management window", ""),
|
||||
("hide_cm_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
||||
@@ -395,5 +395,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Use one-time password", ""),
|
||||
("One-time password length", ""),
|
||||
("Request access to your device", ""),
|
||||
("Hide connection management window", ""),
|
||||
("hide_cm_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
||||
@@ -395,5 +395,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Use one-time password", ""),
|
||||
("One-time password length", ""),
|
||||
("Request access to your device", ""),
|
||||
("Hide connection management window", ""),
|
||||
("hide_cm_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
||||
@@ -395,5 +395,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Use one-time password", ""),
|
||||
("One-time password length", ""),
|
||||
("Request access to your device", ""),
|
||||
("Hide connection management window", ""),
|
||||
("hide_cm_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
||||
@@ -395,5 +395,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Use one-time password", "Usa password monouso"),
|
||||
("One-time password length", "Lunghezza password monouso"),
|
||||
("Request access to your device", "Richiedi l'accesso al tuo dispositivo"),
|
||||
("Hide connection management window", ""),
|
||||
("hide_cm_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
||||
@@ -395,5 +395,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Use one-time password", ""),
|
||||
("One-time password length", ""),
|
||||
("Request access to your device", ""),
|
||||
("Hide connection management window", ""),
|
||||
("hide_cm_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
||||
@@ -395,5 +395,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Use one-time password", ""),
|
||||
("One-time password length", ""),
|
||||
("Request access to your device", ""),
|
||||
("Hide connection management window", ""),
|
||||
("hide_cm_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
||||
@@ -395,5 +395,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Use one-time password", ""),
|
||||
("One-time password length", ""),
|
||||
("Request access to your device", ""),
|
||||
("Hide connection management window", ""),
|
||||
("hide_cm_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
||||
@@ -395,5 +395,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Use one-time password", "Użyj hasła jednorazowego"),
|
||||
("One-time password length", "Długość hasła jednorazowego"),
|
||||
("Request access to your device", "Żądanie dostępu do Twojego urządzenia"),
|
||||
("Hide connection management window", ""),
|
||||
("hide_cm_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
||||
@@ -395,5 +395,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Use one-time password", ""),
|
||||
("One-time password length", ""),
|
||||
("Request access to your device", ""),
|
||||
("Hide connection management window", ""),
|
||||
("hide_cm_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
||||
@@ -395,5 +395,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Use one-time password", "Usar senha de uso único"),
|
||||
("One-time password length", "Comprimento da senha de uso único"),
|
||||
("Request access to your device", "Solicitar acesso ao seu dispositivo"),
|
||||
("Hide connection management window", ""),
|
||||
("hide_cm_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
||||
@@ -395,5 +395,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Use one-time password", ""),
|
||||
("One-time password length", ""),
|
||||
("Request access to your device", ""),
|
||||
("Hide connection management window", ""),
|
||||
("hide_cm_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
||||
@@ -395,5 +395,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Use one-time password", ""),
|
||||
("One-time password length", ""),
|
||||
("Request access to your device", ""),
|
||||
("Hide connection management window", ""),
|
||||
("hide_cm_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
||||
@@ -395,5 +395,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Use one-time password", ""),
|
||||
("One-time password length", ""),
|
||||
("Request access to your device", ""),
|
||||
("Hide connection management window", ""),
|
||||
("hide_cm_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
||||
@@ -395,5 +395,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Use one-time password", ""),
|
||||
("One-time password length", ""),
|
||||
("Request access to your device", ""),
|
||||
("Hide connection management window", ""),
|
||||
("hide_cm_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
||||
@@ -395,5 +395,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Use one-time password", "使用一次性密碼"),
|
||||
("One-time password length", "一次性密碼長度"),
|
||||
("Request access to your device", "請求訪問你的設備"),
|
||||
("Hide connection management window", "隱藏連接管理窗口"),
|
||||
("hide_cm_tip", "在只允許密碼連接並且只用固定密碼的情況下才允許隱藏"),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
||||
@@ -395,5 +395,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Use one-time password", ""),
|
||||
("One-time password length", ""),
|
||||
("Request access to your device", ""),
|
||||
("Hide connection management window", ""),
|
||||
("hide_cm_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
||||
@@ -395,5 +395,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Use one-time password", ""),
|
||||
("One-time password length", ""),
|
||||
("Request access to your device", ""),
|
||||
("Hide connection management window", ""),
|
||||
("hide_cm_tip", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
||||
@@ -1571,17 +1571,18 @@ async fn start_ipc(
|
||||
if let Ok(s) = crate::ipc::connect(1000, "_cm").await {
|
||||
stream = Some(s);
|
||||
} else {
|
||||
let extra_args = if password::hide_cm() { "--hide" } else { "" };
|
||||
let run_done;
|
||||
if crate::platform::is_root() {
|
||||
let mut res = Ok(None);
|
||||
for _ in 0..10 {
|
||||
#[cfg(not(target_os = "linux"))]
|
||||
{
|
||||
res = crate::platform::run_as_user("--cm");
|
||||
res = crate::platform::run_as_user(&format!("--cm {}", extra_args));
|
||||
}
|
||||
#[cfg(target_os = "linux")]
|
||||
{
|
||||
res = crate::platform::run_as_user("--cm", None);
|
||||
res = crate::platform::run_as_user(&format!("--cm {}", extra_args), None);
|
||||
}
|
||||
if res.is_ok() {
|
||||
break;
|
||||
@@ -1596,10 +1597,14 @@ async fn start_ipc(
|
||||
run_done = false;
|
||||
}
|
||||
if !run_done {
|
||||
let mut args = vec!["--cm"];
|
||||
if !extra_args.is_empty() {
|
||||
args.push(&extra_args);
|
||||
}
|
||||
super::CHILD_PROCESS
|
||||
.lock()
|
||||
.unwrap()
|
||||
.push(crate::run_me(vec!["--cm"])?);
|
||||
.push(crate::run_me(args)?);
|
||||
}
|
||||
for _ in 0..10 {
|
||||
sleep(0.3).await;
|
||||
|
||||
@@ -192,7 +192,7 @@ fn create_capturer(
|
||||
privacy_mode_id: i32,
|
||||
display: Display,
|
||||
use_yuv: bool,
|
||||
current: usize,
|
||||
_current: usize,
|
||||
_portable_service_running: bool,
|
||||
) -> ResultType<Box<dyn TraitCapturer>> {
|
||||
#[cfg(not(windows))]
|
||||
@@ -256,7 +256,7 @@ fn create_capturer(
|
||||
log::debug!("Create capturer dxgi|gdi");
|
||||
#[cfg(windows)]
|
||||
return crate::portable_service::client::create_capturer(
|
||||
current,
|
||||
_current,
|
||||
display,
|
||||
use_yuv,
|
||||
_portable_service_running,
|
||||
|
||||
@@ -784,11 +784,11 @@ pub fn can_elevate() -> bool {
|
||||
return false;
|
||||
}
|
||||
|
||||
pub fn elevate_portable(id: i32) {
|
||||
pub fn elevate_portable(_id: i32) {
|
||||
#[cfg(windows)]
|
||||
{
|
||||
let lock = CLIENTS.read().unwrap();
|
||||
if let Some(s) = lock.get(&id) {
|
||||
if let Some(s) = lock.get(&_id) {
|
||||
allow_err!(s.tx.send(ipc::Data::DataPortableService(
|
||||
ipc::DataPortableService::RequestStart
|
||||
)));
|
||||
|
||||
@@ -39,6 +39,7 @@ lazy_static::lazy_static! {
|
||||
static ref OPTIONS : Arc<Mutex<HashMap<String, String>>> = Arc::new(Mutex::new(Config::get_options()));
|
||||
static ref ASYNC_JOB_STATUS : Arc<Mutex<String>> = Default::default();
|
||||
static ref TEMPORARY_PASSWD : Arc<Mutex<String>> = Arc::new(Mutex::new("".to_owned()));
|
||||
pub static ref OPTION_SYNCED : Arc<Mutex<bool>> = Default::default();
|
||||
}
|
||||
|
||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||
@@ -924,7 +925,8 @@ async fn check_connect_status_(reconnect: bool, rx: mpsc::UnboundedReceiver<ipc:
|
||||
UI_STATUS.lock().unwrap().2 = v;
|
||||
}
|
||||
Ok(Some(ipc::Data::Options(Some(v)))) => {
|
||||
*OPTIONS.lock().unwrap() = v
|
||||
*OPTIONS.lock().unwrap() = v;
|
||||
*OPTION_SYNCED.lock().unwrap() = true;
|
||||
}
|
||||
Ok(Some(ipc::Data::Config((name, Some(value))))) => {
|
||||
if name == "id" {
|
||||
@@ -967,6 +969,11 @@ async fn check_connect_status_(reconnect: bool, rx: mpsc::UnboundedReceiver<ipc:
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn option_synced() -> bool {
|
||||
OPTION_SYNCED.lock().unwrap().clone()
|
||||
}
|
||||
|
||||
#[cfg(any(target_os = "android", target_os = "ios", feature = "flutter"))]
|
||||
#[tokio::main(flavor = "current_thread")]
|
||||
pub(crate) async fn send_to_cm(data: &ipc::Data) {
|
||||
|
||||
@@ -200,6 +200,7 @@ impl<T: InvokeUiSession> Session<T> {
|
||||
h265 = h265 && encoding_265;
|
||||
return (h264, h265);
|
||||
}
|
||||
#[allow(dead_code)]
|
||||
(false, false)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user