Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

proxy-checkerjs

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

proxy-checkerjs

It's simple Proxy Checker, get proxy status, anonymous level, type, time, country

  • 0.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

NodeJS-Proxy-Checker

It's simple Proxy Checker, get proxy status, anonymous level, type, time, country

  • Proxy anonymous level
  • Proxy country
  • Type
  • Proxy Time

Install

npm i proxy-checkerjs

How to use ?

  const proxy_checker = require('proxy-checkerjs')
  await proxy_checker.getMyIP() //Important

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')
//return
//{
//      result:true or false,
//      anonymous: anonymouslevel or '',
//      country:country or ''
//}

Options

You can use options for checkProxies (), it's a object:

await proxy_checker.checkProxies({
        goodProxiesPath: './good.txt', //Create file on stream, add one per line functional proxies (address:port)
        badProxiesPath: './bad.txt', //Create file on stream, add one per line bad proxies (address:port)
        showAnonymous:true, //Only for goodProxiesPath, add anonymous value  (address:port:anonymous)
        showCountry:true, //Only for goodProxiesPath, add country value  (address:port:country)
        output: true, //Show in console, it's simple console.log() with color (dead proxy = red / good proxy = green) and proxy information
       deleteFileIfExist:true //Only if goodProxiesPath and/or badProxiesPath is used, 
    })

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()

Keywords

FAQs

Package last updated on 16 Apr 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc