Skip to content

Commit

Permalink
fix: UpdateMonitor should start when AutoDetectInterface enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
wwqgtxx committed Sep 11, 2024
1 parent 417d709 commit 910f236
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions listener/sing_tun/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ func New(options LC.Tun, tunnel C.Tunnel, additions ...inbound.Addition) (l *Lis
if options.GSOMaxSize == 0 {
options.GSOMaxSize = 65536
}
if !supportRedirect || !options.AutoRoute {
if !supportRedirect {
options.AutoRedirect = false
}
tunName := options.Device
Expand Down Expand Up @@ -266,7 +266,7 @@ func New(options LC.Tun, tunnel C.Tunnel, additions ...inbound.Addition) (l *Lis

var networkUpdateMonitor tun.NetworkUpdateMonitor
var defaultInterfaceMonitor tun.DefaultInterfaceMonitor
if options.AutoRoute { // don't start NetworkUpdateMonitor because netlink banned by google on Android14+
if options.AutoRoute || options.AutoDetectInterface { // don't start NetworkUpdateMonitor because netlink banned by google on Android14+
networkUpdateMonitor, err = tun.NewNetworkUpdateMonitor(log.SingLogger)
if err != nil {
err = E.Cause(err, "create NetworkUpdateMonitor")
Expand Down

0 comments on commit 910f236

Please sign in to comment.