1.0.2 • Published 8 months ago

gs-proxy-picker v1.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
8 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.2

8 months ago

1.0.1

8 months ago

1.0.0

8 months ago