[skip ci]

# Conflicts:
#	.github/workflows/linter.yml
#	.github/workflows/release.yml
#	config/config.go
#	go.mod
#	go.sum
#	hub/executor/executor.go
This commit is contained in:
MetaCubeX
2022-03-23 00:46:37 +08:00
14 changed files with 165 additions and 107 deletions

View File

@ -310,7 +310,7 @@ func ReCreateMixed(port int, tcpIn chan<- C.ConnContext, udpIn chan<- *inbound.P
log.Infoln("Mixed(http+socks) proxy listening at: %s", mixedListener.Address())
}
func ReCreateTun(tunConf *config.Tun, tcpIn chan<- C.ConnContext, udpIn chan<- *inbound.PacketAdapter) {
func ReCreateTun(tunConf *config.Tun, dnsCfg *config.DNS, tcpIn chan<- C.ConnContext, udpIn chan<- *inbound.PacketAdapter) {
tunMux.Lock()
defer tunMux.Unlock()
@ -330,7 +330,7 @@ func ReCreateTun(tunConf *config.Tun, tcpIn chan<- C.ConnContext, udpIn chan<- *
if !tunConf.Enable {
return
}
tunStackListener, err = tun.New(tunConf, tcpIn, udpIn)
tunStackListener, err = tun.New(tunConf, dnsCfg, tcpIn, udpIn)
if err != nil {
log.Warnln("Failed to start TUN interface: %s", err.Error())
}