Skip to content

Commit

Permalink
net/http: document SOCKS5 proxy support
Browse files Browse the repository at this point in the history
Fixes #20618

Change-Id: I90712bd76d9d47f29221bc298c69737ebee25c12
Reviewed-on: https://go-review.googlesource.com/45814
Reviewed-by: Brad Fitzpatrick <[email protected]>
  • Loading branch information
vcabbage authored and bradfitz committed Jun 15, 2017
1 parent 34ab421 commit 75ab613
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/net/http/transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ type Transport struct {
// Proxy specifies a function to return a proxy for a given
// Request. If the function returns a non-nil error, the
// request is aborted with the provided error.
//
// The proxy type is determined by the URL scheme. "http"
// and "socks5" are supported. If the scheme is empty,
// "http" is assumed.
//
// If Proxy is nil or returns a nil *URL, no proxy is used.
Proxy func(*Request) (*url.URL, error)

Expand Down

0 comments on commit 75ab613

Please sign in to comment.