mirror of
https://github.com/xjasonlyu/tun2socks.git
synced 2025-10-10 03:00:15 +08:00
update tcp.go
This commit is contained in:
@@ -20,6 +20,13 @@ func tcpCloseRead(conn net.Conn) {
|
||||
}
|
||||
}
|
||||
|
||||
func tcpCloseWrite(conn net.Conn) {
|
||||
if c, ok := conn.(duplexConn); ok {
|
||||
log.Warnf("ok!++++")
|
||||
c.CloseWrite()
|
||||
}
|
||||
}
|
||||
|
||||
func tcpKeepAlive(conn net.Conn) {
|
||||
if tcp, ok := conn.(*net.TCPConn); ok {
|
||||
tcp.SetKeepAlive(true)
|
||||
|
Reference in New Issue
Block a user