修正代码

This commit is contained in:
e1732a364fed
2000-01-01 00:00:00 +00:00
parent 4512122149
commit be6933607b

View File

@@ -187,6 +187,7 @@ func (s *Server) StartListen(tcpRequestChan chan<- netLayer.TCPRequestInfo, udpR
s.stopped = false
if s.devName == "" {
utils.Warn("tun: dev name not given, OS: " + runtime.GOOS)
switch runtime.GOOS {
case "darwin":
s.devName = "utun5"
@@ -195,6 +196,11 @@ func (s *Server) StartListen(tcpRequestChan chan<- netLayer.TCPRequestInfo, udpR
case "liunx":
s.devName = "vs_tun"
}
if s.devName != "" {
utils.Warn("tun: set tun dev name to " + s.devName)
}
}
//由于我们目前完全使用 xjasonlyu/tun2socks 的 代码需要注意xjasonlyu/tun2socks 在