]> Cypherpunks repositories - gostls13.git/commitdiff
net/http: document SOCKS5 proxy support
authorKale Blankenship <kale@lemnisys.com>
Thu, 15 Jun 2017 02:44:20 +0000 (19:44 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Thu, 15 Jun 2017 16:24:10 +0000 (16:24 +0000)
Fixes #20618

Change-Id: I90712bd76d9d47f29221bc298c69737ebee25c12
Reviewed-on: https://go-review.googlesource.com/45814
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/net/http/transport.go

index 9dedc22272429aae9756fa65d43b9eb3ee9e5458..6a89392a99634972f7717f5e0c8e6552d8a8b0f7 100644 (file)
@@ -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)