Denetleyici neler yapar
proxy-probe.mjs listeyi bağlantıdan veya dosyadan alır ve her satır üzerinden bir judge sayfası ister, yani aldığı isteğin başlıklarını döndüren bir site. Yanıt, proxy hakkında üç bilgi verir: çalışıp çalışmadığı, isteğin ne kadar sürdüğü ve sitenin hangi IP’yi gördüğü.
- Satır biçimleri:
ip:port,host:port:login:passwordvelogin:password@host:port.http://veyasocks5://öneki tek bir satırın protokolünü belirler. - İki nokta veya @ içeren parola doğru çözümlenir. Betik yinelenenleri kaldırır, boş ve biçimi bozuk satırları atlar.
- Betik aynı anda 150 proxy denetler ve her biri için en fazla 8 saniye bekler, böylece bin satır bir dakikaya sığar. Parametreler iki sayıyı da değiştirir.
- Çalışan her proxy bir anonimlik notu alır: high, medium veya none.
- Yanıt veren ama kullanıcı adını veya parolayı reddeden proxy ölülere değil ayrı bir sayaca gider.
- Çalışan satırlar
alive.txtdosyasına olduğu gibi, hızlıdan yavaşa yazılır ve dosya programınıza hemen uyar.--csvparametresi gecikme, çıkış IP’si ve anonimlik içeren bir rapor ekler.
Node.js 18 veya daha yenisi gerekir. Dış paket yoktur, yalnızca yerleşik modüller vardır ve tüm kod tek dosyadadır. Listeniz hiçbir yere gitmez: betik yalnızca listedeki proxy’lere ve judge sayfasına bağlanır.
Tek komutla indirip çalıştırma
Dosyanın doğrudan bağlantısı:
İndir proxy-probe.mjshttps://proxymix.net/res/files/proxy-probe.mjs
Linux ve macOS: komut dosyayı geçerli klasöre indirir ve denetimi hemen başlatır.
wget -qO proxy-probe.mjs https://proxymix.net/res/files/proxy-probe.mjs && node proxy-probe.mjs list.txtSunucuda wget yoksa aynısı curl ile:
curl -fsSLo proxy-probe.mjs https://proxymix.net/res/files/proxy-probe.mjs && node proxy-probe.mjs list.txtDosyayı kaydetmeden: curl betiği doğrudan Node’a verir, argümanlar tireden sonra gelir.
curl -fsSL https://proxymix.net/res/files/proxy-probe.mjs | node --input-type=module - list.txtlist.txt yerine kendi dosyanızı veya liste bağlantısını yazın.
Çalıştırma seçenekleri
Sınırsız paket: panelden ip:port listesinin bağlantısı, sonunda .csv olmadan, çünkü denetleyici tabloyu okumaz. --parallel değerini paketin thread sayısının altında tutun, yoksa fazla bağlantılar reddedilir ve çalışan satırlar ölülere karışır.
node proxy-probe.mjs "https://YOUR_LIST_LINK" --parallel 100GB başına tarifeler: host:port:login:password satırlı dosya. SOCKS5 satırlarını --kind socks5 ile denetleyin.
node proxy-probe.mjs http-lines.txt
node proxy-probe.mjs socks-lines.txt --kind socks5Ücretsiz proxy’ler: uzun listede çok ölü satır vardır. Paralelliği artırın, beklemeyi kısaltın ve rapordan yalnızca high notunu bırakın.
node proxy-probe.mjs free.txt --parallel 400 --wait 4 --csv report.csv
grep ',high$' report.csv | cut -d, -f1 > high.txtTablo için rapor: CSV, Excel ve Google Sheets’te açılır, sütunları proxy, ms, exit_ip, anonymity.
node proxy-probe.mjs list.txt --output ok.txt --csv report.csvhttpbin.org yavaş yanıt veriyorsa veya ağınızda kapalıysa kendi judge sayfanız. İstek başlıklarını yazdıran herhangi bir düz http adresi uygundur.
node proxy-probe.mjs list.txt --judge http://YOUR_SERVER/headersBetik ne yazdırır
İlerleme stderr’e güncellenen tek satır olarak gider. Betik stdout’a gecikme, çıkış IP’si ve notla en hızlı 15 proxy’yi, son satırda da çalışanların sayısını yazar. 38 ücretsiz SOCKS5 proxy denetimi böyle görünür, adresler örnekle değiştirilmiştir:
$ 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.txtalive.txt dosyasında satırlar listedeki haliyle durur. CSV raporu onlara ölçümleri ekler:
$ 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,highTemiz sunucuya Node.js kurulumu
Önce node -v ile sürümü kontrol edin: v18 ve üstü uygundur. Node yoksa veya eskiyse sisteminize uygun olanı kurun. Aşağıdaki komutlar root olarak çalışır, sıradan kullanıcının apt, dnf ve bash önüne sudo eklemesi gerekir.
Debian 12 ve Ubuntu 24.04: standart depodaki Node uygundur.
apt update && apt install -y nodejs
node -vUbuntu 20.04 ve 22.04, Debian 11 ve deposunda Node 18’den eski olan sistemler: NodeSource deposundan güncel LTS.
apt update && apt install -y curl
curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
apt install -y nodejs
node -vAlmaLinux, Rocky Linux ve CentOS Stream:
curl -fsSL https://rpm.nodesource.com/setup_22.x | bash -
dnf install -y nodejs
node -vWindows’ta çalıştırma
Node.js LTS’yi Windows 10 ve 11’de yerleşik olan winget ile kurun. Kurulumdan sonra PATH güncellensin diye yeni bir terminal penceresi açın.
winget install OpenJS.NodeJS.LTSBetiği indirip denetimi PowerShell’de başlatın:
iwr https://proxymix.net/res/files/proxy-probe.mjs -OutFile proxy-probe.mjs -UseBasicParsing; node proxy-probe.mjs list.txtcmd komut isteminde yerleşik curl çalışır:
curl -fsSLo proxy-probe.mjs https://proxymix.net/res/files/proxy-probe.mjs && node proxy-probe.mjs list.txtListeyi aynı klasöre koyun veya tam yolu tırnak içinde verin: node proxy-probe.mjs "C:\proxy\list.txt". alive.txt dosyası komutu çalıştırdığınız klasörde görünür.
Zamanlanmış denetim
Programınızın hep canlı proxy almasını istiyorsanız denetleyiciyi zamanlayıcıyla çalıştırın ve sonucu tek bir kalıcı dosyada tutun. Betik yeni listeyi geçici fresh.txt dosyasına yazar, sonra tek komut alive.txt dosyasını onunla değiştirir, böylece program dosyayı yazma ortasında yakalamaz. Hiçbir proxy kalmazsa betik 1 koduyla biter ve alive.txt önceki listeyi korur.
Linux: betiği ayrı bir klasöre koyun ve cron zamanlayıcısını açın.
mkdir -p /opt/probe && cd /opt/probe
wget -qO proxy-probe.mjs https://proxymix.net/res/files/proxy-probe.mjs
crontab -eŞu satırı ekleyin: 20 dakikada bir denetim, birinci çalışırken flock ikinci kopyayı başlatmaz, günlük probe.log dosyasına yazılır.
*/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.txtWindows: C:\probe klasörünü oluşturun, içine betiği ve iki satırlı run.cmd dosyasını koyun:
cd /d C:\probe
node proxy-probe.mjs "https://YOUR_LIST_LINK" --output fresh.txt >> probe.log 2>&1 && move /y fresh.txt alive.txt20 dakikada bir çalışan görevi tek komut oluşturur:
schtasks /create /tn "proxy-probe" /tr "C:\probe\run.cmd" /sc minute /mo 20Bu görev siz oturum açıkken çalışır. Oturum açmadan da çalışması için komutu yönetici olarak /ru SYSTEM anahtarıyla çalıştırın. run.cmd içindeki liste bağlantısında % işareti iki kez yazılır: %%.
Programda proxy dosyası olarak alive.txt belirtin: Linux’ta /opt/probe/alive.txt, Windows’ta C:\probe\alive.txt. Program dosyayı zamanlayıcıyla yeniden okuyabiliyorsa bunu açın, taze satırlar yeniden başlatmadan gelir.
Anonimlik nasıl hesaplanır
Denetimden önce betik judge sayfasına doğrudan gider ve kendi adresinizi hatırlar. Sonra her yanıtı onunla karşılaştırır:
- high: judge ne adresinizi ne de Via veya X-Forwarded-For gibi proxy başlıklarını gördü;
- medium: adresiniz gizli, ama proxy başlıklarla kendini ele verdi;
- none: gerçek adresiniz judge’a ulaştı, proxy yalnızca trafiği iletiyor.
ProxyMix listeleri
GB başına tarife satırları host:port:login:password biçimindedir: kullanıcı adı zaten satırdadır ve denetleyici onu proxy’ye kendisi iletir. Bu tarifelerin her satırını oluşturulduğu protokolle denetleyin.
Denetleyici için paketin sonunda .csv olmayan bağlantısını kullanın: kullanıcı adı gerekmez, denetleyici de tabloyu okumaz. Erişim panelde eklediğiniz IP’ye açıktır, bu yüzden denetleyiciyi o sunucudan çalıştırın. Tek port HTTP, HTTPS, SOCKS4 ve SOCKS5 kabul eder: programınızın kullandığı protokolle denetleyin.
alive.txt dosyasındaki denetlenmiş satırlar doğrudan ScrapeBox, Key Collector veya Python koduna yüklenir.
Çıkış kodları ve mesajlar
- Kod 0: en az bir proxy çalışıyor. Kod 1: hiçbiri çalışmıyor veya listede proxy satırı yok.
- Kod 2: yanlış parametre, betik yardımı yazdırır.
- "judge did not answer directly": judge sayfası makineniz için erişilemez veya engelli. Başka birini seçin, yoksa şeffaf proxy’ler fark edilmeden geçer.
- "N of M lines with credentials were rejected": bu proxy’ler yanıt verdi ama kullanıcı adını veya parolayı reddetti. Ölü sayılmazlar. Erişim bilgilerini sağlayıcının panelinde kontrol edin.
Betik kodu
Kod tamamen açıktır, sunucunuzda çalıştırmadan önce okuyun.
proxy-probe.mjs kodunu göster
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);Sırada ne var
Ölmeyen binlerce satır mı gerekiyor: gereken tür ve ülkeyle sipariş oluşturun. Ülkelere göre ücretsiz adresler ücretsiz proxy sayfasında, kurulum rehberleri ise denetlenen dosyanın programlara nasıl yükleneceğini gösterir.