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

好记性不如乱笔头,记下来总是好的。。。
回复
BG6RSH
帖子: 134
注册时间: 周日 6月 23, 2019 12:00 pm

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

帖子 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"
上次由 BG6RSH 在 周三 5月 29, 2024 9:26 am,总共编辑 1 次。
BG6RSH
帖子: 134
注册时间: 周日 6月 23, 2019 12:00 pm

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

帖子 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
回复