proxychains-ng README

The project's README from github.com/rofl0r/proxychains-ng. As one markdown file: README.md.

ProxyChains-NG ver 4.17 README

ProxyChains is a UNIX program, that hooks network-related libc functions in DYNAMICALLY LINKED programs via a preloaded DLL (dlsym(), LD_PRELOAD) and redirects the connections through SOCKS4a/5 or HTTP proxies. It supports TCP only (no UDP/ICMP etc).

The way it works is basically a HACK; so it is possible that it doesn't work with your program, especially when it's a script, or starts numerous processes like background daemons or uses dlopen() to load "modules" (bug in glibc dynlinker). It should work with simple compiled (C/C++) dynamically linked programs though.

If your program doesn't work with proxychains, consider using an iptables based solution instead; this is much more robust.

Supported Platforms: Linux, BSD, Mac, Haiku.

*********** ATTENTION ***********

this program can be used to circumvent censorship. doing so can be VERY DANGEROUS in certain countries.

ALWAYS MAKE SURE THAT PROXYCHAINS WORKS AS EXPECTED BEFORE USING IT FOR ANYTHING SERIOUS.

this involves both the program and the proxy that you're going to use.

for example, you can connect to some "what is my ip" service like ifconfig.me to make sure that it's not using your real ip.

ONLY USE PROXYCHAINS IF YOU KNOW WHAT YOU'RE DOING.

THE AUTHORS AND MAINTAINERS OF PROXYCHAINS DO NOT TAKE ANY RESPONSIBILITY FOR ANY ABUSE OR MISUSE OF THIS SOFTWARE AND THE RESULTING CONSEQUENCES.

*** Installation ***

needs a working C compiler, preferably gcc

./configure --prefix=/usr --sysconfdir=/etc make [optional] sudo make install [optional] sudo make install-config (installs proxychains.conf)

if you dont install, you can use proxychains from the build directory like this: ./proxychains4 -f src/proxychains.conf telnet google.com 80

Changelog:

Version 4.17

Version 4.16

Version 4.15

Version 4.14

Version 4.13

Version 4.12

Version 4.11

Version 4.10

Version 4.9

Version 4.8.1:

Version 4.8:

Version 4.7:

Version 4.6:

Version 4.5:

Version 4.4:

Version 4.3:

Version 4.2:

Version 4.1

Version 4.0

Version 3.0

When to use it ?

  1. When the only way to get "outside" from your LAN is through proxy server.
  2. To get out from behind restrictive firewall which filters outgoing ports.
  3. To use two (or more) proxies in chain: like: your_host <--> proxy1 <--> proxy2 <--> target_host
  4. To "proxify" some program with no proxy support built-in (like telnet)
  5. Access intranet from outside via proxy.
  6. To use DNS behind proxy.
  7. To access hidden tor onion services.

Some cool features:

Configuration:

proxychains looks for config file in following order: 1) file listed in environment variable PROXYCHAINS_CONF_FILE or provided as a -f argument to proxychains script or binary. 2) ./proxychains.conf 3) $(HOME)/.proxychains/proxychains.conf 4) $(sysconfdir)/proxychains.conf **

** usually /etc/proxychains.conf

Usage Example:

$ proxychains telnet targethost.com

in this example it will run telnet through proxy(or chained proxies) specified by proxychains.conf

Usage Example:

$ proxychains -f /etc/proxychains-other.conf telnet targethost2.com

in this example it will use different configuration file then proxychains.conf to connect to targethost2.com host.

Usage Example:

$ proxyresolv targethost.com

in this example it will resolve targethost.com through proxy(or chained proxies) specified by proxychains.conf

Known Problems:

the following sites may prove useful to check for leaks: https://ipfighter.com/ https://browserleaks.com/webrtc https://dnsleaktest.com http://check.torproject.org - tor specific http://ifconfig.me - can be used via curl http://ifconfig.io/

Community:

#proxychains on irc.libera.chat

Donations:

bitcoins donations are welcome - please send to this address: 1C9LBpuy56veBqw5N33sZMoZW8mwCw3tPh

proxychains-ng (rofl0r/proxychains-ng)

Searching Database…

这是做什么用的?ProxyChains-NG 是一个 UNIX 程序,它通过 LD_PRELOAD 挂钩动态链接程序中与网络相关的 libc 函数,把程序的 TCP 连接重定向到 SOCKS4a/5 或 HTTP 代理。它是已停止维护的 proxychains 项目的延续。
所以它本身不是代理服务器——那我该怎么用?它既不是代理也不是守护进程:你在命令前面加上它,比如 proxychains telnet targethost.com,这个程序的连接就会经过你在 proxychains.conf 里列出的代理(配置文件按 $PROXYCHAINS_CONF_FILE 或 -f 参数、当前目录、~/.proxychains/、/etc 的顺序查找)。
我怎么把它跑起来?用 C 编译器(推荐 gcc)从源码构建:./configure --prefix=/usr --sysconfdir=/etc && make,然后可选执行 sudo make install 和 sudo make install-config 以得到默认的 /etc/proxychains.conf。不安装的话,也可以在构建目录里直接运行:./proxychains4 -f src/proxychains.conf telnet google.com 80。
我可以把它指向哪些代理?支持 SOCKS4、SOCKS5 和 HTTP CONNECT 服务器——SOCKS 支持用户名/密码认证,HTTP 支持基本认证。它本身不带任何代理,你需要自己提供或使用服务商的代理,而且不同类型的代理甚至可以混在同一条链里。
我用它运行任何程序都能生效吗?不行——它只挂钩 TCP(不支持 UDP/ICMP),而且由于它靠预加载来工作,简单的编译型动态链接程序没问题,但脚本、后台守护进程,以及通过 dlopen() 加载 C 模块的程序(比如 perl 或 python)可能因 glibc 的一个缺陷而失败。musl libc 不受影响。
它能在哪些系统上运行?支持的平台有 Linux、BSD、Mac 和 Haiku,后续版本还加入了对 Solaris 的支持和 Android 上的编译。在 macOS 10.11 及以上版本,SIP 会阻止挂钩系统自带程序——你必须部分禁用 SIP,或者把程序复制到你的用户目录下。
它能可靠地隐藏我的真实 IP 吗?README 警告说,在某些国家绕过网络审查可能非常危险,并提醒在正式使用之前一定要先确认它按预期工作——比如通过 ifconfig.me 这类查询本机 IP 的服务来验证。作者对滥用行为不承担任何责任。
我可以把几个代理串成一条链吗?还能混用不同类型吗?可以。一条链可以混用 SOCKS4、SOCKS5 和 HTTP 代理,串联方式包括:严格按列出顺序、随机顺序且链长可自定义、智能剔除失效代理的 dynamic 模式,以及轮询(round robin)。
DNS 查询也会走隧道吗,还是会泄露?从 4.0 版本起,DNS 通过代理解析,这样更快,还能让你在使用 Tor 时打开 .onion 地址。另外还有个 proxyresolv 辅助工具,可以把单个域名通过代理链来解析。
为什么用 NG 而不是原来的 proxychains?原项目已无人维护;NG 接续了它,此后陆续增加了远程 DNS 解析、IPv6 支持、DNAT 和 raw 代理类型,移植到 Haiku 和 Solaris,以及各种常规修复,比如针对新版 OpenSSH 的 closerange 挂钩。
能把 nmap 这类网络扫描器通过它来运行吗?通常可以:只要程序使用标准 libc 调用,大多数 TCP 客户端应用都能用,扫描器也可能可以——但基于 pcap 的扫描不行,而且较新的 nmap 版本会出问题;变通办法包括关闭代理 DNS、直接使用数字 IP,或者用 nmap 自带的 SOCKS 支持。
Creator
rofl0r
Size
0.7 MB
Stars
10.7K
Age
15y
Commits · 90 Days