http: Proxy-Authorization header

This commit is contained in:
nadoo 2017-12-17 01:01:11 +08:00
parent 632f45448b
commit 1889de7f7f

View File

@ -194,7 +194,7 @@ func (s *HTTP) Dial(network, addr string) (net.Conn, error) {
if s.user != "" && s.password != "" { if s.user != "" && s.password != "" {
auth := s.user + ":" + s.password auth := s.user + ":" + s.password
rc.Write([]byte("Authorization: Basic " + base64.StdEncoding.EncodeToString([]byte(auth)) + "\r\n")) rc.Write([]byte("Proxy-Authorization: Basic " + base64.StdEncoding.EncodeToString([]byte(auth)) + "\r\n"))
} }
var b [1024]byte var b [1024]byte