Bagaimana cara mengatur proxy di sistem operasi Linux
- 29 Feb 2024, 00.37
- 1 menit
Setting up proxies on Linux
To set up proxies on Linux, you need to launch the command line and enter one of the parameters below:
export http_proxy="http://proxy-server:port"
export https_proxy="https://proxy-server:port"
export socks_proxy="socks://proxy-server:port"
In these lines, proxy-server is the IP address provided to you. And port is the assigned port. As a result, the completed line may look like this:
export https_proxy="https:"http://138.128.58.157:8000"
If authentication is required for the proxy, use the following syntax:
export http_proxy="http://user:password@proxy-server:port"
export https_proxy="https://user:password@proxy-server:port"
export socks_proxy="socks://user:password@proxy-server:port"
If the password contains special characters, they need to be replaced with ASCII codes. Here is a table where you can find them.
For example, the @ symbol should be replaced with "%40".
Another option is to configure the connection through configuration files. To do this, you need to edit the /etc/environment file with root privileges and add the syntax:
http_proxy="http://user:pass@proxy:port/"
ftp_proxy="ftp://user:pass@proxy:port/"
socks_proxy="socks://user:pass@proxy:port/"
If the proxy does not require authentication, the lines should look like this:
http_proxy="http://proxy-server:port"
https_proxy="https://proxy-server:port"
socks_proxy="socks://proxy-server:port"
After applying the settings, restart your PC and then start the init process - the main process in the system from which all child processes will receive the proxy.
Disabling proxies on Linux
To do this, enter one of the parameters in the command line:
Unset http_proxy/
Unset ftp_proxy/
Unset http_proxy.
Di OnlineProxy Anda akan menemukan proxy seluler dari seluruh dunia dengan tarif harian mulai dari $0,7 dan rotasi IP. Proksi sangat bagus untuk tugas pekerjaan. Kami menjamin kualitas atau mengembalikan uang Anda.