explaingit

rofl0r/proxychains-ng

10,590CAudience · ops devopsComplexity · 3/5Setup · moderate

TLDR

A Linux command-line tool that transparently forces any program to route its network traffic through SOCKS4, SOCKS5, or HTTP proxies, the program being proxied needs no changes at all.

Mindmap

mindmap
  root((proxychains-ng))
    What it does
      Force proxy routing
      Intercept network calls
      Chain multiple proxies
      DNS through proxy
    Proxy types
      SOCKS4
      SOCKS5
      HTTP proxies
      Tor onion addresses
    Chain modes
      Fixed sequence
      Random selection
      Dynamic skip-dead
    Tech stack
      C
      LD_PRELOAD
      Unix systems
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Route a specific program's traffic through Tor without modifying or reconfiguring the program itself.

USE CASE 2

Chain multiple SOCKS5 proxies in sequence for multi-hop routing of a command-line tool's network traffic.

USE CASE 3

Redirect DNS lookups through a proxy to access Tor onion addresses from standard Linux applications.

USE CASE 4

Test how a service behaves from a different IP address by running it through a SOCKS proxy with proxychains.

Tech stack

C

Getting it running

Difficulty · moderate Time to first run · 30min

Only works with dynamically linked programs, will not proxy shell scripts, statically compiled binaries, or programs that spawn many subprocesses.

No license information was mentioned in the explanation.

In plain English

proxychains-ng is a command-line tool that forces other programs to send their network traffic through one or more proxies. You run your program through proxychains, and it intercepts the network calls the program makes, rerouting them through SOCKS4, SOCKS5, or HTTP proxies that you configure in a text file. The program being proxied does not need to know anything about proxies, proxychains handles the redirection transparently. The tool works by using a technique called LD_PRELOAD, where a shared library is loaded before the program starts and replaces certain standard networking functions. Because of this approach, it only works with programs that are dynamically linked, meaning programs compiled in a standard way on Linux and other Unix-like systems. The README is direct about this: it calls the underlying mechanism "basically a hack," and notes that it will not work with scripts, programs that spawn many background processes, or programs that load their own libraries at runtime. For those cases, it suggests using a firewall-based solution instead. You can configure proxychains to chain multiple proxies together, routing your traffic through several hops before reaching the destination. The chain can be a fixed sequence, a random selection from a list, or a dynamic mode that automatically skips proxies that are not responding. DNS lookups can also be resolved through the proxy rather than using your local DNS server, which is useful for accessing Tor onion addresses. Supported platforms are Linux, BSD, Mac, and Haiku. Installation involves a standard configure, make, and make install sequence. The project is a continuation of the original proxychains project, which is no longer maintained. The README includes a prominent warning: this tool can be used to circumvent censorship, and doing so can be dangerous in certain countries. The authors recommend always verifying that your actual IP address is hidden before relying on proxychains for anything sensitive.

Copy-paste prompts

Prompt 1
How do I install proxychains-ng from source on Ubuntu and configure it to route traffic through a local Tor SOCKS5 proxy on port 9050?
Prompt 2
I want to run curl through two SOCKS5 proxies in sequence using proxychains-ng. Show me the proxychains.conf setup and the command to run.
Prompt 3
How do I enable DNS resolution through the proxy in proxychains-ng to prevent DNS leaks that reveal my real IP?
Prompt 4
Which types of programs will not work with proxychains-ng and why? What should I use instead for those cases?
Prompt 5
Set up proxychains-ng in dynamic mode so it automatically skips proxies that are offline and falls through to the next working one.
Open on GitHub → Explain another repo

← rofl0r on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.