|
|
|
go.net/proxy: correctly sets IPv4 addresses in socks5 request now
net.ParseIP(host) always returns a 16-byte array, we should convert
it into 4-byte array before copy it to the IP field if it is a IPv4
address.
Patch Set 1 #Patch Set 2 : diff -r 3f49abc52b3c https://code.google.com/p/go.net #Patch Set 3 : diff -r 3f49abc52b3c https://code.google.com/p/go.net #
Total comments: 1
Patch Set 4 : diff -r 3f49abc52b3c https://code.google.com/p/go.net #Total messages: 5
|
raptium
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go.net
|
13 years ago (2012年12月12日 06:02:30 UTC) #1 |
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go.net
Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com), Please take another look.
A test would be nice but I'm unfamiliar with this repo. Do we have tests for this package? https://codereview.appspot.com/6922050/diff/2002/proxy/socks5.go File proxy/socks5.go (right): https://codereview.appspot.com/6922050/diff/2002/proxy/socks5.go#newcode147 proxy/socks5.go:147: buf = append(buf, []byte(ipv4)...) ip = ipv4 and then the append can be done below where it used to be. Also the []byte() conversion is not necessary (I know it was in the original).
Hello rsc@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
Could you please add a test. Also please change the CL description. PerseIP does return a slice, not an array. The doc fix is in progress: https://codereview.appspot.com/6930047/