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

一、apt代理(nano /etc/apt/apt.conf)

  1. Acquire::http::proxy "http://username:[email protected]:9128";
  2. Acquire::ftp::proxy "http://username:[email protected]:9128";
  3. Acquire::https::proxy "http://username:[email protected]: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:[email protected]:9128
  4. http_proxy = http://username:[email protected]:9128
  5. ftp_proxy = http://username:[email protected]: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:[email protected]:9128"

原文作者: BG6RSH | 查看原帖

此条目发表在学习笔记分类目录。将固定链接加入收藏夹。

《linux全局、apt、wget、curl代理服务器设置》有一条回应

  1. BG6RSH说:

    三、debian全局代理(nano /etc/profile.d/proxy.sh)

    1. #!/bin/sh
    2.  
    3. # 设置 HTTP 代理
    4.  
    5. # 设置 HTTPS 代理
    6.  
    7. # 设置 FTP 代理
    8.  
    9. # 设置不需要代理的地址
    10. export NO_PROXY="localhost,127.0.0.1,10.0.0.0/8,.yourdomain.com"
    11. export no_proxy="localhost,127.0.0.1,localaddress,.yourdomain.com"

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理。