Requirements: Due to network problems, the program cannot directly connect to some web services, may need to be accessed through a proxy, if the program supports setting a proxy, if it does not support setting a proxy, how to let the program access the network through the proxy without modifying the source code and recompiling?
ProxyChains
ProxyChains is a UNIX program that hooks network-related libc functions in dynamic linkers through preloaded DLLs and redirects connections via SOCKS4a/5 or HTTP proxies. proxychains themselvesYou can't transparently let the entire system traffic go to the proxy "globally"It is designed to enable proxies only for specified commands. That is, you have to add proxychains before the command for it to take effect. ProxyChains is a powerful proxy tool that helps us bypass network restrictions and access external networks securely through simple configuration.
ProxyChains vs ProxyChains4
proxychains and proxychains4 are not the same project, but they are closely related. In fact, proxychains4 is the official successor to the proxychains project (i.e. the fourth generation),
ProxyChains Source Code:The hyperlink login is visible. ProxyChains source code (fork branch, maintained by developer Haad):The hyperlink login is visible. ProxyChains4 Source Code:The hyperlink login is visible.
ProxyChains4 installation
Install ProxyChains4 using Rocky Linux release 9.5 with the following command:
As shown below:
Free proxies
The hyperlink login is visible.
The hyperlink login is visible.
The hyperlink login is visible.
The usability of the agent can be tested using the following command:
ProxyChains supports four proxy chain modes: dynamic_chain, strict_chain, round_robin_chain, and random_chain.
Configure the proxychains proxy, configuration file path:/etc/proxychains.conf, default profile:
proxychains.conf
(5.92 KB, Number of downloads: 0, Selling price: 3 Grain MB)
The amendments are as follows:
Create a new console app using .NET 8 and send a network request with the following source code:
With and without a proxy, test commands:
The difference is shown below:
Tip: You can directly enter proxychains4 bash from the command line, so that you can create a new terminal with global proxy function, no need to add proxychains4 before each command, enter exit to exit the terminal. |