Commit Graph

12 Commits

Author SHA1 Message Date
Michel Lespinasse
a689eb3bc4 proxy: split SOCKS5 Dial method in two
Split off a new SOCKS5 connect() method from Dial.

connect() takes an existing connection to a socks5 server, and
commands the server to extend that connection to a given target
address and port.

Change-Id: I5dbba58a67a0d884bda3d3ac194dc18bdebe74ab
Reviewed-on: https://go-review.googlesource.com/36643
Reviewed-by: Adam Langley <agl@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-02-09 17:24:21 +00:00
David Symonds
8aa6e209cb net: add import comments.
Change-Id: Ifab0fdaec1d810d268b7c19ad30f476802203b37
2014-12-09 14:17:11 +11:00
Robert Obryk
fbcd5c9bb3 go.net/proxy: don't pass invalid domain name length to SOCKS5 proxies
SOCKS5 uses a single-byte field for domain name length. This change
causes dials to domain names longer than 255 chars to fail instead
of sending an invalid request to the proxy.

LGTM=mikioh.mikioh
R=golang-codereviews, mikioh.mikioh
CC=golang-codereviews
https://golang.org/cl/90790044
2014-04-27 00:24:21 +09:00
ChaiShushan
77895031fa go.net/proxy: fix typo in doc
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/12702044
2013-08-12 08:54:40 +10:00
Adam Langley
f013f1fe6d 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
2013-06-09 13:20:33 -04:00
Mikio Hara
5a456bdb1f go.net/proxy: make proxy tests able to run with host protocol stack
R=golang-dev, dave, agl
CC=golang-dev
https://golang.org/cl/7314047
2013-02-10 10:45:18 +09:00
Mikio Hara
6440e89078 go.net/proxy: make use of constants
R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/7299056
2013-02-06 19:33:08 +09:00
Mikio Hara
1509ba553c go.net/proxy: fix typo
R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/7301052
2013-02-06 19:32:30 +09:00
Mikio Hara
cd34c46d3f go.net/proxy: fix desired destination address in SOCKS5 CONNECT
Both types IPv6 IPv4-mapped address and IPv4-compatible
address are not allowed to be used in wire protocols.

Fixes golang/go#4709.

Thank you raptium for original CL 6922050.

R=golang-dev, agl
CC=golang-dev, raptium
https://golang.org/cl/7220047
2013-01-29 03:24:44 +09:00
Mikio Hara
3805a43191 go.net/proxy: fix IP address determination
net.IP represents either an IPv4 or IPv6 address. In case of
the address of IPv4 node, it uses IPv4-mapped IPv6 address
format by default.

R=agl, dave
CC=golang-dev
https://golang.org/cl/6782078
2012-11-17 14:35:42 +09:00
Adam Langley
67afa4a398 proxy: fix wrong function name in comment
R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/6459055
2012-08-13 21:29:05 -04:00
Adam Langley
c906410556 proxy: move from exp/proxy
This change copies exp/proxy to go.net without any code changes. A
followup CL will remove exp/proxy.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6449097
2012-08-07 12:02:26 -04:00