2.2.3 • Published 2 years ago

proxyscan.io v2.2.3

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

Logo

proxyscan.io

A NodeJS wrapper for proxyscan.io's API

Fetch proxies lists with ease from the proxyscan.io API. This packages comes with TS types and JSDoc for ease of use in development.

📥 Installation

You can install this library with the NPM package manager with the following command:

npm install proxyscan.io

Alternatively you can build your own version with the following commands:

git clone https://github.com/Caesarovich/proxyscan.io.git
cd proxyscan.io && npm i
npm build

This will build the package into the dist directory.

⏳ Quick start

Use the fetchProxies function to fetch proxies from the API.

import { fetchProxies } from 'proxyscan.io';

fetchProxies()
  .then(console.log) // [ {ip: 1.1.1.1, ...} ]
  .catch(console.error);

📔 Documentation

fetchProxies(proxyOptions?: ProxyOptions, requestOptions?: RequestOptions)

The fetchProxies function will make an HTTP GET call to the API and retrieve results based on the specified options.

Example:

import { fetchProxies } from 'proxyscan.io';

fetchProxies().then(console.log);

/*
  [
    {
      "ip": "185.208.100.72",
      "port": 4145,
      "ping": 21,
      "time": 1630973749,
      ...
    }
  ]
*/

Returns: Promise<Proxy[]>

ProxyOptions

The proxy options allows for more precise API requests. I strongly recommend using at least some.

OptionValueDescription
level'transparent', 'anonymous', 'elite'Anonymity Level
type'http', 'https', 'socks4', 'socks5'Proxy Protocol
last_checkNumberSeconds the proxy was last checked
portNumber (1 - 65535)Proxies with a specific port
pingNumberHow fast you get a response after you've sent out a request
limitNumber (1 - 20)How many proxies to list.
uptimeNumber (1 - 100)How reliably a proxy has been running
countriesstring[] (eg: 'EN', 'US')The countries the proxies must be located into.
avoidCountriesstring[] (eg: 'CN', 'NL')The countries the proxies must NOT be located into.

RequestOptions

These options are related to the way Got will handle the request.

OptionValueDescription
timeoutNumberMilliseconds to wait for the server to end the response before aborting the request.

Proxy

This is the type returned by a succesful fetch.

KeyTypeDescription
ipStringThe proxy's IP address
portNumberThe proxy's port number
pingNumberThe proxy's latency in Milliseconds (ms)
timeNumberThe timestamp of when this proxy was scanned
locationProxyLocationThe proxy's location informations
typeArray\The list of supported protocols
failedBoolWether or not scan was unsuccesful
anonimityStringThe proxy's anonimity level
workingCountNumberHow many times this proxy was succesfully tested
recheckCountNumberHow many times this proxy was checked
uptimeNumberThe uptime ration of this proxy

ProxyLocation

This types defines a proxy's location informations.

KeyTypeDescription
cityStringThe proxy's city
continentStringThe proxy's continent
countryStringThe proxy's country
countryCodeStringThe proxy's country code
ipNameStringThe ip's hostname
ipTypeStringThe ip's type
ispStringThe proxy's Internet Service Provider
latStringThe proxy's latitude
lonStringThe proxy's longitude
orgStringThe proxy's host organisation
queryStringThe query
regionStringThe proxy's region
statusStringThe localisation query status

⚠️ Disclaimer: This is not an official library, it is not supported by proxyscan.io and comes with no warranty. Use at your own risk !

2.2.1

2 years ago

2.2.3

2 years ago

2.2.2

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

2.1.2

2 years ago

2.2.0

2 years ago

2.1.1

2 years ago

2.1.0

2 years ago

2.0.0

2 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago