Commit f013f1fe authored by Adam Langley's avatar Adam Langley

go.net/proxy: fix SOCSK5 user/pass auth.

The code was using the SOCKS version number (5) where it should have been using the username/password protocol version number (1).

With this change, username/password authentication actually works.

R=golang-dev
CC=golang-dev
https://golang.org/cl/10134044
parent 8108b4b3
......@@ -118,7 +118,7 @@ func (s *socks5) Dial(network, addr string) (net.Conn, error) {
if buf[1] == socks5AuthPassword {
buf = buf[:0]
buf = append(buf, socks5Version)
buf = append(buf, 1 /* password protocol version */)
buf = append(buf, uint8(len(s.user)))
buf = append(buf, s.user...)
buf = append(buf, uint8(len(s.password)))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment