Mac OS终端流量过代理

Written by with ♥ on in 程序员

命令:

# Terminal use VPN
alias onvpn='export http_proxy=127.0.0.1:49460;export https_proxy=$http_proxy'
alias offvpn='unset http_proxy;unset https_proxy'

将这个命令添加到环境变量中,比如.profile里
接下来在终端输入:

source ~/.profile

在终端输入onvpn开启,offvpn关闭
这里的http_proxy=127.0.0.1:49460里的49460为http和https代理的端口,比如我这里是49460
支持Mac、Linux、Unix。不支持Windows


2016gg.gificon_neutral.gificon_wink.gif2016kel.gif2016qd.gif2016tp.gificon_idea.gif2016tuu.gificon_evil.gif2016tx.gificon_mad.gificon_twisted.gificon_razz.gif2016ch.gificon_confused.gif2016qq.gif2016kb.gificon_sad.gif2016jk.gificon_exclaim.gificon_cool.gif2016db.gif2016zj.gif2016am.gif2016ka.gif2016xia.gificon_question.gif2016baojin.gif2016kun.gif2016bz.gif2016kuk.gif2016qiao.gif2016zk.gificon_biggrin.gif

Edit with markdown

已有 2 条评论

  1. A

    AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

    A July 5th, 2019 at 12:41 pm回复
    1. 青藤木子

      哈? icon_question.gif

      青藤木子 July 5th, 2019 at 03:35 pm回复

渝ICP备17015729号-1