punch-proxy-manager
v0.0.13
Published
Module for get proxies.
Downloads
16
Readme
punch-proxy-manager
Return proxy
Config
- refreshTime - email address that used to send emails
- services
include - array of proxy services to use
exclude - array of proxy services to not use
valid valuesGIMMI_PROXY, HIDE_MY_ASS, IN_CLOCK, PROXY_SERVER_LIST, UK_PROXY, US_PROXY
Method
- get - get a valid proxy
- blacklist - mark proxy as invalid
- start - start the proxy manager with auto refresh
- stop - stop auto refresh
Usage
'use strict';
const ProxyManager = require('./index');
const proxyManager = new ProxyManager({refreshTime : 100000, services: {include: [ProxyManager.SERVICE_NAMES.GIMMI_PROXY]}});
proxyManager.start()
.then(() => {
setInterval(() => {
let proxy = proxyManager.get();
if (proxy){
proxyManager.blacklist(proxy.ip);
}
console.log(proxy);
}, 1000);
})