From df01582996d3c217a459f02a220d795f34b5e933 Mon Sep 17 00:00:00 2001 From: H1JK Date: Sat, 27 Apr 2024 01:05:34 +0800 Subject: [PATCH] fix: HTTP proxy variable shadowing --- listener/http/proxy.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/listener/http/proxy.go b/listener/http/proxy.go index 68e9870844..f69c2b061f 100644 --- a/listener/http/proxy.go +++ b/listener/http/proxy.go @@ -51,7 +51,8 @@ func HandleConn(c net.Conn, tunnel C.Tunnel, cache *lru.LruCache[string, bool], var resp *http.Response if !trusted { - resp, user := authenticate(request, cache) + var user string + resp, user = authenticate(request, cache) additions = append(additions, inbound.WithInUser(user)) trusted = resp == nil }