remove tcp keep-alive and update socks5 udp

This commit is contained in:
unknown
2019-12-02 14:27:50 +08:00
parent 91c1ffc6ce
commit 2e5b1bd1e3
4 changed files with 57 additions and 16 deletions

View File

@@ -124,8 +124,8 @@ func (s *Conn) SetAlive(tp string) {
case *net.TCPConn:
conn := s.Conn.(*net.TCPConn)
conn.SetReadDeadline(time.Time{})
conn.SetKeepAlive(true)
conn.SetKeepAlivePeriod(time.Duration(2 * time.Second))
//conn.SetKeepAlive(false)
//conn.SetKeepAlivePeriod(time.Duration(2 * time.Second))
case *mux.PortConn:
s.Conn.(*mux.PortConn).SetReadDeadline(time.Time{})
}