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

@ -13,6 +13,7 @@ import (
"github.com/go-gost/core/common/bufpool"
mdata "github.com/go-gost/core/metadata"
"github.com/go-gost/relay"
xrelay "github.com/go-gost/x/internal/util/relay"
)
type tcpConn struct {
@ -129,7 +130,7 @@ func readResponse(r io.Reader) (err error) {
}
if resp.Status != relay.StatusOK {
err = fmt.Errorf("status %d", resp.Status)
err = fmt.Errorf("%d %s", resp.Status, xrelay.StatusText(resp.Status))
return
}
return nil
@ -223,16 +224,3 @@ func (c *bindUDPConn) RemoteAddr() net.Addr {
func (c *bindUDPConn) Metadata() mdata.Metadata {
return c.md
}
type bindAddr struct {
network string
addr string
}
func (p *bindAddr) Network() string {
return p.network
}
func (p *bindAddr) String() string {
return p.addr
}