@devhigley/test-proxy
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

test-proxy Build Status

Description

test-proxy is a lightweight Node.js http(s) proxy testing library

What it does:

  • tests http(s) proxies
  • checks latency (ms)
  • checks proxy anonymity (boolean)
  • checks support for specific hostname
  • supports proxy authentication
  • supports optional connection timeout
  • supports ip_address environment variable for fewer requests

Installation

npm install @devhigley/test-proxy
yarn add @devhigley/test-proxy

Usage

const testProxy = require("@devhigley/test-proxy");

const proxy = { host: "89.187.177.91", port: 80 };

testProxy(proxy).then((result) => console.log(result));

Result:

on success:

{
  type: "http",
  latency: 1337,
  anonymous: true
}

on failure:

{ error: '503 Service Unavailable' }

Package Sidebar

Install

npm i @devhigley/test-proxy

Weekly Downloads

1

Version

1.1.1

License

MIT

Unpacked Size

6.91 kB

Total Files

5

Last publish

Collaborators

  • devhigley