add transport for tunnel entrypoint

This commit is contained in:
ginuerzh
2024-10-15 18:47:36 +08:00
parent 5bba004324
commit 51ca9f620a
8 changed files with 357 additions and 355 deletions
+1 -1
View File
@@ -365,7 +365,7 @@ func (h *Sniffer) httpRoundTrip(ctx context.Context, rw, cc io.ReadWriter, req *
ro.HTTP.Response.ContentLength = respBody.Length()
}
if req.Header.Get("Upgrade") == "websocket" {
if resp.StatusCode == http.StatusSwitchingProtocols {
xnet.Transport(rw, cc)
}