1 git + socks5
# ~/.ssh/config
# 在需要的host下设定
ProxyCommand connect-proxy -5 -R remote -S ip:port %h %p
# ~/.ssh/config
# 在需要的host下设定
ProxyCommand connect-proxy -5 -R remote -S ip:port %h %p
# ~/.ssh/config # 在需要的host下设定 ProxyCommand connect-proxy -5 -R remote -S ip:port %h %p
2 Maven + http
# ~/.m2/settings.xml
<proxies>
<proxy>
<id>nexus</id>
<active>true</active>
<protocol>http</protocol>
<username></username>
<password></password>
<host>ip</host>
<port>port</port>
<nonProxyHosts>127.0.0.1</nonProxyHosts>
</proxy>
</proxies>
# ~/.m2/settings.xml
<proxies>
<proxy>
<id>nexus</id>
<active>true</active>
<protocol>http</protocol>
<username></username>
<password></password>
<host>ip</host>
<port>port</port>
<nonProxyHosts>127.0.0.1</nonProxyHosts>
</proxy>
</proxies>
# ~/.m2/settings.xml <proxies> <proxy> <id>nexus</id> <active>true</active> <protocol>http</protocol> <username></username> <password></password> <host>ip</host> <port>port</port> <nonProxyHosts>127.0.0.1</nonProxyHosts> </proxy> </proxies>
3 terminal设置代理
alias setproxy='export ALL_PROXY=socks5://ip:port'
alias unsetproxy='unset ALL_PROXY'
alias setproxy='export ALL_PROXY=socks5://ip:port'
alias unsetproxy='unset ALL_PROXY'
alias setproxy='export ALL_PROXY=socks5://ip:port' alias unsetproxy='unset ALL_PROXY'