free-proxy-checker
Advanced tools
Comparing version 1.0.1 to 1.0.2
{ | ||
"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; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 2 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
36512
14
418
91
5
4