The shortest path from a fresh clone to running real programs through the chain.
podmanpodman-composemake(only if you prefermakeover the wrapper script)
./hg-proxychains upThat builds and starts the four core services:
your program ──> client ──> egressd ──> proxy1 ──> proxy2 ──> internet
egressdis the local CONNECT listener and chain supervisorproxy1andproxy2are the two upstream hops (swap them for your own)clientis the locked-down workload container withiptablesset to fail-closed andHTTP_PROXYenv pointed ategressd. This is where your programs actually run.
The chain visual prints to stderr on first start and again on every hop state change, exactly the way the original proxychains used to:
[egressd] |S-chain|proxy1:3128<->proxy2:3128<->OK
[egressd] hop_0: proxy1:3128 OK 42ms
[egressd] hop_1: proxy2:3128 OK 38ms
./hg-proxychains run -- curl -fsS https://example.com
./hg-proxychains run -- python3 -c "import urllib.request; print(urllib.request.urlopen('https://example.com').status)"Or open an interactive shell:
./hg-proxychains shell
$ curl -fsS https://example.com
$ exitThe shell is not a magic "chained shell"; it is a normal bash inside
a container whose only outbound TCP path is egressd. Direct DNS or
non-proxied TCP connections are dropped by the iptables rules
installed at startup.
./hg-proxychains status
./hg-proxychains logsstatus exec's runner.py status inside the client and also prints
the chain visual from egressd /health.
./hg-proxychains downThat runs compose down -v, removing volumes too.
The smoke harness adds FunkyDNS (DoH on 443), a searchdns helper,
and an exitserver so the run can prove the DoH and CONNECT-chain
properties end to end:
./hg-proxychains smokeThe first invocation runs make deps for you to fetch the
third_party/FunkyDNS submodule.
Edit egressd/config.json5 and replace the proxy URLs:
{
proxies: [
"http://user:pass@proxy-a.example:3128",
"http://user:pass@proxy-b.example:3128",
"http://proxy-c.example:3128",
],
chain: { canary_target: "proxy-a.example:3128" },
}Then ./hg-proxychains down && ./hg-proxychains up to apply.