2、正向代理做事器真个配置比较大略,这里不在重复解释,想理解的可以看作者的另一篇文章《nginx正向代理配置》,这里只对终端代理的配置进行解释。
二、终端代理配置2.1、代理变量的配置
2.2、变量的设置方法

a) 在 /etc/profile文件
b) 在 ~/.bashrc
c) 在 /etc/profile.d/文件夹下新建一个文件xxx.sh
写入如下配置:
export proxy=\"大众http://10.20.56.32:8000\"大众export http_proxy=$proxyexport https_proxy=$proxyexport ftp_proxy=$proxyexport no_proxy=\公众localhost, 127.0.0.1, ::1\公众
2.3、取消设置的方法
shell> unset http_proxyshell> unset https_proxyshell> unset ftp_proxyshell> unset no_proxy三、延伸阅读
3.1、配置yum单独代理
shell> echo \"大众proxy=http://10.20.57.32:8080/\"大众 >> /etc/yum.conf
3.2、php-fpm默认不加载系统的http/https proxy环境变量修正方法
# 添加php-ftpm关于env的如下配置,然后重启php-fpm做事。env[http_proxy] = \"大众http_proxy=http://1.1.1.1:8082\公众env[https_proxy] = \"大众https_proxy=http://1.1.1.1:8082\"大众env[no_proxy] = \公众a.test.com,127.0.0.1,2.2.2.2\公众
3.3、subversion代理做事器配置
# 修正$HOME/.subversion/servers文件,在此文件的[global]段加上:http-proxy-host = 192.168.1.1http-proxy-port = 8080http-proxy-username = 91donkeyhttp-proxy-password = 123456
3.4、其他支持http/https正向代理的proxy软件
nginx
tinyproxy(大略,支持http/https协议)
squid(稳定大略,支持http/https协议)
3.5、squid 3.x正向代理proxy配置
shell> cat /etc/squid/squid.confhttp_access allow allhttp_port 8443cache deny all
作者:龍龍小宝
原文:https://www.cnblogs.com/91donkey/p/11640079.html