proxy-tester
Reliable proxy testing
check-proxy (un-maintained?)
This project is a fork fromLibrary consists of a server, and client. Server runs on a known IP address and client attempts to connect to server through the proxy under test.
What it does:
- Tests http, socks4 and socks5 proxies
- Tests GET, POST, COOKIES,
referer
support - Tests https support
- Provides geoIP result on proxy
- Tests proxy speed - provides total time and connect time
- Tests anonymity (binary checks - anonymous or not, 1 - anonymous, i.e. doesn't leak your IP address in any of the headers, 0 - not anonymous)
- Allows custom connectivity tests to specific websites - by custom function, regex, or substring search
Installation
npm i proxy-tester --save
Server Setup:
server.js
const express = app = bodyParser = cookieParser = getProxyType = ping ipAddress = processenvMASTER_IP || '10.0.10.150' port = processenvPORT || 8686; app;app;app;app;app;app; { console; // console.log('headers', req.headers); // console.log('cookies', req.cookies); res;}
Client Setup
client.js
const checkProxy = check;
Result (in a Promise):
[{
get: true,
post: true,
cookies: true,
referer: true,
'user-agent': true,
anonymityLevel: 1,
supportsHttps: true,
protocol: 'http',
ip: '107.151.152.218',
port: 80,
country: 'MX',
connectTime: 0.23, // Time in seconds it took to establish the connection
totalTime: 1.1, // Total transaction time in seconds for last the transfer
websites: {
google: {
"responseCode": 200,
"connectTime": 0.648131, // seconds
"totalTime": 0.890804, // seconds
"receivedLength": 1270, // bytes
"averageSpeed": 1425 // bytes per second
},
amazon: false,
ebay: {
"responseCode": 200,
"connectTime": 0.648131, // seconds
"totalTime": 0.890804, // seconds
"receivedLength": 1270, // bytes
"averageSpeed": 1425 // bytes per second
}
}
}]
Tests
mocha