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

Commit 69454b0

Browse files
committed
chore: allow disabled overrideAndroidVPN by environment variable DISABLE_OVERRIDE_ANDROID_VPN
1 parent e6d1c8c commit 69454b0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

listener/sing_tun/server.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,11 @@ func New(options LC.Tun, tunnel C.Tunnel, additions ...inbound.Addition) (l *Lis
279279
return
280280
}
281281

282-
defaultInterfaceMonitor, err = tun.NewDefaultInterfaceMonitor(networkUpdateMonitor, log.SingLogger, tun.DefaultInterfaceMonitorOptions{InterfaceFinder: interfaceFinder, OverrideAndroidVPN: true})
282+
overrideAndroidVPN := true
283+
if disable, _ := strconv.ParseBool(os.Getenv("DISABLE_OVERRIDE_ANDROID_VPN")); disable {
284+
overrideAndroidVPN = false
285+
}
286+
defaultInterfaceMonitor, err = tun.NewDefaultInterfaceMonitor(networkUpdateMonitor, log.SingLogger, tun.DefaultInterfaceMonitorOptions{InterfaceFinder: interfaceFinder, OverrideAndroidVPN: overrideAndroidVPN})
283287
if err != nil {
284288
err = E.Cause(err, "create DefaultInterfaceMonitor")
285289
return

0 commit comments

Comments
 (0)