Skip to main content

Sockrates

Every proxy must prove itself.

CI PyPI License Python Dependencies Platform

Sockrates finds open proxies — SOCKS5, SOCKS4 and HTTP/HTTPS — and cross-examines each one until it demonstrates that it reaches the target you actually care about — Telegram included, both MTProto and the Bot API.

It runs in your terminal and as a desktop app. It has no third-party dependencies.

Sockrates desktop app

$ sockrates --target telegram-mtproto --out live.txt
📥 collecting from 11 sources…
   2,518 unique in 0.6s
🎯 testing against 'telegram-mtproto' (149.154.167.51:443), strict
✅ 115 good out of 2,518 (4.52%) in 24.2s
   fastest 0.12s · median 1.82s
   9 have been working for over a day (oldest 3d)
💾 live.txt

Why the name

Socrates never accepted a claim at face value, and neither does this. Finding proxies is trivial — public lists hand you thousands in under a second. Keeping the ones that work is the entire problem, and most scrapers get it wrong in two ways:

  1. They test against the wrong thing. A proxy that loads example.com tells you nothing about whether it can reach your endpoint. Plenty of open proxies allow port 80 and refuse 443, or block particular networks outright.
  2. They believe the proxy. A SOCKS5 server can answer "connected!" to anything and hand you a socket into the void. Any list built on that is padded with entries that fail the moment you use them.

Sockrates answers both. See How it works for the full method.

the claim how Sockrates tests it
"I can reach your HTTPS endpoint" completes the TLS handshake through the proxy and checks the certificate
"I can reach Telegram" performs a real MTProto handshakereq_pq_multi in, valid resPQ back, carrying our nonce
"I'm a working proxy" is also asked to connect somewhere that must fail; anything that reports success there is discarded as a liar

How much does it matter? On the same 2,547 candidates:

check kept
TCP connect to a Telegram datacenter "succeeded" 194
…and Telegram actually answered 115

41% of them were lying. Every result records how it was proven, in verified.

Telegram is not one target

Bot API clients speak HTTPS to api.telegram.org. User clients — Telethon, the mobile apps — open raw TCP to datacenter IPs and speak MTProto. A proxy can allow one and block the other. From a single run of one list:

works for count
Bot API only 36
MTProto only 152
both 42

Test for the one you will actually use. Details in Telegram targets.

What it hands you is alive

Free proxies rot within minutes. A list written an hour ago is mostly fiction, so Sockrates never pretends otherwise:

  • --watch N re-hunts every N minutes and rewrites your file, reporting how many died since the previous run. What is on disk was verified minutes ago at worst.
  • In the app, Re-verify before every Save / Copy is on by default: the moment you export or copy, every row is tested again and the dead ones are dropped.
  • A track record. No proxy tells you its uptime — there is no such field, and any list printing one is guessing. Sockrates instead remembers what it has observed: how long it has known each proxy to work, and how many of its checks it passed. Filter on it with --min-age and --min-reliability.

Install

Debian, Ubuntu, Mint sudo apt install ./sockrates_0.4.0_all.deb
Fedora, RHEL, openSUSE sudo dnf install ./sockrates-0.4.0-1.noarch.rpm
Arch, Manjaro cd packaging && makepkg -si
Anywhere pipx install sockrates
From source git clone … && python3 sockrates.py --help

Packages are attached to every release. Python 3.9 or newer; nothing else to install. The desktop app needs Tkinter, which ships with Python but some distributions split it out (python3-tk, python3-tkinter, tk) — the packages list it as recommended, so apt/dnf will offer it.

Updating is one step, whichever way you installed it: run sockrates --update, or press Update now in the app's update dialog. It runs git pull for a checkout, pipx upgrade / pip install --upgrade for those, and prints the apt/dnf command for a system package.

Full guide: Installing

Usage

# desktop app
python3 sockrates.py --gui

# Telegram user clients / Telethon (SOCKS5)
python3 sockrates.py --target telegram-mtproto --out mtproto.txt

# every proxy type at once
python3 sockrates.py --type all --target https --out all.txt

# Telegram bots, certificate verified
python3 sockrates.py --target telegram-bot --out bots.txt

# anything else, with an optional certificate check
python3 sockrates.py --target api.example.com:443 --cert-contains example.com

# keep a file permanently true, refreshed every 10 minutes
python3 sockrates.py --target telegram-mtproto --watch 10 --out live.txt

# discover proxies by scanning a range you are allowed to test, then verify them
python3 sockrates.py --scan 203.0.113.0/24 --target telegram-mtproto --out found.txt

# only proxies we have known to work for a day and that passed 80% of our checks
python3 sockrates.py --min-age 24 --min-reliability 80 --format csv --out proven.csv

Full reference: CLI · Desktop app

Export formats

--format takes any of these, and the app offers the same list:

format what you get
plain ip:port, one per line
uri socks5://ip:port — curl, requests, ALL_PROXY
csv host, port, latency, country, proof, known-for, reliability
json full records
proxychains a block to paste under [ProxyList]
python a PROXIES = [...] list for PySocks / Telethon
curl ready-made example commands

Responsible use

These are other people's open proxies, running on machines whose owners usually have no idea. That carries obligations:

  • Anything you send unencrypted can be read, logged or modified by the operator. Use TLS end to end, and never send credentials you would mind losing.
  • Do not use them to attack, flood, or evade a ban you were given for good reason.
  • Whether scanning and using open proxies is lawful depends on where you are. Check.

By default Sockrates only connects to hosts already advertised on public proxy lists. It can also scan IP ranges you point it at (--scan), to find proxies nobody has published yet — and that power comes with a rule: only scan ranges you own or are authorised to test. Port scanning is treated as unauthorised access in some places regardless of intent. The default rate is gentle and there is no "scan the internet" switch; a /16 is the largest range it will take in one go.

Support the project

Sockrates is free and always will be. If it saved you an afternoon, a tip is welcome — one address, works on every EVM chain (Ethereum, BSC, Base, Arbitrum, Polygon, …):

0x74E71BB8849FF0e17FA73Fc61DA107032D117dF6

It is in the app too, under About, with a copy button. Starring the repo is free and helps just as much.

License

Apache License 2.0. Permissive — use it commercially, fork it, embed it — with an explicit patent grant, and no rights to the project name. See NOTICE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sockrates-0.4.0.tar.gz (41.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sockrates-0.4.0-py3-none-any.whl (39.7 kB view details)

Uploaded Python 3

File details

Details for the file sockrates-0.4.0.tar.gz.

File metadata

  • Download URL: sockrates-0.4.0.tar.gz
  • Upload date:
  • Size: 41.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for sockrates-0.4.0.tar.gz
Algorithm Hash digest
SHA256 a87a4a86dd958b0e7b6894a94a257b78efb08930f9d820acbe4e4564119c4256
MD5 9ddfb1370743e7e86c08ff82df5ba1ee
BLAKE2b-256 38e05aca238028b2dcfa91b49db4fd5f9f82905d5112a6427ed8c167a01db823

See more details on using hashes here.

Provenance

The following attestation bundles were made for sockrates-0.4.0.tar.gz:

Publisher: publish-pypi.yml on SimuZSkyNeT/sockrates

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sockrates-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: sockrates-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 39.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for sockrates-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2425deb7c8fdd105e60fb21190442815079a0494f64bf5580926d0f5deba834c
MD5 90f4010b0a0450b8254892fea72e426d
BLAKE2b-256 b1b0173df31066d73e6760792c272a24071397a1401c889de7291794f5fbe16b

See more details on using hashes here.

Provenance

The following attestation bundles were made for sockrates-0.4.0-py3-none-any.whl:

Publisher: publish-pypi.yml on SimuZSkyNeT/sockrates

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.5.0

2 files

This release

0.4.0 This release

2 files

0.3.0

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page