Skip to content

husam212/proxymesh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

proxymesh

Node module to use ProxyMesh rotating proxy servers.

Example

var ProxyMesh = require('proxymesh');

// Initialize with your ProxyMesh account username and passwod.
var proxy = new ProxyMesh('username', 'password');

// Select which proxy server to use (as in ProxyMesh dashbaord).
proxy.entryNode = 'us.proxymesh.com:1234'

// Optionally, specify the IP address of exit node (using prefer method).
proxy.exitNode = '123.123.123.123'

// Setup the proxy request. Used exit node is passed in the callback.
var opts = url.parse('http://example.com');
var proxyRequest = proxy.request(opts, function(exitNode) {
    console.log(exitNode);
});

// And fire!
proxyRequest.end();

Returned proxyRequest is a http.ClientRequest object, so the response can be handled like the following:

proxyRequest.on('response', callback);

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published