APT Config
You can genrate the proxy conf in /etc/apt/apt.conf, Or in /etc/apt/apt.conf.d/proxy.conf
(1) Method-1
# vim /etc/apt/apt.conf
Acquire::http::Proxy "http://PROXYSERVERIP:PROXYPORT";
Acquire::https::Proxy "https://PROXYSERVERIP:PROXYPORT";
(2) Method-2
# vim /etc/apt/apt.conf
Acquire {
HTTP::proxy "http://PROXYSERVERIP:PROXYPORT";
HTTPS::proxy "http://PROXYSERVERIP:PROXYPORT";
}
Snapd Config
(1) Method-1
# snap set system proxy.http="http://<proxy_addr>:<proxy_port>"
# snap set system proxy.https="http://<proxy_addr>:<proxy_port>"
(2) Method-2
# vim /etc/environment
http_proxy=http://<proxy_addr>:<proxy_port>
https_proxy=http://<proxy_addr>:<proxy_port>
# systemctl restart snapd.service
(3) Method-3
# systemctl edit snapd.service
[Service]
Environment=http_proxy=http://<proxy_addr>:<proxy_port>
Environment=https_proxy=http://<proxy_addr>:<proxy_port>
# systemctl daemon-reload
# systemctl restart snapd.service
Shell Env Set
# git config --global http.proxy http:/proxy_ip:port
# git config --global https.proxy https://proxy_ip:port
Git Configure
# cat ~/.gitconfig
[http]
proxy = http://proxy_ip:port
[https]
proxy = http://proxy_ip:port
When Shadow Socks used as the proxy,so you need another method:
# cat ~/.gitconfig
[http]
proxy = socks5://proxy_ip:port
[https]
proxy = socks5://proxy_ip:port
# git config --global http.sslVerify false
# git config --global https.sslVerify false
Cargo config
debian@debian:~/Desktop$ cat ~/.cargo/config
[http]
proxy = "socks5://127.0.0.1:1080"
[https]
proxy = "socks5://127.0.0.1:1080"
Maybe, Other Proxy follows as below:
debian@debian:~/Desktop$ cat ~/.cargo/config
[http]
proxy = "http://127.0.0.1:1080"
[https]
proxy = "http://127.0.0.1:1080"
Go tools
debian@debian: http_proxy=127.0.0.1:1080 go build -o sample-controller .
debian@debian: https_proxy=127.0.0.1:1080 go build -o sample-controller .