From 3fe0318c757379eefbd0e717f6d279ee4831aa29 Mon Sep 17 00:00:00 2001 From: dou Date: Thu, 21 Nov 2024 01:45:45 +0800 Subject: [PATCH] Fix hysteria2 masquerade bug: Ensure proxy request uses target host --- protocol/hysteria2/inbound.go | 1 - 1 file changed, 1 deletion(-) diff --git a/protocol/hysteria2/inbound.go b/protocol/hysteria2/inbound.go index a3260e55..abaaae87 100644 --- a/protocol/hysteria2/inbound.go +++ b/protocol/hysteria2/inbound.go @@ -72,7 +72,6 @@ func NewInbound(ctx context.Context, router adapter.Router, logger log.ContextLo masqueradeHandler = &httputil.ReverseProxy{ Rewrite: func(r *httputil.ProxyRequest) { r.SetURL(masqueradeURL) - r.Out.Host = r.In.Host }, ErrorHandler: func(w http.ResponseWriter, r *http.Request, err error) { w.WriteHeader(http.StatusBadGateway)