NodeJS-Proxy-CheckerV2
It's simple Proxy Checker, get proxy status, anonymous level, type, time, country build with Typescript
Install
npm i nodejs-proxy-checkerv2
How to use ?
const ProxyChecker = require("nodejs-proxy-checkerv2").default;
const instance =new ProxyChecker()
.addProxiesFromFile("./proxies.txt")
.addDefaultProxyJudge()
.addDefaultProxyInformationProvider();
const result = await instance.check(null);
Load proxies with file
One proxy per line and in this format: address: port
const instance =new ProxyChecker()
.addProxiesFromFile("./proxies.txt")
.addDefaultProxyJudge()
.addDefaultProxyInformationProvider();
const result = await instance.check(null);
Load proxys with string array
One proxy per line and in this format: address: port
const proxies = [
"103.4.112.18:80",
"103.4.164.205:8080",
"103.43.42.85:30477",
"103.43.7.93:30004",
];
const instance =new ProxyChecker()
.addProxiesFromArray(proxies)
.addDefaultProxyJudge()
.addDefaultProxyInformationProvider();
const result = await instance.check(null);
Load only one proxy
Format: address: port
const instance =new ProxyChecker()
.addOnly1Proxy('myproxy')
.addDefaultProxyJudge()
.addDefaultProxyInformationProvider();
const result = await instance.check(null);
You can combine the 3
const instance =new ProxyChecker()
.addOnly1Proxy('myproxy')
.addProxiesFromFile("./proxies.txt")
.addProxiesFromArray(proxies)
.addDefaultProxyJudge()
.addDefaultProxyInformationProvider();
const result = await instance.check(null);
Options
You can put a callback in order to have the result of each live proxy test so as not to wait for everything
const instance =new ProxyChecker()
.addProxiesFromArray(proxies);
const result = await instance.check((result) => {
console.log(result);
});
You don't have to put addDefaultProxyJudge and addDefaultProxyInformationProvider if you have yours you can add like this
const myInformationProviderLinks = ['https://test.com/', 'https://test2.com/']
const myProxyJudgesLinks = ['https://testJudge.com/', 'https://testJudge2.com/']
const instance =new ProxyChecker()
.addProxiesFromArray(proxies)
.addProxyInformationProvider(myInformationProviderLinks)
.addProxyJudge(myProxyJudgesLinks);
Or combine default and yours
const myInformationProviderLinks = ['https://test.com/', 'https://test2.com/']
const myProxyJudgesLinks = ['https://testJudge.com/', 'https://testJudge2.com/']
const instance =new ProxyChecker()
.addProxiesFromArray(proxies)
.addProxyInformationProvider(myInformationProviderLinks)
.addProxyJudge(myProxyJudgesLinks)
.addDefaultProxyJudge()
.addDefaultProxyInformationProvider();
Dependencies