Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

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

CapabilityWhat it does
Library-first APIBroker, Proxy, pool, and connector are all public.
Anonymity classificationfind labels each HTTP proxy Transparent / Anonymous / High Anonymous.
Many protocolsHTTP, HTTPS, SOCKS4, SOCKS5, plus CONNECT:<port> tunnel checks.
Rotating proxy serverserve runs a local pool with pluggable selection strategies.
Static single binaryFully static musl build; ships in a FROM scratch Docker image.
Bundled geo dataCountry lookup via the CC BY 4.0 DB-IP database (optional feature).
Machine-readable outputJSON / NDJSON / JSON-array / CSV / URL / template formats.

The three core verbs

Everything centres on three commands (mirrored by Broker methods):

VerbCommandWhat it does
grabproxybroker grabScrape providers and emit proxies without checking them — fast, but unverified.
findproxybroker findScrape, check that each proxy works, and classify its anonymity.
serveproxybroker serveRun 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