分页: 1 / 1

linux全局、apt、wget、curl代理服务器设置

发表于 : 周三 5月 29, 2024 8:44 am
BG6RSH
一、apt代理(nano /etc/apt/apt.conf)
  1. Acquire::http::proxy "http://username:password@192.168.144.232:9128";
  2. Acquire::ftp::proxy "http://username:password@192.168.144.232:9128";
  3. Acquire::https::proxy "http://username:password@192.168.144.232:9128";
二、wget代理(nano /etc/wgetrc)
  1. #You can set the default proxies for Wget to use for http, https, and ftp.
  2. # They will override the value in the environment.
  3. https_proxy = http://username:password@192.168.144.232:9128
  4. http_proxy = http://username:password@192.168.144.232:9128
  5. ftp_proxy = http://username:password@192.168.144.232:9128
  6.  
  7. # If you do not want to use proxy at all, set this to off.
  8. use_proxy = on
三、curl代理 (nano ~/.curlrc)
  1. proxy="http://username:password@192.168.144.232:9128"

Re: apt、wget、curl代理服务器设置

发表于 : 周三 5月 29, 2024 9:20 am
BG6RSH
三、debian全局代理(nano /etc/profile.d/proxy.sh)
  1. export ftp_proxy=ftp://user:password@host:port
  2. export http_proxy=http://user:password@host:port
  3. export https_proxy=https://user:password@host:port
  4. export socks_proxy=https://user:password@host:port