Skip to content

rezemble/gimmeproxy

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GimmeProxy

This is a simple wrapper for the free GimmeProxy api. It does only 2 things:

  • allows you to set general configuration for timeouts and user-id
  • uses the correct api endpoint depending on the timeout

It will always return a promise that contains the response from the api, or throws an error if there is one.

Usage

var gimmeproxy = require('gimmeproxy');

// optional, you don't need to call this at all
gimmeproxy.config({
  userID: 'foo', // (optional) if you don't specify one a random one will be generated when you need it.
  timeout: 600,   // (optional) the timeout to pass to every request that does not specify one.
  api_key: 'XXXXXX', // (optional) gimmeproxy API Key
});

// it takes an optional options parameter
gimmeproxy.getProxy({
  timeout: 100, // timeout
  https: true, // supports https
  userAgent: true, // supports user-agent forwarding
  /*
    every GET parameter option the gimmeproxy API offers
  */
}).then(function(proxyData) {
  console.log(proxyData);
});

Although the user id will be generated I suggest to supply it yourself if you actively rely on the timeouts as the a new id will be generated if your process restarts and you will use your timeouts.

About

Small nodejs wrapper for gimmeproxy.com

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%