commit da058cb18091569af14dbfa1dfde7a2897589216 Author: Yawning Angel yawning@schwanenlied.me Date: Fri Feb 1 09:47:09 2019 +0000
fixup! Bug 24793: Send the correct authorization HTTP header for basic auth. --- ChangeLog | 1 + obfs4proxy/proxy_http.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog index fe8f58d..a0c5991 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ Changes in version 0.0.9 - UNRELEASED: - Various meek_lite code cleanups and bug fixes. - Bug 29077: uTLS for ClientHello camouflage (meek_lite). + - More fixes to HTTP Basic auth.
Changes in version 0.0.8 - 2019-01-20: - Bug 24793: Send the correct authorization HTTP header for basic auth. diff --git a/obfs4proxy/proxy_http.go b/obfs4proxy/proxy_http.go index 35ec737..181e79d 100644 --- a/obfs4proxy/proxy_http.go +++ b/obfs4proxy/proxy_http.go @@ -93,7 +93,7 @@ func (s *httpProxy) Dial(network, addr string) (net.Conn, error) { if s.haveAuth { // SetBasicAuth doesn't quite do what is appropriate, because // the correct header is `Proxy-Authorization`. - req.Header.Set("Proxy-Authorization", base64.StdEncoding.EncodeToString([]byte(s.username+":"+s.password))) + req.Header.Set("Proxy-Authorization", "Basic " + base64.StdEncoding.EncodeToString([]byte(s.username+":"+s.password))) } req.Header.Set("User-Agent", "")