首页 > 其他分享 >终端设置代理

终端设置代理

时间:2023-01-23 15:55:44浏览次数:26  
标签:127.0 http 0.1 代理 10811 proxy 设置 033 终端

cmd

set http_proxy=http://127.0.0.1:10811

set https_proxy=http://127.0.0.1:10811

  

 

bash

function on_proxy() {
    export no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com"
    export https_proxy=http://127.0.0.1:10811 http_proxy=http://127.0.0.1:10811 all_proxy=socks5://127.0.0.1:10810
    echo -e "\033[32m代理已开启\033[0m"
}

function off_proxy(){
    unset http_proxy
    unset https_proxy
    unset all_proxy
    echo -e "\033[31m代理已关闭\033[0m"
}

  

标签:127.0,http,0.1,代理,10811,proxy,设置,033,终端
From: https://www.cnblogs.com/namedlxd/p/17065242.html

相关文章