feat: use actual OS proxy status

This commit is contained in:
wonfen 2026-03-17 02:53:21 +08:00
parent 7ae3b7b0de
commit 2043b24e4b
No known key found for this signature in database
GPG Key ID: CEAFD6C73AB2001F

View File

@ -114,7 +114,7 @@ const ProxyControlSwitches = ({
const { verge, mutateVerge, patchVerge } = useVerge()
const { installServiceAndRestartCore } = useServiceInstaller()
const { uninstallServiceAndRestartCore } = useServiceUninstaller()
const { configState: systemProxyConfigState, toggleSystemProxy } =
const { indicator: systemProxyIndicator, toggleSystemProxy } =
useSystemProxyState()
const { isServiceOk, isTunModeAvailable, mutateSystemState } =
useSystemState()
@ -169,12 +169,12 @@ const ProxyControlSwitches = ({
{isSystemProxyMode && (
<SwitchRow
label={t('settings.sections.proxyControl.fields.systemProxy')}
active={systemProxyConfigState}
active={systemProxyIndicator}
infoTitle={t('settings.sections.proxyControl.tooltips.systemProxy')}
onInfoClick={() => sysproxyRef.current?.open()}
onToggle={(value) => toggleSystemProxy(value)}
onError={onError}
highlight={systemProxyConfigState}
highlight={systemProxyIndicator}
/>
)}