This article is a mirror article of machine translation, please click here to jump to the original article.

View: 40|Reply: 0

Linux uses ProxyChains4 to proxy access to the specified program network

[Copy link]
Posted onThe day before yesterday at 11:15 | | | |
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.




Previous:Front-end project compilation Cannot set properties of undefined (setting 'parent')
Next:.NET/C# uses 7z (SharpSevenZip) to compress backup folders
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com