Created
December 16, 2016 19:28
-
-
Save inhies/cd88b4147e18c1f5376a2beea3ffd2fc to your computer and use it in GitHub Desktop.
Revisions
-
inhies created this gist
Dec 16, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ // create a socks5 dialer dialer, err := proxy.SOCKS5("tcp", PROXY_ADDR, nil, proxy.Direct) if err != nil { fmt.Fprintln(os.Stderr, "can't connect to the proxy:", err) os.Exit(1) } // setup a http client httpTransport := &http.Transport{} // set our socks5 as the dialer httpTransport.Dial = dialer.Dial http.DefaultClient = &http.Client{Transport: httpTransport}