diff --git a/transport.go b/transport.go index b43385d..b8e77c8 100644 --- a/transport.go +++ b/transport.go @@ -10,13 +10,16 @@ import ( ) // Transport will return a http.Transport for the proxy protocol -func Transport(proxy string) (scheme string, transport *http.Transport, err error) { +func Transport(proxy string) (string, *http.Transport, error) { // Parse URL proxyURL, err := url.Parse(proxy) if err != nil { return "", nil, err } + // Store transport + var transport *http.Transport + // Check scheme & create transport switch proxyURL.Scheme { case "socks5", "socks4", "socks4a":