fix(tunnel): skip virtual interfaces to prevent false netchange watchdog

- Add VIRTUAL_IFACE_REGEX to filter utun/awdl/bridge from network fingerprint
- Trust cloudflared/tailscale while process is alive, never kill on force restart

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
decolua
2026-06-06 15:43:41 +07:00
parent c785051360
commit 293cf40455
3 changed files with 10 additions and 21 deletions

View File

@@ -44,4 +44,5 @@ export {
NETWORK_SETTLE_MS,
WATCHDOG_INTERVAL_MS,
NETWORK_CHECK_INTERVAL_MS,
VIRTUAL_IFACE_REGEX,
} from "./shared/watchdogConfig.js";

View File

@@ -3,3 +3,6 @@ export const RESTART_COOLDOWN_MS = 120000;
export const NETWORK_SETTLE_MS = 2500;
export const WATCHDOG_INTERVAL_MS = 60000;
export const NETWORK_CHECK_INTERVAL_MS = 5000;
// Skip virtual/transient interfaces (tailscale utun, AirDrop awdl, bridges) that flap and cause false netchange
export const VIRTUAL_IFACE_REGEX = /^(utun|awdl|llw|anpi|bridge|gif|stf|ipsec|ap|tun|tap|vmnet|veth|docker)/i;