跳到主要内容

Linux 代理配置

记录一下临时代理、单条命令代理和取消代理的写法。

临时代理

HTTP/HTTPS:

export http_proxy="http://127.0.0.1:61000"
export https_proxy="http://127.0.0.1:61000"

SOCKS5:

export all_proxy="socks5://127.0.0.1:61000"

对单条命令生效

http_proxy="http://127.0.0.1:61000" https_proxy="http://127.0.0.1:61000" curl -I https://example.com

取消代理

unset http_proxy https_proxy all_proxy