Powerful Local Proxy Tool: proxychains(cli)
This article was last updated 287 days ago. The information within may have evolved or changed; if anything is outdated or broken, please feel free to leave a message in the comments section.
Article Abstract
For scenarios where certain applications need to access through a proxy, proxychains implements a flexible proxy solution through local TCP connection forwarding technology. This tool supports SOCKS4/5 and HTTP/HTTPS protocols. After deployment, it takes effect simply by specifying the proxy address in the configuration file, making it especially suitable for scenarios where cloud servers access local proxies through virtual networking. Its proxy chain feature offers three modes: strict chain, dynamic chain, and random chain, among which the dynamic chain can automatically exclude faulty nodes to improve stability. In practical applications, this solution effectively solves the network restriction issue of cloud servers pulling images. Combined with tools like gost, it can build a complete proxy system, providing reliable technical support for scenarios such as home data centers.
Qwen3-14B · 2026-06-18

Preface

proxychains is a UNIX/LINUX program that redirects TCP connections of applications to specified proxy servers through secure tunnels. The protocols supported by Proxychains are SOCKS4, SOCKS5, HTTP, and HTTPS. Compared with general similar tools, the characteristic of ProxyChains is that it only forwards the TCP connections of the current application to the proxy, rather than directly implementing a global proxy. In fact, most of the time we only need some applications to go through the proxy, so ProxyChains is more in line with our general use cases.

Deployment and Basic Configuration

It can be installed on all Linux distributions. To install, type or copy the following command in the Linux terminal:

sudo apt-get install proxychains

Before using the proxychains command, you need to edit the configuration file to specify the proxy address and port:

vim /etc/proxychains.conf

Simply add the proxy server at the end, for example, adding an HTTP proxy with the address 192.168.1.1 and port 12345:

http  192.168.1.1 12345

As shown in the figure below:

image.png

Here is a usage tip, which is to use it in conjunction with virtual networking. If virtual networking software (such as tailscale) is installed on the cloud server, the cloud server can directly use the virtual networking address to access devices at home that also have virtual networking installed (and what if this home device happens to have bypass capabilities, and happens to provide proxy functions?). Therefore, you can directly specify the virtual networking address and corresponding port of the home device in the configuration file. Of course, mapping the public IP address also works, but it is not as secure as directly using the virtual networking address. In the days to come, safety first.

Using ProxyChains is very simple: just prepend proxychains before the application:

proxychains docker pull xxxx

The effect of using this method to solve the problem of cloud servers being unable to pull docker images is immediate.

You can usecurl cip.cc和proxychains curl cip.ccCompare the execution of the two commands:
This is normal access, and you can see that the returned address is directly the address of my cloud server:

image.png

But after using proxychains, the final returned address is my home broadband address:
image.png

This is because the request has been forwarded to my home proxy via the tailscale address, and when the proxy goes out from home, it naturally uses the broadband address.

As for other application scenarios, you can use your imagination.

proxychains Advanced Techniques: Proxy Chains

proxychains supports 3 types of proxy chains: strict chain (strict_chain), dynamic chain (dynamic_chain), and random chain (random_chain):

image.png

Note: You can only choose one of the above three proxy chain methods. To use one, simply uncomment it by removing the # and comment out the other two with #.
Strict Chain

A chain is formed according to the order in which the proxy servers are added in the configuration file. User requests must strictly pass through all proxy servers in that order. This method requires all proxy servers to be available, which is also the default working mode of proxychains. If in the configuration file mentioned earlier in the articleproxychains.confmore than one proxy server is added at the end, the strict chain mode will take effect. At this time, if one proxy server is unavailable, proxychains will not work properly.
Dynamic Chain

Similar to the strict chain, the dynamic chain also forms a chain according to the order in which the proxy servers are added in the configuration file. However, the difference is that if any of the proxy servers are unavailable, the dynamic chain will automatically exclude them. Therefore, as long as at least one proxy server is available, the dynamic chain can work normally.

If you want to use a proxy chain, the dynamic chain is the recommended method.
Random Chain

As the name suggests, the random chain randomly selects the proxy servers added in the configuration file. This method is suitable for network scanning.chain_lenparameter only takes effect in the random chain mode, which can define the length of the random chain, defaulting to 2.

Note: For the detailed concept and construction of proxy chains, please refer to my other article:Home Data Center Series - Using gost to Build Your Own Proxy Server and Forwarding Proxy Chains。

Afterword

Actually, this is an old article I wrote before, but it was written rather roughly. The reason I rewrote this article is that I plan to write articles about gost and Proxifier. These three software programs actually complement each other and can be called the "Three Musketeers of Proxies". So I decided to go back and reconstruct this previously written article to echo the other two articles, which also counts as churning out another post.

In addition, proxychains is a terminal-based tool, and its similar desktop-version counterpart is Proxifier. For its usage, please refer to the article:Home Data Center Series: Using Proxifier to Route Applications That Do Not Support Proxies but Need Them Through a Proxy。

View Related Categories · 3 Matches
📌 Content Structure Prompt:
This content is part of the following knowledge map, where you can view the complete content path: Blog Knowledge Map。
📎 Related Articles
Share this article
The blog content is original, please indicate the source when reposting! The RSS address of the blog is:https://blog.tangwudi.com/feed, welcome to subscribe; if needed, you can join theTelegram Groupto discuss questions together.
No Comments

Send Comment Edit Comment


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗ
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
Kaomoji
Emoji
Little Dinosaur
Flower!
Previous
Next
       

👋 Welcome to “Wudi's Personal Blog”

Here, long-term exploration is mainly carried out around the following directions:

🧱 Personal Digital Infrastructure and Blog System Construction
☁️ Cloudflare and Network Architecture Practice
🧠 AI and Knowledge System Exploration
🛡️ Network Security and Access Optimization
🎵 Music and Sound Cognition
👁️ Cognitive Perspectives and Worldviews