Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
free-proxy-checker
Advanced tools
Library without any external dependencies to check if free HTTP/SOCKS4/SOCKS5 proxies are working/up.
NodeJS library WITHOUT any external dependencies to:
To test HTTP proxies, the library makes an HTTP CONNECT
request to the proxy host/IP
and port
.
If the request doesn't generate an error/timeout and if the status code is 200
, we consider the proxy is UP.
We do that to ignore proxies that are up but that ignore/block our request.
To test SOCKS proxies, we establish create a TCP socket using net.Socket
and try to establish a connection with the proxy.
If the connection is successful (no error and no timeout), we consider the proxy is UP.
npm install free-proxy-checker
You can find examples in the /examples
directory.
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);
})();
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.
const {HttpProxy, SocksProxy, ProxyChecker} = require('free-proxy-checker');
(async () => {
const proxies = [];
proxies.push(new HttpProxy('112.6.117.178', '8085'));
proxies.push(new SocksProxy('5.153.140.180', '4145'));
const proxyChecker = new ProxyChecker(proxies, {
concurrency: 15,
timeout: 7500,
verbose: 30
})
await proxyChecker.checkProxies();
let proxiesUp = proxyChecker.getProxiesUp();
console.log(`There are ${proxiesUp.length} proxies UP:`);
console.log(proxiesUp);
})();
For the moment the library is really basic, it only checks if a proxy is UP/DOWN. It doesn't store any data about latency. Feel free to open an issue if you have a feature request. I may add it to the library if I feel like it's relevant.
FAQs
Library without any external dependencies to check if free HTTP/SOCKS4/SOCKS5 proxies are working/up.
The npm package free-proxy-checker receives a total of 13 weekly downloads. As such, free-proxy-checker popularity was classified as not popular.
We found that free-proxy-checker demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.