remove tcp keep-alive and update socks5 udp

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

No files matched your search

+2 -2
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{})
}