NodeJS-Proxy-Checker
It's simple Proxy Checker, get proxy status, anonymous level, type, time, country
Install
npm i proxy-checkerjs
How to use ?
const proxy_checker = require('proxy-checkerjs')
await proxy_checker.getMyIP()
Load proxys with file
One proxy per line and in this format: address: port
await proxy_checker.setProxiesListFromFile('./proxies.txt')
await proxy_checker.checkProxies()
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",
]
await proxy_checker.setProxiesListFromArray(proxies)
await proxy_checker.checkProxies()
Load only one proxy
Format: address: port
await proxy_checker.checkOneProxy('103.4.112.18:80')
Options
You can use options for checkProxies (), it's a object:
await proxy_checker.checkProxies({
goodProxiesPath: './good.txt',
badProxiesPath: './bad.txt',
showAnonymous:true,
showCountry:true,
output: true,
deleteFileIfExist:true
})
Node js use in top-level code
var main = async function() {
await proxy_checker.getMyIP()
await proxy_checker.setProxiesListFromFile('./test.txt')
await proxy_checker.checkProxies({
goodProxiesPath: './good.txt',
badProxiesPath: './bad.txt',
showAnonymous:true,
showCountry:true
})
}
main()