环境变量 描述 值示例
    http_proxy 为http变量设置代理;默认不填开头以http协议传输 10.0.0.51:8080
    user:pass@10.0.0.10:8080
    socks4://10.0.0.51:1080
    socks5://192.168.1.1:1080
    https_proxy 为https变量设置代理; 同上
    ftp_proxy 为ftp变量设置代理; 同上
    all_proxy 全部变量设置代理,设置了这个时候上面的不用设置 同上
    no_proxy 无需代理的主机或域名;
    可以使用通配符;
    多个时使用“,”号分隔;
    .aiezu.com,10...,192.168..,
    *.local,localhost,127.0.0.1

    针对上面变量的设置方法:
    1、在/etc/profile文件
    2、在~/.bashrc
    3、在~/.zshrc
    4、在/etc/profile.d/文件夹下新建一个文件xxx.sh
    写入如下配置:

    1. export proxy="http://192.168.5.14:8118"
    2. export http_proxy=$proxy
    3. export https_proxy=$proxy
    4. export ftp_proxy=$proxy
    5. export no_proxy="localhost, 127.0.0.1, ::1"

    而对于要取消设置可以使用如下命令,其实也就是取消环境变量的设置:

    1. unset http_proxy
    2. unset https_proxy
    3. unset ftp_proxy
    4. unset no_proxy