mirror of
https://github.com/SagerNet/sing-box.git
synced 2024-11-25 01:51:29 +00:00
Fix hysteria2 masquerade bug: Ensure proxy request uses target host
This commit is contained in:
parent
013a69c002
commit
3fe0318c75
|
@ -72,7 +72,6 @@ func NewInbound(ctx context.Context, router adapter.Router, logger log.ContextLo
|
||||||
masqueradeHandler = &httputil.ReverseProxy{
|
masqueradeHandler = &httputil.ReverseProxy{
|
||||||
Rewrite: func(r *httputil.ProxyRequest) {
|
Rewrite: func(r *httputil.ProxyRequest) {
|
||||||
r.SetURL(masqueradeURL)
|
r.SetURL(masqueradeURL)
|
||||||
r.Out.Host = r.In.Host
|
|
||||||
},
|
},
|
||||||
ErrorHandler: func(w http.ResponseWriter, r *http.Request, err error) {
|
ErrorHandler: func(w http.ResponseWriter, r *http.Request, err error) {
|
||||||
w.WriteHeader(http.StatusBadGateway)
|
w.WriteHeader(http.StatusBadGateway)
|
||||||
|
|
Loading…
Reference in a new issue