mirror of
https://github.com/SagerNet/sing-box.git
synced 2025-06-13 21:54:13 +08:00
Fix hysteria2 masquerade bug: Ensure proxy request uses target host
This commit is contained in:
parent
ba61de441b
commit
4d1c52eeb1
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user