mirror of https://github.com/ehang-io/nps
fixed:client http proxy
parent
aec1a25557
commit
0865c98a7f
|
@ -258,7 +258,8 @@ func NewHttpProxyConn(url *url.URL, remoteAddr string) (net.Conn, error) {
|
||||||
URL: url,
|
URL: url,
|
||||||
Host: remoteAddr,
|
Host: remoteAddr,
|
||||||
Header: http.Header{},
|
Header: http.Header{},
|
||||||
Proto: "HTTP/1.1",
|
ProtoMajor: 1,
|
||||||
|
ProtoMinor: 1,
|
||||||
}
|
}
|
||||||
password, _ := url.User.Password()
|
password, _ := url.User.Password()
|
||||||
req.Header.Set("Authorization", "Basic "+basicAuth(strings.Trim(url.User.Username(), " "), password))
|
req.Header.Set("Authorization", "Basic "+basicAuth(strings.Trim(url.User.Username(), " "), password))
|
||||||
|
|
Loading…
Reference in New Issue