Skip to content
This repository has been archived by the owner on Feb 13, 2025. It is now read-only.

Commit

Permalink
chore: allow disabled overrideAndroidVPN by environment variable `DIS…
Browse files Browse the repository at this point in the history
…ABLE_OVERRIDE_ANDROID_VPN`
  • Loading branch information
wwqgtxx committed Nov 5, 2024
1 parent e6d1c8c commit 69454b0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion listener/sing_tun/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,11 @@ func New(options LC.Tun, tunnel C.Tunnel, additions ...inbound.Addition) (l *Lis
return
}

defaultInterfaceMonitor, err = tun.NewDefaultInterfaceMonitor(networkUpdateMonitor, log.SingLogger, tun.DefaultInterfaceMonitorOptions{InterfaceFinder: interfaceFinder, OverrideAndroidVPN: true})
overrideAndroidVPN := true
if disable, _ := strconv.ParseBool(os.Getenv("DISABLE_OVERRIDE_ANDROID_VPN")); disable {
overrideAndroidVPN = false
}
defaultInterfaceMonitor, err = tun.NewDefaultInterfaceMonitor(networkUpdateMonitor, log.SingLogger, tun.DefaultInterfaceMonitorOptions{InterfaceFinder: interfaceFinder, OverrideAndroidVPN: overrideAndroidVPN})
if err != nil {
err = E.Cause(err, "create DefaultInterfaceMonitor")
return
Expand Down

0 comments on commit 69454b0

Please sign in to comment.