Optimize HTTP calls

This commit is contained in:
yuluo
2024-04-18 22:19:30 +08:00
parent 9588c3280f
commit bf57a504b7
5 changed files with 90 additions and 11 deletions

View File

@@ -421,6 +421,14 @@ pub fn set_socks(proxy: String, username: String, password: String) {
.ok();
}
#[inline]
pub fn get_proxy_status() -> bool {
#[cfg(not(any(target_os = "android", target_os = "ios")))]
return ipc::get_proxy_status();
#[cfg(any(target_os = "android", target_os = "ios"))]
return false;
}
#[cfg(any(target_os = "android", target_os = "ios"))]
pub fn set_socks(_: String, _: String, _: String) {}