Network Proxy 网络代理设置
export http_proxy=http://127.0.0.1:7890
export https_proxy=$http_proxy
function proxy_on() {
export http_proxy=http://127.0.0.1:7890
export https_proxy=$http_proxy
echo -e "终端代理已开启。"
}
function proxy_off(){
unset http_proxy https_proxy
echo -e "终端代理已关闭。"
}
set http_proxy=http://127.0.0.1:1080
set https_proxy=http://127.0.0.1:1080
set http_proxy=
set https_proxy=
$env:http_proxy="http://127.0.0.1:1080"
$env:https_proxy="http://127.0.0.1:1080"
$env:http_proxy=""
$env:https_proxy=""
- 查看 DNS 缓存
- 清除 DNS 缓存
- 设置代理
netsh winhttp set proxy host:port
示例:netsh winhttp set proxy 127.0.0.1:7890
- 查看代理服务器列表
- 重置代理服务器列表
netsh winhttp reset proxy