Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support of SOCKS proxies #69

Open
lazygorilla opened this issue Sep 23, 2018 · 1 comment
Open

Support of SOCKS proxies #69

lazygorilla opened this issue Sep 23, 2018 · 1 comment

Comments

@lazygorilla
Copy link

Hello, is there a SOCKS-proxy support? I see that I can use HTTP/S proxies. When will you implement the support of SOCKS4/5?

@ZalerC
Copy link

ZalerC commented Nov 14, 2018

I found it is support the SOCKS proxy in Windows10, you can test like this.

proxyURL, err := url.Parse("socks5://127.0.0.1:1080") // Proxy URL
if err != nil {
    log.Panicln(err)
}

resp, err := grequests.Get("http://www.levigross.com/",
    &grequests.RequestOptions{Proxies: map[string]*url.URL{
        "http": proxyURL,
        "https": proxyURL,
    }})

if err != nil {
    log.Println(err)
}

if resp.Ok != true {
    log.Println("Request did not return OK")
}

log.Println(resp)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants