From 75ab6134fcea003803e25c9bad7f092be3eeb5c3 Mon Sep 17 00:00:00 2001 From: Kale Blankenship Date: Wed, 14 Jun 2017 19:44:20 -0700 Subject: [PATCH] net/http: document SOCKS5 proxy support Fixes #20618 Change-Id: I90712bd76d9d47f29221bc298c69737ebee25c12 Reviewed-on: https://go-review.googlesource.com/45814 Reviewed-by: Brad Fitzpatrick --- src/net/http/transport.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/net/http/transport.go b/src/net/http/transport.go index 9dedc22272..6a89392a99 100644 --- a/src/net/http/transport.go +++ b/src/net/http/transport.go @@ -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) -- 2.50.0