Skip to content

Instantly share code, notes, and snippets.

@wuuconix
Created April 9, 2025 02:23
Show Gist options
  • Save wuuconix/fdd30def26086ccd2beb6e4720a73b82 to your computer and use it in GitHub Desktop.
Save wuuconix/fdd30def26086ccd2beb6e4720a73b82 to your computer and use it in GitHub Desktop.
linux终端设置代理
export http_proxy="http://127.0.0.1:7890"
export https_proxy=$http_proxy
# 设置setproxy和unsetproxy 可以快捷的开关 需要时先输入命令 setproxy 不需要时输入命令 unsetproxy
alias setproxy="export http_proxy=$http_proxy; export https_proxy=$http_proxy; echo 'HTTP Proxy on';"
alias unsetproxy="unset http_proxy; unset https_proxy; echo 'HTTP Proxy off';"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment