proxy-manager

Simple proxy manager

Proxy Manager

Proxy Manager is a simple Node library to handle proxies. Currently, the API is completely synchronous.

Getting Started

Installation

pnpm i proxy-manager
# or "yarn add proxy-manager"
# or "npm i proxy-manager"

Usage

Example - initialization

const ProxyManager = require('proxy-manager');
const proxyManager = new ProxyManager('proxies.txt');

const randomProxy = proxyManager.getRandomProxy();

Example - usage with requests-promise-native

const ProxyManager = require('proxy-manager');
const request = require('request-promise-native');

const proxyManager = new ProxyManager('proxies.txt');
const options = {
    method: 'get',
    proxy: proxyManager.getRandomProxy().toString()
    uri: `<example.url>`
};

HomePage

https://github.com/patrickpei/proxy-manager#readme

Repository

git+https://github.com/patrickpei/proxy-manager.git


相关推荐