From 0865c98a7f290bbe4b8cad087f78d2b545587b9d Mon Sep 17 00:00:00 2001 From: cnlh Date: Sat, 29 Feb 2020 00:32:56 +0800 Subject: [PATCH] fixed:client http proxy --- client/control.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/client/control.go b/client/control.go index 63bf7ea..2f02a75 100644 --- a/client/control.go +++ b/client/control.go @@ -254,11 +254,12 @@ func NewConn(tp string, vkey string, server string, connType string, proxyUrl st //http proxy connection func NewHttpProxyConn(url *url.URL, remoteAddr string) (net.Conn, error) { req := &http.Request{ - Method: "CONNECT", - URL: url, - Host: remoteAddr, - Header: http.Header{}, - Proto: "HTTP/1.1", + Method: "CONNECT", + URL: url, + Host: remoteAddr, + Header: http.Header{}, + ProtoMajor: 1, + ProtoMinor: 1, } password, _ := url.User.Password() req.Header.Set("Authorization", "Basic "+basicAuth(strings.Trim(url.User.Username(), " "), password))