From 2b494a75170686ea6246ca36e784e7c8c447940f Mon Sep 17 00:00:00 2001 From: xjasonlyu Date: Tue, 20 Jun 2023 14:40:54 +0800 Subject: [PATCH] Fix: HTTP proxy basic auth error (#266) --- proxy/http.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxy/http.go b/proxy/http.go index 75f1d396..7e7668d7 100644 --- a/proxy/http.go +++ b/proxy/http.go @@ -61,7 +61,7 @@ func (h *HTTP) shakeHand(metadata *M.Metadata, rw io.ReadWriter) error { } if h.user != "" && h.pass != "" { - req.Header.Set("Proxy-Authorization", basicAuth(h.user, h.pass)) + req.Header.Set("Proxy-Authorization", fmt.Sprintf("Basic %s", basicAuth(h.user, h.pass))) } if err := req.Write(rw); err != nil {