How haad/proxychains works
ProxyChains is a preload-based UNIX proxying tool: a user launches a dynamically linked program through the wrapper, which selects configuration and preloads hooks that redirect networking through configured proxies. The runtime also supports proxied DNS, chained proxy types and selection modes, local-network bypasses, and destination rewriting. The excerpts show launcher setup, configuration lookup, hook initialization, proxy-chain mechanics, and DNS helpers; some hook-to-core wiring and the proxyresolv implementation are not excerpted, so those links are documented at README level or omitted.
Main entry points: libproxychains.c Preload hooks · main.c ProxyChains launcher · core.c Chain selection · common.c Config lookup
Components 15
Launch and setup
- Target program
- ProxyChains launcher
src/main.c - Config lookup
src/common.c - Proxy configuration
src/proxychains.conf
Interception and DNS
- Preload hooks
src/libproxychains.c - Config parsing
src/libproxychains.c - libc networking
- Proxied DNS
src/core.c - DNS name map
src/core.c - proxyresolv utility
src/proxyresolv
Proxy routing
- Chain selection
src/core.c - Proxy negotiation
src/core.c
Network endpoints
- Configured proxies
- Destination host
Other components
- User
Connections 18
- User → ProxyChains launcher: runs
README.md - ProxyChains launcher → Target program: executes with preload
src/main.c - ProxyChains launcher → Config lookup: resolves config
src/main.c - Config lookup → Proxy configuration: searches
src/common.c - ProxyChains launcher → Preload hooks: sets preload
src/main.c - Preload hooks → Config parsing: initializes
src/libproxychains.c - Config parsing → Proxy configuration: reads
src/libproxychains.c - Target program → libc networking: calls networking
README.md - Preload hooks → libc networking: hooks calls
README.md - Preload hooks → Chain selection: routes connections
README.md - Preload hooks → Proxied DNS: resolves names
src/libproxychains.c - Proxied DNS → DNS name map: stores name mapping
src/core.c - User → proxyresolv utility: requests lookup
README.md - proxyresolv utility → Proxied DNS: resolves through proxy
README.md - Chain selection → Configured proxies: connects via
README.md - Chain selection → Proxy negotiation: negotiates hops
src/core.c - Proxy negotiation → Destination host: requests destination
src/core.c - Configured proxies → Destination host: forwards traffic
README.md