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

nodejs-proxy-checkerv2

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nodejs-proxy-checkerv2

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

  • 1.2.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-90%
Maintainers
1
Weekly downloads
 
Created
Source

NodeJS-Proxy-CheckerV2

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

  • Proxy anonymous level
  • Proxy country
  • Proxy type (HTTP or SOCKS)
  • Proxy time

Install

npm i nodejs-proxy-checkerv2

How to use ?

const ProxyChecker = require("nodejs-proxy-checkerv2").default;
const instance =new ProxyChecker()
    .addProxiesFromFile("./proxies.txt")
    .addDefaultProxyJudge() // -> optional if you put yours otherwise you have to put it
    .addDefaultProxyInformationProvider(); // -> optional if you put yours otherwise you have to put it

const result = await instance.check(null);

Proxy format: address:port or address:port:username:password

Load proxies with file
const instance =new ProxyChecker()
    .addProxiesFromFile("./proxies.txt")
    .addDefaultProxyJudge() // -> optional if you put yours otherwise you have to put it
    .addDefaultProxyInformationProvider(); // -> optional if you put yours otherwise you have to put it

const result = await instance.check(null);
Load proxys with string array
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() // -> optional if you put yours otherwise you have to put it
    .addDefaultProxyInformationProvider(); // -> optional if you put yours otherwise you have to put it

const result = await instance.check(null);
Load only one proxy
const instance =new ProxyChecker()
    .addOnly1Proxy('myproxy')
    .addDefaultProxyJudge() // -> optional if you put yours otherwise you have to put it
    .addDefaultProxyInformationProvider(); // -> optional if you put yours otherwise you have to put it

const result = await instance.check(null);
You can combine the 3
const instance =new ProxyChecker()
    .addOnly1Proxy('myproxy')
    .addProxiesFromFile("./proxies.txt")
    .addProxiesFromArray(proxies)
    .addDefaultProxyJudge() // -> optional if you put yours otherwise you have to put it
    .addDefaultProxyInformationProvider(); // -> optional if you put yours otherwise you have to put it

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 all
const instance =new ProxyChecker()
    .addProxiesFromArray(proxies);

const result = await instance.check((result) => {
   console.log(result); // -> Result of proxy1, proxy2, proxy3, ...
});
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)
    // .addDefaultProxyJudge()
    // .addDefaultProxyInformationProvider();
    .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() // -> optional if you put yours otherwise you have to put it
    .addDefaultProxyInformationProvider(); // -> optional if you put yours otherwise you have to put it

:warning: Links are automatically checked and filtered when called "check()" those that don't work are ignored

const instance =new ProxyChecker()

const result = await instance.checkProxyJudgeLinks(null) //or instance.checkProxyJudgeLinks((val) => console.log(val)) for direct
const result2 = await instance.checkProxyInformationProviderLinks(null) // or instance.checkProxyInformationProviderLinks((val) => console.log(val)) for direct

Results

  • check()
  • checkProxyInformationProviderLinks()
  • checkProxyJudgeLinks()

Dependencies

Keywords

FAQs

Package last updated on 24 Feb 2021

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