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 🙏

© 2025 – Pkg Stats / Ryan Hefner

proxy-tester

v0.3.2

Published

Node http/socks proxy tester with server and client

Readme

proxy-tester

Reliable proxy testing

This project is a fork from check-proxy (un-maintained?)

Library consists of a server, and client. Server runs on a known IP address and client attempts to connect to server through the proxy under test.

What it does:

  • Tests http, socks4 and socks5 proxies
  • Tests GET, POST, COOKIES, referer support
  • Tests https support
  • Provides geoIP result on proxy
  • Tests proxy speed - provides total time and connect time
  • Tests anonymity (binary checks - anonymous or not, 1 - anonymous, i.e. doesn't leak your IP address in any of the headers, 0 - not anonymous)
  • Allows custom connectivity tests to specific websites - by custom function, regex, or substring search

Installation

  npm i proxy-tester --save

Server Setup:

server.js

const express = require('express'),
  app = express(),
  bodyParser = require('body-parser'),
  cookieParser = require('cookie-parser'),
  getProxyType = require('proxy-tester').ping,
  ipAddress = process.env.MASTER_IP || '10.0.10.150',
  port = process.env.PORT || 8686;

app.use(bodyParser.urlencoded({ extended: true }));
app.use(bodyParser.json());
app.use(cookieParser());
app.get('/', ping);
app.post('/', ping);
app.listen(port, ipAddress, function() {
  console.log('%s:\nNode server started on %s:%d ...', Date(Date.now() ), ipAddress, port);
});

function ping(req, res) {
  console.log('ip', req.connection.remoteAddress);
  // console.log('headers', req.headers);
  // console.log('cookies', req.cookies);
  res.json(getProxyType(req.headers, req.query, req.body, req.cookies));
}

Client Setup

client.js

const checkProxy = require('proxy-tester').check;
checkProxy({ // Returns a Promise
  testHost: 'ping.mydomain.com', // put your ping server url here
  proxyIP: '107.151.152.218', // proxy ip to test
  proxyPort: 80, // proxy port to test
  localIP: '10.0.10.10', // local machine IP address to test
  connectTimeout: 6, // curl connect timeout, sec
  timeout: 10, // curl timeout, sec
  websites: [{
    name: 'google',
    url: 'https://www.google.com/',
    regex: function(html) { // expected result - custom function
      return html && html.indexOf('google') != -1;
  },{
    name: 'amazon',
    url: 'https://www.amazon.com/',
    regex: 'Amazon', // expected result - look for this string in the output
  },{
    name: 'ebay',
    url: 'https://www.ebay.com/',
    regex: /ebay/ig, // expected result - regex.test(result)
  }]
})
.then(function(res) {
	console.log('final result', res);
})
.catch(e => {
  console.log(e);
});

Result (in a Promise):

[{
  get: true,
  post: true,
  cookies: true,
  referer: true,
  'user-agent': true,
  anonymityLevel: 1,
  supportsHttps: true,
  protocol: 'http',
  ip: '107.151.152.218',
  port: 80,
  country: 'MX',
  connectTime: 0.23, // Time in seconds it took to establish the connection
  totalTime: 1.1, // Total transaction time in seconds for last the transfer
  websites: {
    google: {
      "responseCode": 200,
      "connectTime": 0.648131, // seconds
      "totalTime": 0.890804, // seconds
      "receivedLength": 1270, // bytes
      "averageSpeed": 1425 // bytes per second
    },
    amazon: false,
    ebay: {
      "responseCode": 200,
      "connectTime": 0.648131, // seconds
      "totalTime": 0.890804, // seconds
      "receivedLength": 1270, // bytes
      "averageSpeed": 1425 // bytes per second
    }
  }
}]

Tests

mocha