1.0.6 • Published 12 months ago

gs-proxy-picker v1.0.6

Weekly downloads
-
License
ISC
Repository
github
Last release
12 months ago

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());
})();
1.0.6

12 months ago

1.0.5

12 months ago

1.0.4

12 months ago

1.0.3

12 months ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago