整理代码

This commit is contained in:
e1732a364fed
2000-01-01 00:00:00 +00:00
parent 02de09813c
commit 684d78d445
2 changed files with 8 additions and 0 deletions

View File

@@ -6,7 +6,14 @@ tun 工作在第三层 IP层上。
我们使用 github.com/eycorsican/go-tun2socks 包
# Problem 问题
这个包在windows上会使用tap。
目前测试在windows上效果非常不好响应很慢似乎和udp或者dns有一定关联.
它总在访问组播地址 239.255.255.250
eycorsican/go-tun2socks 包问题不小不仅有平台间不一致的问题而且tun关闭后无法再重新开启
*/
package tun

View File

@@ -163,6 +163,7 @@ func (s *Server) Stop() {
}
func (s *Server) StartListen(tcpRequestChan chan<- netLayer.TCPRequestInfo, udpRequestChan chan<- netLayer.UDPRequestInfo) io.Closer {
s.stopped = false
//log.Println(s.devName, s.selfip, s.realIP, s.mask)
realname, tunDev, err := tun.CreateTun(s.devName, s.selfip, s.realIP, s.mask, s.tun_dnsList)
if err != nil {