gs-proxy-picker
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

INSTALL

npm i gs-proxy-picker

EXAMPLE

import { ProxyPicker } from 'gs-proxy-picker';

/** Using webshare adapter */
const websharePicker = new ProxyPicker({
    adapter: 'webshare',
    APIEndpoint: 'https://proxy.webshare.io/api/v2/proxy/list/',
    listCount: 10,
    APIKey: 'xxx-your-api-token-xxx',
    cacheTTL: 10,
});

/** Using json file adapter */
let jsonPicker = new ProxyPicker({
    adapter: 'jsonfile',
    filePath: '/your/path/file.json',
    cacheTTL: 10,
});

(async () => {
    console.log(await websharePicker.getAll()); // Get all proxy
    console.log(await websharePicker.getOne()); // Get a random proxy

    console.log(await jsonPicker.getAll());
    console.log(await jsonPicker.getOne());
})();

Readme

Keywords

none

Package Sidebar

Install

npm i gs-proxy-picker

Weekly Downloads

1

Version

1.0.2

License

ISC

Unpacked Size

13.9 kB

Total Files

16

Last publish

Collaborators

  • hunglsx