diff --git a/src/components/setting/setting-system.tsx b/src/components/setting/setting-system.tsx index d276af5d..f892bc8e 100644 --- a/src/components/setting/setting-system.tsx +++ b/src/components/setting/setting-system.tsx @@ -210,12 +210,29 @@ const SettingSystem = ({ onError }: Props) => { } > onChangeData({ enable_system_proxy: e })} + onChange={(e) => { + if (autoproxy?.enable === false && sysproxy?.enable === false) { + onChangeData({ enable_system_proxy: !enable_system_proxy }); + } else { + onChangeData({ enable_system_proxy: e }); + } + }} onGuard={async (e) => { + if (autoproxy?.enable === false && sysproxy?.enable === false) { + await patchVerge({ enable_system_proxy: !enable_system_proxy }); + await updateProxyStatus(); + return; + } if (!e && verge?.auto_close_connection) { closeAllConnections(); } @@ -223,7 +240,14 @@ const SettingSystem = ({ onError }: Props) => { await updateProxyStatus(); }} > - +