diff --git a/go.mod b/go.mod index 57c10000..537fad79 100644 --- a/go.mod +++ b/go.mod @@ -31,7 +31,7 @@ require ( github.com/metacubex/sing-shadowsocks2 v0.2.6 github.com/metacubex/sing-shadowtls v0.0.0-20250503063515-5d9f966d17a2 github.com/metacubex/sing-tun v0.4.7 - github.com/metacubex/sing-vmess v0.2.4-0.20250821024956-97839f31a65d + github.com/metacubex/sing-vmess v0.2.4-0.20250821183743-4b06a3ad35dd github.com/metacubex/sing-wireguard v0.0.0-20250503063753-2dc62acc626f github.com/metacubex/smux v0.0.0-20250503055512-501391591dee github.com/metacubex/tfo-go v0.0.0-20250516165257-e29c16ae41d4 diff --git a/go.sum b/go.sum index d8bfd9a5..cf8f203c 100644 --- a/go.sum +++ b/go.sum @@ -131,8 +131,8 @@ github.com/metacubex/sing-shadowtls v0.0.0-20250503063515-5d9f966d17a2 h1:gXU+MY github.com/metacubex/sing-shadowtls v0.0.0-20250503063515-5d9f966d17a2/go.mod h1:mbfboaXauKJNIHJYxQRa+NJs4JU9NZfkA+I33dS2+9E= github.com/metacubex/sing-tun v0.4.7 h1:ZDY/W+1c7PeWWKeKRyUo18fySF/TWjB0i5ui81Ar778= github.com/metacubex/sing-tun v0.4.7/go.mod h1:xHecZRwBnKWe6zG9amAK9cXf91lF6blgjBqm+VvOrmU= -github.com/metacubex/sing-vmess v0.2.4-0.20250821024956-97839f31a65d h1:jchYEho5+kTmok4aTMflqJyTRnqVPTOVeC1RFXxuw9A= -github.com/metacubex/sing-vmess v0.2.4-0.20250821024956-97839f31a65d/go.mod h1:21R5R1u90uUvBQF0owoooEu96/SAYYD56nDrwm6nFaM= +github.com/metacubex/sing-vmess v0.2.4-0.20250821183743-4b06a3ad35dd h1:QUtRAq//R1+23oBPfNiX3U9OzIfDLa6jdfj0CSAuTQk= +github.com/metacubex/sing-vmess v0.2.4-0.20250821183743-4b06a3ad35dd/go.mod h1:21R5R1u90uUvBQF0owoooEu96/SAYYD56nDrwm6nFaM= github.com/metacubex/sing-wireguard v0.0.0-20250503063753-2dc62acc626f h1:Sr/DYKYofKHKc4GF3qkRGNuj6XA6c0eqPgEDN+VAsYU= github.com/metacubex/sing-wireguard v0.0.0-20250503063753-2dc62acc626f/go.mod h1:jpAkVLPnCpGSfNyVmj6Cq4YbuZsFepm/Dc+9BAOcR80= github.com/metacubex/smux v0.0.0-20250503055512-501391591dee h1:lp6hJ+4wCLZu113awp7P6odM2okB5s60HUyF0FMqKmo= diff --git a/listener/inbound/common_test.go b/listener/inbound/common_test.go index 75b98e0b..79e382fa 100644 --- a/listener/inbound/common_test.go +++ b/listener/inbound/common_test.go @@ -1,6 +1,7 @@ package inbound_test import ( + "bytes" "context" "crypto/rand" "crypto/tls" @@ -142,6 +143,7 @@ func NewHttpTestTunnel() *TestTunnel { render.PlainText(w, r, err.Error()) return } + io.Copy(io.Discard, r.Body) render.Data(w, r, httpData[:size]) }) h2Server := &http2.Server{} @@ -149,7 +151,7 @@ func NewHttpTestTunnel() *TestTunnel { _ = http2.ConfigureServer(&server, h2Server) go server.Serve(ln) testFn := func(t *testing.T, proxy C.ProxyAdapter, proto string, size int) { - req, err := http.NewRequest(http.MethodGet, fmt.Sprintf("%s://%s%s?size=%d", proto, remoteAddr, httpPath, size), nil) + req, err := http.NewRequest(http.MethodGet, fmt.Sprintf("%s://%s%s?size=%d", proto, remoteAddr, httpPath, size), bytes.NewReader(httpData[:size])) if !assert.NoError(t, err) { return }