diff --git a/listener/sing_tun/server.go b/listener/sing_tun/server.go index 384ff016b5..8fe534df53 100644 --- a/listener/sing_tun/server.go +++ b/listener/sing_tun/server.go @@ -261,15 +261,17 @@ func New(options LC.Tun, tunnel C.Tunnel, additions ...inbound.Addition) (l *Lis } } l.tunIf = tunIf - l.tunStack, err = tun.NewStack(strings.ToLower(options.Stack.String()), stackOptions) + + tunStack, err := tun.NewStack(strings.ToLower(options.Stack.String()), stackOptions) if err != nil { return } - err = l.tunStack.Start() + err = tunStack.Start() if err != nil { return } + l.tunStack = tunStack //l.openAndroidHotspot(tunOptions)