How to set up HTTP proxy for users on Linux

不言
Release: 2019-03-20 16:11:44
Original
7676 people have browsed it

To improve security, most organizations, companies, and institutions use proxy servers on the network to access the Internet. Using a proxy server, you can limit each user's access level as needed. In this article, we will explain how to enable HTTP proxy for users in Linux with only terminal access.

How to set up HTTP proxy for users on Linux

Enable HTTP Proxy

Log in to the user on the Linux system for which you want to enable HTTP proxy. Now edit the .bashrc or .bash_profile file in your home directory and append the following lines at the end of the file.

Anonymous proxy

http_proxy = http://10.0.0.2:8080 
export no_proxy = localhost,127.0.0.1 
export http_proxy
Copy after login

For authenticated proxy

http_proxy=http://proxyuser:password@10.0.0.2:8080
export no_proxy=localhost,127.0.0.1
export http_proxy
Copy after login

You can now save the file and reload the configuration using the following commands document. Or you can simply log out and log back into the terminal to enable the settings.

$ source~ / .bashrc 
$ source~ / .bash_profile
Copy after login

This article has ended here. For more other exciting content, you can pay attention to the Linux Tutorial Video column of the PHP Chinese website! ! !

The above is the detailed content of How to set up HTTP proxy for users on Linux. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template