free-proxy-finder
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

free-proxy-finder

Prototype for a module that will search lists of available proxies for proxy servers that are reachable in a timely fashion.

Currently consumes two different free proxy lists, then maps them through a function that tests if they work and respond within a given period of time. Holds onto the list for use later.

Usage

easiest:

import { getRandomProxy, getNextProxy, initProxyFinder } from 'free-proxy-finder';
initProxyFinder();

then when you need a proxy, either use

getRandomProxy();

or

getNextProxy();

or, the harder way, the init function does this

    loadAllowList('allowlist.json');
    loadDenyList('denylist.json');
    testProxyCache({
        timeout: 8000,
        verboseLogging: true,
        retestDenies: false,
        saveOnChange: true,
    }).then(() => {
        console.warn('* proxy update completed');
        console.warn('* proxyDenyList', proxyDenyList.length);
        console.warn('* proxyAllowList', proxyAllowList.length);
    });

Please refer to the source code for information as to what other functions and options are available.

Readme

Keywords

none

Package Sidebar

Install

npm i free-proxy-finder

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

10.3 kB

Total Files

5

Last publish

Collaborators

  • ericblade