客户端断线重连bug修复

This commit is contained in:
刘河
2018-12-06 20:45:14 +08:00
parent e6c2de7d9f
commit c35ce71e7c
6 changed files with 45 additions and 21 deletions

View File

@@ -135,9 +135,9 @@ func (s *Sock5ModeServer) doConnect(c net.Conn, command uint8) (proxyConn *Conn,
s.sendReply(c, succeeded)
var ltype string
if command == associateMethod {
ltype = "udp"
ltype = CONN_UDP
} else {
ltype = "tcp"
ltype = CONN_TCP
}
_, err = client.WriteHost(ltype, addr)
return client, nil
@@ -154,6 +154,7 @@ func (s *Sock5ModeServer) handleConnect(c net.Conn) {
}
}
// passive mode
func (s *Sock5ModeServer) handleBind(c net.Conn) {
}