mirror of
https://github.com/ehang-io/nps.git
synced 2025-09-02 03:16:53 +00:00
remove tcp keep-alive and update socks5 udp
This commit is contained in:
@@ -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{})
|
||||
}
|
||||
|
Reference in New Issue
Block a user