Anweisungen

Wie man Proxy auf dem Linux-Betriebssystem einrichtet

  • 29. Feb. 2024, 00:36
  • 1 Minute

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 ftp_proxy="http://proxy-server:port"
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 ftp_proxy="ftp://user:password@proxy-server:port"
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:

https_proxy="https://user:pass@proxy:port/"
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:

ftp_proxy="http://proxy-server:port"
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 rsync_proxy/
Unset http_proxy/
Unset ftp_proxy/
Unset http_proxy.
Probieren Sie unsere mobilen Proxys aus

Bei OnlineProxy finden Sie mobile Proxys aus der ganzen Welt mit täglicher Abrechnung ab 0,7 $ und IP-Rotation. Proxys eignen sich hervorragend für Arbeitsaufgaben. Wir garantieren Qualität oder erstatten Geld.

Anmeldung