Commit 6440e890 authored by Mikio Hara's avatar Mikio Hara

go.net/proxy: make use of constants

R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/7299056
parent 1509ba55
......@@ -175,9 +175,9 @@ func (s *socks5) Dial(network, addr string) (net.Conn, error) {
bytesToDiscard := 0
switch buf[3] {
case socks5IP4:
bytesToDiscard = 4
bytesToDiscard = net.IPv4len
case socks5IP6:
bytesToDiscard = 16
bytesToDiscard = net.IPv6len
case socks5Domain:
_, err := io.ReadFull(conn, buf[:1])
if err != nil {
......
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