diff --git a/go.mod b/go.mod index c56765b0..6ab410c7 100644 --- a/go.mod +++ b/go.mod @@ -25,7 +25,7 @@ require ( github.com/sagernet/gomobile v0.0.0-20221130124640-349ebaa752ca github.com/sagernet/quic-go v0.0.0-20230202071646-a8c8afb18b32 github.com/sagernet/reality v0.0.0-20230406110435-ee17307e7691 - github.com/sagernet/sing v0.2.3-0.20230410085425-20b4148381c7 + github.com/sagernet/sing v0.2.3-0.20230411023500-28b06822071a github.com/sagernet/sing-dns v0.1.5-0.20230408004833-5adaf486d440 github.com/sagernet/sing-shadowsocks v0.2.1-0.20230409094647-5c830455eb9b github.com/sagernet/sing-shadowtls v0.1.1-0.20230409094821-9abef019436f diff --git a/go.sum b/go.sum index 461deb51..ab22dc8c 100644 --- a/go.sum +++ b/go.sum @@ -111,8 +111,8 @@ github.com/sagernet/reality v0.0.0-20230406110435-ee17307e7691 h1:5Th31OC6yj8byL github.com/sagernet/reality v0.0.0-20230406110435-ee17307e7691/go.mod h1:B8lp4WkQ1PwNnrVMM6KyuFR20pU8jYBD+A4EhJovEXU= github.com/sagernet/sing v0.0.0-20220817130738-ce854cda8522/go.mod h1:QVsS5L/ZA2Q5UhQwLrn0Trw+msNd/NPGEhBKR/ioWiY= github.com/sagernet/sing v0.1.8/go.mod h1:jt1w2u7lJQFFSGLiRrRIs5YWmx4kAPfWuOejuDW9qMk= -github.com/sagernet/sing v0.2.3-0.20230410085425-20b4148381c7 h1:ODs3QOkbKwkXwK0SrWxqbvuEdhr5sAAiUwtZHH+c+6w= -github.com/sagernet/sing v0.2.3-0.20230410085425-20b4148381c7/go.mod h1:Ta8nHnDLAwqySzKhGoKk4ZIB+vJ3GTKj7UPrWYvM+4w= +github.com/sagernet/sing v0.2.3-0.20230411023500-28b06822071a h1:Wt9rCd4Efev8SesIyG3FiUeN75oONlezWVSKRRkXR2E= +github.com/sagernet/sing v0.2.3-0.20230411023500-28b06822071a/go.mod h1:Ta8nHnDLAwqySzKhGoKk4ZIB+vJ3GTKj7UPrWYvM+4w= github.com/sagernet/sing-dns v0.1.5-0.20230408004833-5adaf486d440 h1:VH8/BcOVuApHtS+vKP+khxlGRcXH7KKhgkTDtNynqSQ= github.com/sagernet/sing-dns v0.1.5-0.20230408004833-5adaf486d440/go.mod h1:69PNSHyEmXdjf6C+bXBOdr2GQnPeEyWjIzo/MV8gmz8= github.com/sagernet/sing-shadowsocks v0.2.1-0.20230409094647-5c830455eb9b h1:nmP+V4nlc8lqEMpwjjbny8ISkrFIjvKWIETsjs7nSic= diff --git a/transport/v2raywebsocket/conn.go b/transport/v2raywebsocket/conn.go index e050e2f2..e7571c84 100644 --- a/transport/v2raywebsocket/conn.go +++ b/transport/v2raywebsocket/conn.go @@ -69,6 +69,14 @@ func (c *WebsocketConn) SetDeadline(t time.Time) error { return os.ErrInvalid } +func (c *WebsocketConn) SetReadDeadline(t time.Time) error { + return os.ErrInvalid +} + +func (c *WebsocketConn) SetWriteDeadline(t time.Time) error { + return os.ErrInvalid +} + func (c *WebsocketConn) Upstream() any { return c.Conn.NetConn() } @@ -195,24 +203,15 @@ func (c *EarlyWebsocketConn) RemoteAddr() net.Addr { } func (c *EarlyWebsocketConn) SetDeadline(t time.Time) error { - if c.conn == nil { - return os.ErrInvalid - } - return c.conn.SetDeadline(t) + return os.ErrInvalid } func (c *EarlyWebsocketConn) SetReadDeadline(t time.Time) error { - if c.conn == nil { - return os.ErrInvalid - } - return c.conn.SetReadDeadline(t) + return os.ErrInvalid } func (c *EarlyWebsocketConn) SetWriteDeadline(t time.Time) error { - if c.conn == nil { - return os.ErrInvalid - } - return c.conn.SetWriteDeadline(t) + return os.ErrInvalid } func (c *EarlyWebsocketConn) Upstream() any {