1.0.0 • Published 3 years ago

proxyshop v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

proxyshop

Allows you to easily work with a huge number of high-quality, residential proxies using proxy.shop

  • These proxies can be very useful when you require clean, residential ips for your application.
  • perfect fit for automation, bots, crawlers, credential stuffers (wait, what?)

Refer to the API Docs for full API documentation. Some of the abstractions they use, like sub-accounts, I find to be clunky and hard to manage out of the box. This package provides some useful functions to work with your proxies in a more intuitive fashion.

NPM Build Status JavaScript Style Guide

Install

npm install --save proxyshop
const proxyshop = require('proxyshop');

const client = new proxyshop({
  key: '...', // Your API Key goes here
});

// get a new proxy from TX
const proxy = await client.getProxy('TX');

// provide http proxy URI to your bot
const bot = new PlayBot({ proxy });
await bot.init();
await bot.goto('http://whoer.net');


// add a new sub-account (which represents a distinct proxy handle)
const sid = await client.addProxy('username', 'password');

// you can persist the sid somewhere if you want
await redis.set('sid:', sid);

// then later, you can update/refresh the proxy
await client.updateProxy(sid, 'CA');

TODO

  • Add tests

References

Please see API documentation for full usage details: API.