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 for SOCKS proxy #11

Open
toddb opened this issue Nov 30, 2015 · 1 comment
Open

Support for SOCKS proxy #11

toddb opened this issue Nov 30, 2015 · 1 comment

Comments

@toddb
Copy link

toddb commented Nov 30, 2015

Deadlinks is great and I need to check a number of links that lie behind a site with IP restrictions such that I use a SOCKS proxy. Any chance of support that we could inject the Agent

see https://github.com/mattcg/socks5-http-client

var Agent = require('socks5-http-client/lib/Agent');

request({
    url: 'http://en.wikipedia.org/wiki/SOCKS',
    agentClass: Agent,
    agentOptions: {
        socksHost: 'my-tor-proxy-host', // Defaults to 'localhost'.
        socksPort: 9050 // Defaults to 1080.
    }
}, function(err, res) {
    console.log(err || res.body);
});

The options could be extended:

options.agent that takes the agentClass and agentOptions above.

@lnyarl
Copy link
Owner

lnyarl commented Dec 5, 2015

Ok. I will checkout. Thanks.

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