remove nodelay option for tunnel

This commit is contained in:
ginuerzh
2023-11-16 20:36:17 +08:00
parent 9584bdbf4c
commit f5a20fd0fc
5 changed files with 35 additions and 96 deletions

View File

@ -6,8 +6,32 @@ import (
"github.com/go-gost/core/common/bufpool"
"github.com/go-gost/gosocks5"
"github.com/go-gost/relay"
)
func StatusText(code uint8) string {
switch code {
case relay.StatusBadRequest:
return "Bad Request"
case relay.StatusForbidden:
return "Forbidden"
case relay.StatusHostUnreachable:
return "Host Unreachable"
case relay.StatusInternalServerError:
return "Internal Server Error"
case relay.StatusNetworkUnreachable:
return "Network Unreachable"
case relay.StatusServiceUnavailable:
return "Service Unavailable"
case relay.StatusTimeout:
return "Timeout"
case relay.StatusUnauthorized:
return "Unauthorized"
default:
return ""
}
}
type udpTunConn struct {
net.Conn
taddr net.Addr