mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-02-17 14:07:28 +08:00
refact: show proxy settings on ios (#13423)
Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
@@ -685,7 +685,7 @@ class _SettingsState extends State<SettingsPage> with WidgetsBindingObserver {
|
||||
setState(callback);
|
||||
});
|
||||
}),
|
||||
if (!isIOS && !_hideNetwork && !_hideProxy)
|
||||
if (!_hideNetwork && !_hideProxy)
|
||||
SettingsTile(
|
||||
title: Text(translate('Socks5/Http(s) Proxy')),
|
||||
leading: Icon(Icons.network_ping),
|
||||
|
||||
@@ -452,10 +452,8 @@ pub fn install_options() -> String {
|
||||
pub fn get_socks() -> Vec<String> {
|
||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||
let s = ipc::get_socks();
|
||||
#[cfg(target_os = "android")]
|
||||
#[cfg(any(target_os = "android", target_os = "ios"))]
|
||||
let s = Config::get_socks();
|
||||
#[cfg(target_os = "ios")]
|
||||
let s: Option<config::Socks5Server> = None;
|
||||
match s {
|
||||
None => Vec::new(),
|
||||
Some(s) => {
|
||||
@@ -477,7 +475,7 @@ pub fn set_socks(proxy: String, username: String, password: String) {
|
||||
};
|
||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||
ipc::set_socks(socks).ok();
|
||||
#[cfg(target_os = "android")]
|
||||
#[cfg(any(target_os = "android", target_os = "ios"))]
|
||||
{
|
||||
let _nat = crate::CheckTestNatType::new();
|
||||
if socks.proxy.is_empty() {
|
||||
@@ -485,9 +483,12 @@ pub fn set_socks(proxy: String, username: String, password: String) {
|
||||
} else {
|
||||
Config::set_socks(Some(socks));
|
||||
}
|
||||
crate::RendezvousMediator::restart();
|
||||
log::info!("socks updated");
|
||||
}
|
||||
#[cfg(target_os = "android")]
|
||||
{
|
||||
crate::RendezvousMediator::restart();
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
||||
Reference in New Issue
Block a user