diff --git a/hub/executor/executor.go b/hub/executor/executor.go index f4cda47a..6d542f60 100644 --- a/hub/executor/executor.go +++ b/hub/executor/executor.go @@ -129,7 +129,7 @@ func GetGeneral() *config.General { RedirPort: ports.RedirPort, TProxyPort: ports.TProxyPort, MixedPort: ports.MixedPort, - Tun: listener.GetTunConf(), + Tun: listener.LastTunConf, TuicServer: listener.GetTuicConf(), ShadowSocksConfig: ports.ShadowSocksConfig, VmessConfig: ports.VmessConfig, diff --git a/listener/listener.go b/listener/listener.go index 8f0088db..7b513fa7 100644 --- a/listener/listener.go +++ b/listener/listener.go @@ -516,6 +516,7 @@ func ReCreateTun(tunConf LC.Tun, tcpIn chan<- C.ConnContext, udpIn chan<- C.Pack defer func() { if err != nil { log.Errorln("Start TUN listening error: %s", err.Error()) + tunConf.Enable = false Cleanup(false) } }()