proxy in linux

global proxy

in file /etc/profile set

1
2
3
4
5
export proxy="http://user:pwd1@192.168.3.1:8848"
export http_proxy=$proxy
export https_proxy=$proxy
export ftp_proxy=$proxy
export no_proxy="localhost, 127.0.0.1, ::1"

unset command

1
2
3
4
unset http_proxy
unset https_proxy
unset ftp_proxy
unset no_proxy

load variables
source /etc/profile

yum proxy

in file /etc/yum.conf set

1
2
3
proxy=http://192.168.3.1:8848
proxy_username=user
proxy_password=pwd

npm proxy

set command

1
2
npm config set proxy http://user:pwd@192.168.3.1:8848
npm confit set https-proxy http://user:pwd@192.168.3.1:8848

unset command

1
2
npm config delete proxy
npm config delete https-proxy

npm setting
https://segmentfault.com/a/1190000002589144

maven proxy

1
2
3
4
5
6
7
8
9
10
11
<proxy>
<id>optional</id>
<active>true</active>
<protocol>http</protocol>
<username>user</username>
<password>pwd</password>
<host>192.168.3.1</host>
<port>8080</port>
<nonProxyHosts>localhost|127.0.0.1</nonProxyHosts>
</proxy>
</proxies>

https://www.cnblogs.com/EasonJim/p/9826681.html
https://blog.csdn.net/yanzi1225627/article/details/80247758