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 🙏

© 2024 – Pkg Stats / Ryan Hefner

proxy-source

v0.0.0

Published

Get a verified working proxy according to you filters.

Downloads

8

Readme

Proxy Source

Build Status

You need a working proxy for your project? Look no further.

This library provides you with a simple way to get tested and working proxy.

Under the hood it uses the proxy-lists and proxy-verify library and adds some own magic.

Options are directly passed to the proxy-lists library thus all those settings are available, extended by the following options:

const options = {
  timeout: 30000,
  maxResponse: 3000,
  check: {
    anonymityLevel: false,
    protocols: false,
    tunneling: false,
    speed: false,
  },
};

timeout

Sometimes it takes a long time for proxy-lists to finish gathering proxies - if you know you only need a couple of proxies set this timeout to abort proxy gathering early.

By default it will stop after 30 seconds.

maxResponse

The amount of microsecods to wait for test results to return. This can also be used to filter out slow proxies.

This makes only sense in combination with the speed check.

Be careful about setting it too low or a lot of proxies might not pass

check

This property controls which checks are being applied. Some of the checks require you to pass according parameters to proxy-lists

anonymityLevel

Check that the proxy matches at least one of the supplied anonymity levels.

protocols

Check that the proxy matches at least one of the requested protocols.

tunneling

Make sure that the proxy supports tunneling. In practical use, this option check if https request can be made through this proxy.

speed

In combination with the maxResponse option this checks that the proxy responds in a certain amount of time.

Usage

import { ProxySource } from 'proxy-source';

const options = {
  timeout: 60000,
  maxResponse: 3000,
  check: {
    anonymityLevel: false,
    protocols: true,
    tunneling: true,
  },
  /* proxy-lists config follows*/
  series: false,
  protocols: ['http', 'https'],
};

const proxySource = new ProxySource(options);
await proxySource.initialize();

const proxy = await proxySource.get();

Even if no checks are active, the get method will return a proxy that you can at least connect to.

Development

Clone the repository and install the dependencies via yarn:

yarn install

PR requests are very welcome. If you add functionality, make sure that test cases are in place and that they pass locally. Travis might sometimes fail, especially when it comes to calling external API's like it is the case when gathering the proxies.

Running the tests

yarn test