Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

free-proxy-checker

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

free-proxy-checker - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

examples/example3-download-proxies.js

4

package.json
{
"name": "free-proxy-checker",
"version": "1.0.1",
"version": "1.0.2",
"description": "Library without any external dependencies to check if free HTTP/SOCKS4/SOCKS5 proxies are working/up.",
"main": "src/index.js",
"scripts": {},
"keywords": ["Proxy checker", "Free proxies"],
"keywords": ["Proxy checker", "Free proxies", "Download free proxies"],
"author": "Antoine Vastel",

@@ -9,0 +9,0 @@ "license": "MIT",

# free-proxy_checker
NodeJS library **WITHOUT** any external dependencies to check if free HTTP/SOCKS4/SOCKS5 proxies are working/up.
NodeJS library **WITHOUT** any external dependencies to:
- download free proxies;
- check if free HTTP/SOCKS4/SOCKS5 proxies are working/up.
**Warning:** The goal of this library is not to collect free proxies.
You can easily find them on several websites:
- https://proxyscrape.com/free-proxy-list
- https://hidemy.name/en/proxy-list/
- https://openproxy.space/list
## Proxy testing protocol

@@ -33,5 +29,36 @@

Otherwise, the code snippet below shows how you can create `HttpProxy` and `SocksProxy` to create proxy instances, and pass them to a `ProxyChecker` to verify their availability.
## Downloading and testing free proxies
```javascript
const {ProxyChecker, ProxyScrapeDownloader, FoxtoolsDownloader, FreeProxyListDownloader, downloadAllProxies} = require('free-proxy-checker');
(async () => {
// We can download proxies from a particular proxy provider, e.g. proxyscrape, foxtools or freeproxylist
const proxyScrapeDownloader = new ProxyScrapeDownloader();
const proxyScrapeProxies = await proxyScrapeDownloader.download();
const foxtoolsDownloader = new FoxtoolsDownloader();
const foxtoolsProxies = await foxtoolsDownloader.download();
// We can also download all proxies from all proxy providers at once
const allProxies = await downloadAllProxies();
// Then, we can check the availability of the proxies we downloaded
const proxyChecker = new ProxyChecker(allProxies, {
concurrency: 25,
timeout: 7500,
verbose: true
})
await proxyChecker.checkProxies();
const proxiesUp = proxyChecker.getProxiesUp();
console.log(`There are ${proxiesUp.length} proxies UP:`);
console.log(proxiesUp);
})();
```
## Testing if proxies are UP/DOWN
The code snippet below shows how you can create `HttpProxy` and `SocksProxy` to create proxy instances, and pass them to a `ProxyChecker` to verify their availability.
```javascript
const {HttpProxy, SocksProxy, ProxyChecker} = require('free-proxy-checker');

@@ -38,0 +65,0 @@

const {HttpProxy, SocksProxy} = require('./proxies.js');
const {ProxyChecker} = require('./proxyChecker.js');
const {ProxyScrapeDownloader, FreeProxyListDownloader, FoxtoolsDownloader, downloadAllProxies} = require('./proxyDownloader.js');

@@ -8,1 +9,6 @@

module.exports.ProxyChecker = ProxyChecker;
module.exports.ProxyScrapeDownloader = ProxyScrapeDownloader;
module.exports.FreeProxyListDownloader = FreeProxyListDownloader;
module.exports.FoxtoolsDownloader = FoxtoolsDownloader;
module.exports.downloadAllProxies = downloadAllProxies;
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc