mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-11-04 14:22:11 +08:00
fix(tun): make the TUN switch reflect what the Core actually runs
The switch read enable_tun_mode while the Core was given enable_tun_mode && !session_suppression, so falling back to Sidecar left it showing a TUN that was not running, with nothing to write the flag back. Drop the session flag: the stored preference is the only truth, re-checked at startup and written off when the conditions for it are not met, and the switch renders it against current capability.
This commit is contained in:
@@ -196,12 +196,12 @@ const ProxyControlSwitches = ({
|
||||
{isTunMode && (
|
||||
<SwitchRow
|
||||
label={t('settings.sections.proxyControl.fields.tunMode')}
|
||||
active={enable_tun_mode || false}
|
||||
active={(enable_tun_mode && isTunModeAvailable) || false}
|
||||
infoTitle={t('settings.sections.proxyControl.tooltips.tunMode')}
|
||||
onInfoClick={() => tunRef.current?.open()}
|
||||
onToggle={handleTunToggle}
|
||||
onError={onError}
|
||||
highlight={enable_tun_mode || false}
|
||||
highlight={(enable_tun_mode && isTunModeAvailable) || false}
|
||||
extraIcons={
|
||||
<>
|
||||
{!isTunModeAvailable && (
|
||||
|
||||
Reference in New Issue
Block a user