mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 00:35:38 +08:00
fix: faile to reset sysproxy (#5139)
This commit is contained in:
@@ -201,15 +201,18 @@ impl Sysopt {
|
|||||||
//直接关闭所有代理
|
//直接关闭所有代理
|
||||||
#[cfg(not(target_os = "windows"))]
|
#[cfg(not(target_os = "windows"))]
|
||||||
{
|
{
|
||||||
let mut sysproxy: Sysproxy = Sysproxy::get_system_proxy()?;
|
let mut sysproxy: Sysproxy = match Sysproxy::get_system_proxy() {
|
||||||
|
Ok(sp) => sp,
|
||||||
|
Err(e) => {
|
||||||
|
log::warn!(target: "app", "重置代理时获取系统代理配置失败: {e}, 使用默认配置");
|
||||||
|
Sysproxy::default()
|
||||||
|
}
|
||||||
|
};
|
||||||
let mut autoproxy = match Autoproxy::get_auto_proxy() {
|
let mut autoproxy = match Autoproxy::get_auto_proxy() {
|
||||||
Ok(ap) => ap,
|
Ok(ap) => ap,
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
log::warn!(target: "app", "重置代理时获取自动代理配置失败: {e}, 使用默认配置");
|
log::warn!(target: "app", "重置代理时获取自动代理配置失败: {e}, 使用默认配置");
|
||||||
Autoproxy {
|
Autoproxy::default()
|
||||||
enable: false,
|
|
||||||
url: "".into(),
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
sysproxy.enable = false;
|
sysproxy.enable = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user