From 4d1c52eeb19c2d52fbc014d501b8c6cc57e8290c 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 8d00072c..8081a06e 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)