Socks5 support#680
Closed
mattcg wants to merge 4 commits into
Closed
Conversation
|
👍 |
This was referenced Oct 11, 2013
Closed
Contributor
|
now that the request library is using optional dependencies it would probably make sense to make this one optional as well. see the latest commits for examples on how to do that. |
Author
|
Done. It's now an optional dependency. |
|
A giant +1 for socks proxy support. |
|
This is awesome! |
Author
|
I'm closing this pull request because the change is no longer compatible. The good news is that it's actually very easy to make requests without integrated support. Here's how you can make an HTTPS request via a SOCKS5 proxy, for example: var Socks5ClientHttpsAgent = require('socks5-https-client/lib/Agent');
request({
url: 'https://www.google.com/',
agent: new Socks5ClientHttpsAgent({socksHost: 'tor-proxy-host', socksPort: 9050})
}, function(err, res) {
// ...
}); |
|
socks proxy by mattcg is break on node 0.12 |
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 characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a replacement for #648 and fixes #141.
The patch adds mattcg/socks5-http-client and mattcg/socks5-https-client as dependencies so that request can use the agent objects from both to support SOCKS proxying.
A test is included. To run it you should have a SOCKS5 server running on localhost:1080. Use the following command to start one if you have sshd running locally:
ssh -N -D 0.0.0.0:1080 localhost