From 3b73599b7b1cdc711376256d503cb29eb2a66cd0 Mon Sep 17 00:00:00 2001 From: nadoo <287492+nadoo@users.noreply.github.com> Date: Sun, 17 Dec 2017 11:24:25 +0800 Subject: [PATCH] http: add header ending in http proxy client mode --- http.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/http.go b/http.go index cdfc031..7d4fff4 100644 --- a/http.go +++ b/http.go @@ -197,6 +197,8 @@ func (s *HTTP) Dial(network, addr string) (net.Conn, error) { rc.Write([]byte("Proxy-Authorization: Basic " + base64.StdEncoding.EncodeToString([]byte(auth)) + "\r\n")) } + rc.Write([]byte("\r\n")) + var b [1024]byte n, err := rc.Read(b[:]) if bytes.Contains(b[:n], []byte("200")) {