proxymix
Tool

Proxy checker for a whole list: live IPs and anonymity

One Node.js file checks the whole list: ip:port lines and lines with a login and password, HTTP and SOCKS5. It saves working proxies to a file from fastest to slowest and shows the exit IP and anonymity of each.

What the checker does

proxy-probe.mjs takes a list from a link or a file and requests a judge page through every line, a judge being a site that returns the headers of the request it received. The answer gives three facts about a proxy: whether it works, how long the request took and which IP the site saw.

  • Line formats: ip:port, host:port:login:password and login:password@host:port. The prefix http:// or socks5:// sets the protocol of a single line.
  • A password with a colon or @ parses correctly. The script drops duplicates and skips empty or malformed lines.
  • The script checks 150 proxies at once and waits up to 8 seconds for each, so a thousand lines fit into a minute. Parameters change both numbers.
  • Each working proxy gets an anonymity grade: high, medium or none.
  • A proxy that answered but rejected the login or password goes to a separate counter and stays out of the dead ones.
  • Working lines land in alive.txt as they were, from fastest to slowest, and the file is ready for your program. The --csv parameter adds a report with latency, exit IP and anonymity.

You need Node.js 18 or newer. There are no outside packages, only built-in modules, and all the code sits in one file. Your list stays with you: the script connects only to the proxies from the list and to the judge page.

Download and run with one command

Direct link to the file:

Download proxy-probe.mjshttps://proxymix.net/res/files/proxy-probe.mjs

Linux and macOS: the command downloads the file to the current folder and starts the check right away.

bash
wget -qO proxy-probe.mjs https://proxymix.net/res/files/proxy-probe.mjs && node proxy-probe.mjs list.txt

The same through curl, if the server has no wget:

bash
curl -fsSLo proxy-probe.mjs https://proxymix.net/res/files/proxy-probe.mjs && node proxy-probe.mjs list.txt

Without saving a file: curl passes the script straight to Node, and the arguments go after the dash.

bash
curl -fsSL https://proxymix.net/res/files/proxy-probe.mjs | node --input-type=module - list.txt

Replace list.txt with your own file or a list link.

Run options

Unlimited package: a link to the ip:port list from the dashboard, without .csv at the end, since the checker does not read the table. Keep --parallel below the package thread count, or extra connections get refused and working lines land among the dead.

bash
node proxy-probe.mjs "https://YOUR_LIST_LINK" --parallel 100

Per-GB plans: a file with host:port:login:password lines. Check SOCKS5 lines with --kind socks5.

bash
node proxy-probe.mjs http-lines.txt
node proxy-probe.mjs socks-lines.txt --kind socks5

Free proxies: a long list has many dead lines. Raise the parallelism, shorten the wait and keep only the high grade from the report.

bash
node proxy-probe.mjs free.txt --parallel 400 --wait 4 --csv report.csv
grep ',high$' report.csv | cut -d, -f1 > high.txt

A report for a spreadsheet: CSV opens in Excel and Google Sheets, with the columns proxy, ms, exit_ip, anonymity.

bash
node proxy-probe.mjs list.txt --output ok.txt --csv report.csv

Your own judge page, if httpbin.org answers slowly or is closed on your network. Any plain http address that prints the request headers will do.

bash
node proxy-probe.mjs list.txt --judge http://YOUR_SERVER/headers

What the script prints

Progress goes to stderr as one updating line. To stdout the script prints the 15 fastest proxies with latency, exit IP and grade, and the last line gives the working count. Here is a check of 38 free SOCKS5 proxies, with addresses replaced by sample ones:

output
$ node proxy-probe.mjs socks.txt --kind socks5 --csv report.csv
checking 38 proxies, 150 at a time, via httpbin.org
38/38 checked, 25 alive
198.51.100.17:1088      3497 ms  203.0.113.40    high
192.0.2.63:10461        3667 ms  198.51.100.86   high
203.0.113.109:13391     3844 ms  192.0.2.132     high
198.51.100.155:38182    3954 ms  198.51.100.155  high
203.0.113.178:80        4170 ms  203.0.113.178   high
192.0.2.201:16209       4240 ms  198.51.100.224  high
203.0.113.247:1080      4327 ms  203.0.113.247   high
192.0.2.20:1080         4340 ms  198.51.100.43   high
203.0.113.66:1026       4494 ms  192.0.2.89      high
203.0.113.66:1059       4572 ms  192.0.2.89      high
203.0.113.66:1045       4654 ms  192.0.2.89      high
203.0.113.66:1087       4666 ms  198.51.100.112  high
203.0.113.66:1099       4752 ms  198.51.100.112  high
203.0.113.135:10800     4786 ms  203.0.113.135   high
192.0.2.158:1080        4917 ms  192.0.2.158     high
25 of 38 alive, saved to alive.txt

In alive.txt the lines stay in the form they had in the list. The CSV report adds measurements to them:

files
$ head -3 alive.txt
198.51.100.17:1088
192.0.2.63:10461
203.0.113.109:13391
$ head -4 report.csv
proxy,ms,exit_ip,anonymity
198.51.100.17:1088,3497,203.0.113.40,high
192.0.2.63:10461,3667,198.51.100.86,high
203.0.113.109:13391,3844,192.0.2.132,high

Installing Node.js on a clean server

First check the version with node -v: v18 and newer will do. If Node is missing or old, install it for your system. The commands below run as root, and a regular user needs sudo before apt, dnf and bash.

Debian 12 and Ubuntu 24.04: Node from the standard repository fits.

bash
apt update && apt install -y nodejs
node -v

Ubuntu 20.04 and 22.04, Debian 11 and systems whose repository has Node older than 18: the current LTS from the NodeSource repository.

bash
apt update && apt install -y curl
curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
apt install -y nodejs
node -v

AlmaLinux, Rocky Linux and CentOS Stream:

bash
curl -fsSL https://rpm.nodesource.com/setup_22.x | bash -
dnf install -y nodejs
node -v

Running on Windows

Install Node.js LTS through winget, which ships with Windows 10 and 11. After installing, open a new terminal window so PATH updates.

PowerShell
winget install OpenJS.NodeJS.LTS

Download the script and start the check in PowerShell:

PowerShell
iwr https://proxymix.net/res/files/proxy-probe.mjs -OutFile proxy-probe.mjs -UseBasicParsing; node proxy-probe.mjs list.txt

In the cmd prompt the built-in curl works:

cmd
curl -fsSLo proxy-probe.mjs https://proxymix.net/res/files/proxy-probe.mjs && node proxy-probe.mjs list.txt

Put the list in the same folder or give the full path in quotes: node proxy-probe.mjs "C:\proxy\list.txt". The alive.txt file appears in the folder you ran the command from.

Checking on a schedule

To make your program always take live proxies, run the checker on a timer and keep the result in one permanent file. The script writes the new list to a temporary fresh.txt, then one command swaps it into alive.txt, so the program never catches the file mid-write. If no proxy survives, the script exits with code 1 and alive.txt keeps the previous list.

Linux: put the script in a separate folder and open the cron scheduler.

bash
mkdir -p /opt/probe && cd /opt/probe
wget -qO proxy-probe.mjs https://proxymix.net/res/files/proxy-probe.mjs
crontab -e

Add this line: a check every 20 minutes, flock blocks a second copy while the first runs, and the log goes to probe.log.

crontab
*/20 * * * * cd /opt/probe && flock -n probe.lock node proxy-probe.mjs "https://YOUR_LIST_LINK" --output fresh.txt >> probe.log 2>&1 && mv fresh.txt alive.txt

Windows: create the C:\probe folder and put the script there along with a run.cmd file of two lines:

run.cmd
cd /d C:\probe
node proxy-probe.mjs "https://YOUR_LIST_LINK" --output fresh.txt >> probe.log 2>&1 && move /y fresh.txt alive.txt

One command creates a task for every 20 minutes:

cmd
schtasks /create /tn "proxy-probe" /tr "C:\probe\run.cmd" /sc minute /mo 20

This task runs while you stay logged in. For a run without a login, execute the command as administrator with the /ru SYSTEM key. The % sign in the list link inside run.cmd is written twice: %%.

In your program, set alive.txt as the proxy file: /opt/probe/alive.txt on Linux, C:\probe\alive.txt on Windows. If the program can reread the file on a timer, turn that on, and fresh lines get picked up with no restart.

How anonymity is graded

Before the check, the script calls the judge directly and remembers your own address. Then it compares every answer with that address:

  • high: the judge saw neither your address nor proxy headers such as Via or X-Forwarded-For;
  • medium: your address is hidden, but the proxy gave itself away with headers;
  • none: your real address reached the judge, and the proxy only forwards traffic.

ProxyMix lists

Per-GB lines look like host:port:login:password: the login is already in the line, and the checker passes it to the proxy by itself. Check each line of these plans with the protocol it was created for.

For the checker, take the package link without .csv at the end: it needs no login, and the checker does not read the table. Access is open to the IP you added in the dashboard, so run the checker from that server. One port takes HTTP, HTTPS, SOCKS4 and SOCKS5: check with the protocol your program uses.

Checked lines from alive.txt load straight into ScrapeBox, Key Collector or code in Python.

Exit codes and messages

  • Code 0: at least one proxy works. Code 1: none works, or the list has no proxy lines.
  • Code 2: a wrong parameter, and the script prints help.
  • "judge did not answer directly": the judge page is unavailable or blocked for your machine. Pick another one, or transparent proxies will pass unnoticed.
  • "N of M lines with credentials were rejected": these proxies answered but rejected the login or password. They do not count as dead. Check the access details in your provider’s panel.

Script code

The code is fully open, so read it before running it on your server.

Show the proxy-probe.mjs code
proxy-probe.mjs
import net from 'node:net';
import { readFile, writeFile } from 'node:fs/promises';

const settings = {
  parallel: 150,
  kind: 'http',
  wait: 8,
  judge: 'http://httpbin.org/get',
  output: 'alive.txt',
  csv: '',
};

const help = `usage: node proxy-probe.mjs <list-url-or-file> [options]

  list lines     ip:port, host:port:login:password or login:password@host:port;
                 start a line with socks5:// or http:// to set its protocol,
                 colons and @ signs inside a password are fine

  --parallel N   proxies checked at the same time (150)
  --kind K       http or socks5 (http)
  --wait S       seconds per proxy (8)
  --judge URL    plain http page that echoes request headers (http://httpbin.org/get)
  --output FILE  working proxies, fastest first (alive.txt)
  --csv FILE     extra report: proxy, ms, exit ip, anonymity`;

const args = process.argv.slice(2);
const source = args.find((a, i) => !a.startsWith('--') && !(args[i - 1] || '').startsWith('--'));
for (let i = 0; i < args.length; i++) {
  const name = args[i].startsWith('--') ? args[i].slice(2) : '';
  if (name === 'help') {
    console.log(help);
    process.exit(0);
  }
  if (name in settings) settings[name] = typeof settings[name] === 'number' ? Number(args[++i]) : args[++i];
}
if (!source || !['http', 'socks5'].includes(settings.kind) || !(settings.parallel > 0) || !(settings.wait > 0)) {
  console.error(help);
  process.exit(2);
}

const judge = new URL(settings.judge);
const judgePort = Number(judge.port || 80);
const leakHeaders = /\b(via|x-forwarded-for|forwarded|x-real-ip|client-ip|x-proxy-id)\b/i;
const ipv4 = /\b(?:\d{1,3}\.){3}\d{1,3}\b/g;
const scrub = (text) => text.split(judge.hostname).join('');

const protoPrefix = /^(http|socks5h?):\/\/(.+)$/i;
const plausible = (host) => host === 'localhost' || /^[\w-]+(\.[\w-]+)+$/.test(host);
const validPort = (port) => /^\d{1,5}$/.test(port) && Number(port) > 0 && Number(port) < 65536;
const keyed = (item) => item.login !== undefined;
const label = (item) => (keyed(item) ? `${item.login}@${item.host}:${item.port}` : item.text);
const cell = (value) => (/[",\r\n]/.test(value) ? `"${value.replace(/"/g, '""')}"` : value);
const rejected = () => Object.assign(new Error('credentials rejected'), { rejected: true });

function decode(raw) {
  const text = raw.trim();
  const tagged = text.match(protoPrefix);
  const body = tagged ? tagged[2].replace(/\/+$/, '') : text;
  const kind = tagged ? (tagged[1].toLowerCase() === 'http' ? 'http' : 'socks5') : '';
  const guesses = [];
  const colonForm = body.match(/^([^:@]+):(\d+):([^:]*):(.*)$/);
  if (colonForm) guesses.push({ host: colonForm[1], port: colonForm[2], login: colonForm[3], password: colonForm[4] });
  const atForm = body.match(/^([^:]*)(?::(.*))?@([^:@]+):(\d+)$/);
  if (atForm) guesses.push({ host: atForm[3], port: atForm[4], login: atForm[1], password: atForm[2] ?? '' });
  const usable = guesses.filter((g) => validPort(g.port));
  const best = usable.find((g) => plausible(g.host)) || usable[0];
  if (best) return { text, kind, ...best, port: Number(best.port) };
  if (tagged) {
    const bare = body.match(/^([^:@/]+):(\d+)$/);
    return bare && validPort(bare[2]) ? { text, kind, host: bare[1], port: Number(bare[2]) } : null;
  }
  const [host, port] = text.split(':');
  return host && /^\d+$/.test(port || '') ? { text: `${host}:${port}`, kind, host, port: Number(port) } : null;
}

async function loadLines(from) {
  const text = /^https?:\/\//.test(from) ? await (await fetch(from)).text() : await readFile(from, 'utf8');
  const seen = new Map();
  for (const raw of text.split(/\r?\n/)) {
    const item = decode(raw);
    if (item && !seen.has(item.text)) seen.set(item.text, item);
  }
  return [...seen.values()];
}

function talk(host, port) {
  const sock = net.connect({ host, port: Number(port) });
  let buffered = Buffer.alloc(0);
  let waiter = null;
  let ended = false;
  const wake = () => waiter && waiter();
  sock.on('data', (chunk) => { buffered = Buffer.concat([buffered, chunk]); wake(); });
  sock.on('end', () => { ended = true; wake(); });
  sock.on('error', () => { ended = true; wake(); });
  sock.on('close', () => { ended = true; wake(); });
  const take = (count) => new Promise((resolve, reject) => {
    const check = () => {
      if (buffered.length >= count) {
        const part = buffered.subarray(0, count);
        buffered = buffered.subarray(count);
        waiter = null;
        resolve(part);
      } else if (ended) {
        waiter = null;
        reject(new Error('closed'));
      }
    };
    waiter = check;
    check();
  });
  const rest = () => new Promise((resolve) => {
    const check = () => { if (ended) resolve(buffered.toString('latin1')); };
    waiter = check;
    check();
  });
  const ready = new Promise((resolve, reject) => {
    sock.once('connect', resolve);
    sock.once('error', reject);
    sock.once('close', () => reject(new Error('closed')));
  });
  return { sock, take, rest, ready };
}

async function socksOpen(link, item) {
  const withLogin = keyed(item);
  link.sock.write(Buffer.from([5, 1, withLogin ? 2 : 0]));
  const hello = await link.take(2);
  if (hello[0] !== 5) throw new Error('socks reply');
  if (withLogin && hello[1] === 255) throw rejected();
  if (withLogin && hello[1] === 2) {
    const user = Buffer.from(item.login);
    const secret = Buffer.from(item.password);
    if (!user.length || user.length > 255 || secret.length > 255) throw rejected();
    link.sock.write(Buffer.concat([Buffer.from([1, user.length]), user, Buffer.from([secret.length]), secret]));
    const ack = await link.take(2);
    if (ack[1] !== 0) throw rejected();
  } else if (hello[1] !== 0) {
    throw new Error('socks auth');
  }
  const name = Buffer.from(judge.hostname);
  link.sock.write(Buffer.concat([Buffer.from([5, 1, 0, 3, name.length]), name, Buffer.from([judgePort >> 8, judgePort & 255])]));
  const head = await link.take(4);
  if (head[1] !== 0) throw new Error('socks refused');
  const tail = head[3] === 1 ? 6 : head[3] === 4 ? 18 : (await link.take(1))[0] + 2;
  await link.take(tail);
}

async function probe(item) {
  const kind = item.kind || settings.kind;
  const started = performance.now();
  const link = talk(item.host, item.port);
  const timer = setTimeout(() => link.sock.destroy(), settings.wait * 1000);
  try {
    await link.ready;
    if (kind === 'socks5') await socksOpen(link, item);
    const target = kind === 'socks5' ? judge.pathname + judge.search : judge.href;
    const pass = kind === 'http' && keyed(item)
      ? `Proxy-Authorization: Basic ${Buffer.from(`${item.login}:${item.password}`).toString('base64')}\r\n`
      : '';
    link.sock.write(`GET ${target} HTTP/1.1\r\nHost: ${judge.host}\r\nUser-Agent: proxy-probe\r\nAccept: */*\r\n${pass}Connection: close\r\n\r\n`);
    const answer = await link.rest();
    const [head, ...bodyParts] = answer.split('\r\n\r\n');
    if (pass && /^HTTP\/1\.[01] 407/.test(head)) return { item, rejected: true };
    if (!/^HTTP\/1\.[01] 200/.test(head)) return null;
    const body = bodyParts.join('\r\n\r\n');
    return { item, ms: Math.round(performance.now() - started), body };
  } catch (err) {
    return err.rejected ? { item, rejected: true } : null;
  } finally {
    clearTimeout(timer);
    link.sock.destroy();
  }
}

function grade(body, myIp) {
  const text = scrub(body);
  if (myIp && text.includes(myIp)) return 'none';
  return leakHeaders.test(text) ? 'medium' : 'high';
}

let myIp = '';
try {
  myIp = (scrub(await (await fetch(judge.href, { signal: AbortSignal.timeout(10000) })).text()).match(ipv4) || [''])[0];
} catch {
  console.error('judge did not answer directly, anonymity will not detect transparent proxies');
}

const entries = await loadLines(source);
if (!entries.length) {
  console.error('no proxy lines found in', source);
  process.exit(1);
}
const withCredentials = entries.filter(keyed).length;
console.error(`checking ${entries.length} proxies${withCredentials ? ` (${withCredentials} with credentials)` : ''}, ${settings.parallel} at a time, via ${judge.host}`);

const alive = [];
const turnedAway = [];
let cursor = 0;
let done = 0;
let lastShown = 0;
const lane = async () => {
  while (cursor < entries.length) {
    const hit = await probe(entries[cursor++]);
    done++;
    if (hit && hit.rejected) {
      turnedAway.push(hit.item);
    } else if (hit) {
      const found = scrub(hit.body).match(ipv4) || [];
      const exit = found.find((ip) => ip !== myIp) || found[0] || '';
      alive.push({ entry: hit.item.text, shown: label(hit.item), ms: hit.ms, exit, level: grade(hit.body, myIp) });
    }
    if (done - lastShown >= Math.max(1, Math.ceil(entries.length / 20)) || done === entries.length) {
      lastShown = done;
      const denied = turnedAway.length ? `, ${turnedAway.length} rejected credentials` : '';
      process.stderr.write(`\r${done}/${entries.length} checked, ${alive.length} alive${denied} `);
    }
  }
};
await Promise.all(Array.from({ length: Math.min(settings.parallel, entries.length) }, lane));
process.stderr.write('\n');

alive.sort((a, b) => a.ms - b.ms);
await writeFile(settings.output, alive.map((p) => p.entry).join('\n') + (alive.length ? '\n' : ''));
if (settings.csv) {
  const rows = ['proxy,ms,exit_ip,anonymity', ...alive.map((p) => `${cell(p.entry)},${p.ms},${p.exit},${p.level}`)];
  await writeFile(settings.csv, rows.join('\n') + '\n');
}
const top = alive.slice(0, 15);
const width = Math.max(22, ...top.map((p) => p.shown.length));
for (const p of top) console.log(`${p.shown.padEnd(width)} ${String(p.ms).padStart(5)} ms  ${p.exit.padEnd(15)} ${p.level}`);
if (turnedAway.length) {
  console.log(`${turnedAway.length} of ${withCredentials} lines with credentials were rejected, first ${label(turnedAway[0])}: check the login and password`);
}
console.log(`${alive.length} of ${entries.length} alive, saved to ${settings.output}`);
process.exit(alive.length ? 0 : 1);

What next

Need thousands of lines that do not die: build an order of the type and country you need. Free addresses by country are on the free proxies page, and the setup guides show how to load the checked file into your programs.

Questions

Questions

All questions
Does the checker work with proxies that use a login and password?

Yes. It parses host:port:login:password and login:password@host:port lines by itself. HTTP proxies get the login in the Proxy-Authorization header, SOCKS5 proxies at the authorization step. The script shows a rejected login separately from dead lines.

Does the checker send my list anywhere?

No. It talks only to the proxies from your list and to the judge page you set.

Why does the judge default to http and not https?

Through https a proxy sees only an encrypted tunnel and cannot add headers, so leaks would stay invisible. Plain http shows what the proxy changes.

Does the checker work on Windows?

Yes. Install Node.js with winget install OpenJS.NodeJS.LTS and run the script in PowerShell or cmd. Commands for both shells and a scheduler task are above on this page.

How often should I check a list on a schedule?

Free proxies live briefly, so check them every 10 to 20 minutes. An unlimited package list is fine to check once an hour. Per-GB lines lead to a gateway that picks the exit address itself, so one check after creating the list is enough.

How many lines can one run check?

The script has no limit, and it holds tens of thousands of lines in memory with ease. Estimate the time like this: divide the line count by --parallel and multiply by --wait. For 10,000 lines at 400 threads and a 4-second wait, that comes to under two minutes.

Ready to try it?

Top up your balance, create a list with the type and country you need, and test the pool on your site. A trial gigabyte costs from $0.27 and traffic lasts three months.

Build an order