npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

proxy-simple-test

v1.1.11

Published

Simple proxy testing.

Downloads

20

Readme

Proxy Simple Test

Build Status npm

Simple proxy testing.

All work is done by node-tunnel and got - this is a great library that can do a lot, use it if you need more.

In order to make an object from a proxy string, I use my library - split-proxy

proxy-simple-test - always returns true if test is passed or false if not.

The first argument is a proxy as a string or as an object (use what is convenient for you). The second argument is the webpage to check.

The third argument is optional; it checks the body of the response to a specific text.

inBody - if body of the answer has this text then the test is passed.

notInBody - if body of the answer has this text then the test is NOT passed.

If third argument is a string, then it is automatically considered as inBody.

The test never passes if the response code is NOT 200.

It is not necessary to use a proxy with login and password.

At the moment - only HTTP over HTTP tunneling.

Install

npm i proxy-simple-test

Examples

Proxy string:

const proxySimpleTest = require('proxy-simple-test');

(async () => {
  await proxySimpleTest(
    '123.123.2.42:8080@superLogin:superPassword',
    'www.example.com',
    { inBody: '<h1>Example Domain</h1>', notInBody: '<h1>404</h1>' }
  );
})();

// return true or false

The third argument can be a string, then it will automatically be used as inBody.

const proxySimpleTest = require('proxy-simple-test');

(async () => {
  await proxySimpleTest(
    '123.123.2.42:8080@superLogin:superPassword',
    'www.example.com',
    '<h1>Example Domain</h1>'
  );
})();

// return true or false

Proxy string, without defining text from the body, in this case returns true if response code is 200:

const proxySimpleTest = require('proxy-simple-test');

(async () => {
  await proxySimpleTest(
    '123.123.2.42:8080@superLogin:superPassword',
    'www.example.com'
  );
})();

// return true or false

Proxy object:

const proxySimpleTest = require('proxy-simple-test');

(async () => {
  await proxySimpleTest(
    {
      ipAddress: '123.123.2.42',
      port: 8080,
      login: 'superLogin',
      password: 'superPassword'
    },
    'www.example.com',
    { inBody: '<h1>Example Domain</h1>', notInBody: '<h1>404</h1>' }
  );
})();

// return true or false

Proxy object, another format, instead of login and password, you can write a loginPass, and instead of the ipAddress and port - ipAddressPort:

const proxySimpleTest = require('proxy-simple-test');

(async () => {
  await proxySimpleTest(
    {
      ipAddressPort: '123.123.2.42:8080',
      loginPass: 'superLogin:superPassword'
    },
    'www.example.com',
    { inBody: '<h1>Example Domain</h1>', notInBody: '<h1>404</h1>' }
  );
})();

// return true or false

Proxy object, another format:

const proxySimpleTest = require('proxy-simple-test');

(async () => {
  await proxySimpleTest(
    {
      ipAddress: '123.123.2.42',
      port: 8080,
      loginPass: 'superLogin:superPassword'
    },
    'www.example.com',
    { inBody: '<h1>Example Domain</h1>', notInBody: '<h1>404</h1>' }
  );
})();

// return true or false

Of course, you can use without a password and login:

const proxySimpleTest = require('proxy-simple-test');

(async () => {
  await proxySimpleTest(
    {
      ipAddress: '123.123.2.42',
      port: 8080
    },
    'www.example.com',
    { inBody: '<h1>Example Domain</h1>', notInBody: '<h1>404</h1>' }
  );
})();

// return true or false