Introduction
proxybroker is a Rust library and command-line tool that finds, checks, and serves
public HTTP(S) and SOCKS4/5 proxies. It scrapes proxy lists from many providers, verifies
that each proxy actually works, classifies its anonymity level, and can run a local rotating
proxy server in front of the working set.
It is a from-scratch Rust/tokio rewrite of proxybroker2 (Python/asyncio), which is itself the maintained successor to the original ProxyBroker. All three are Apache-2.0; this crate is a derivative work carrying the same licence. See the Data & Licensing chapter for attribution and a statement of changes.
Why it exists
There was no Rust equivalent that shipped a real library API. The project is
library-first: everything the CLI does is available as public types, and the proxybroker
binary is a thin shell over the library. You can embed the broker, the checker, the pool, and
a drop-in rotating connector directly in your own async Rust program.
Highlights
| Capability | What it does |
|---|---|
| Library-first API | Broker, Proxy, pool, and connector are all public. |
| Anonymity classification | find labels each HTTP proxy Transparent / Anonymous / High Anonymous. |
| Many protocols | HTTP, HTTPS, SOCKS4, SOCKS5, plus CONNECT:<port> tunnel checks. |
| Rotating proxy server | serve runs a local pool with pluggable selection strategies. |
| Static single binary | Fully static musl build; ships in a FROM scratch Docker image. |
| Bundled geo data | Country lookup via the CC BY 4.0 DB-IP database (optional feature). |
| Machine-readable output | JSON / NDJSON / JSON-array / CSV / URL / template formats. |
The three core verbs
Everything centres on three commands (mirrored by Broker methods):
| Verb | Command | What it does |
|---|---|---|
| grab | proxybroker grab | Scrape providers and emit proxies without checking them — fast, but unverified. |
| find | proxybroker find | Scrape, check that each proxy works, and classify its anonymity. |
| serve | proxybroker serve | Run a local proxy server that rotates through working proxies. |
A minimal find:
proxybroker find --types HTTP HTTPS --limit 10
The same thing as a library:
#![allow(unused)]
fn main() {
use proxybroker::{Broker, FindQuery, Proto, TypeSpec};
use futures_util::StreamExt;
let broker = Broker::builder().build();
let mut stream = broker.find(
FindQuery::builder()
.types(vec![TypeSpec::any(Proto::Http)])
.limit(10)
.build(),
).await?;
while let Some(proxy) = stream.next().await {
println!("{}", proxy.addr());
}
}
Alongside the three verbs, the CLI also offers check (verify a list of
proxies you already have) and, behind build features, top (a live terminal
dashboard) and mcp (serve the live pool over MCP stdio).
How this book is organized
- Getting Started — install the CLI or library, then run the quick-start commands.
- CLI Reference — every subcommand and flag: overview & global options, grab, find, check, serve, top, mcp, and output formats.
- Library Guide — using the crate from Rust: the
broker & queries, the
Proxytype, the pool & selection, persistence, the rotating connector, and worked examples. - Architecture — how it works inside: the module map, providers & scraping, the checking pipeline, geolocation & ASN, and the feature flags.
- Reference — data & licensing and observability.
- Project — roadmap, deferred backlog, the systematic refactor design record, and contributing.