Skip to content

Commit 75ab613

Browse files
vcabbagebradfitz
authored andcommitted
net/http: document SOCKS5 proxy support
Fixes #20618 Change-Id: I90712bd76d9d47f29221bc298c69737ebee25c12 Reviewed-on: https://go-review.googlesource.com/45814 Reviewed-by: Brad Fitzpatrick <[email protected]>
1 parent 34ab421 commit 75ab613

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/net/http/transport.go

+5
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,11 @@ type Transport struct {
8989
// Proxy specifies a function to return a proxy for a given
9090
// Request. If the function returns a non-nil error, the
9191
// request is aborted with the provided error.
92+
//
93+
// The proxy type is determined by the URL scheme. "http"
94+
// and "socks5" are supported. If the scheme is empty,
95+
// "http" is assumed.
96+
//
9297
// If Proxy is nil or returns a nil *URL, no proxy is used.
9398
Proxy func(*Request) (*url.URL, error)
9499

0 commit comments

Comments
 (0)