请教一个 MAC OS X 下大家都是怎么设置 Terminal 代理的 - V2EX
kbm1422
V2EX    macOS

请教一个 MAC OS X 下大家都是怎么设置 Terminal 代理的

  •  
  •   kbm1422 Jan 7, 2016 13071 views
    This topic created in 3793 days ago, the information mentioned may be changed or developed.

    例如我想用 Python 自动发邮件,,但是 STMP 是 Gmail 。

    我已经有 Shdowsocks 代理并且设置了全局代理,,还是不行。

    11 replies    2016-01-08 12:45:25 +08:00
    hrzhm
        1
    hrzhm  
       Jan 7, 2016
    #!/bin/sh

    cat <<EOF >> ~/.bash_profile
    #
    function start_tuproxy {
    export http_proxy=''
    export HTTPS_PROXY=''
    }

    function stop_tuproxy {
    export http_proxy=
    export HTTPS_PROXY=
    }
    EOF
    halfcrazy
        2
    halfcrazy  
       Jan 7, 2016
    proxychains4
    Starduster
        3
    Starduster  
       Jan 7, 2016
    proxychains4+sslocal
    publicAdmin
        4
    publicAdmin  
       Jan 7, 2016
    proxychains4+sslocal +1
    RqPS6rhmP3Nyn3Tm
        5
    RqPS6rhmP3Nyn3Tm  
       Jan 7, 2016 via Android
    @halfcrazy El Capitan 有不关 SIP 也可以使用的方法吗?
    kifile
        7
    kifile  
       Jan 7, 2016   1
    export all_proxy=socks5://127.0.0.1:1080
    xpol
        8
    xpol  
       Jan 8, 2016
    function proxy {
    case $1 in
    [1-9]*)
    export http_proxy=socks5://127.0.0.1:$1
    export https_proxy=$http_proxy
    git config --global http.proxy $http_proxy
    git config --global https.proxy $https_proxy
    ;;

    off)
    unset http_proxy
    unset https_proxy
    git config --global --unset http.proxy
    git config --global --unset https.proxy
    ;;

    la|lantern)
    export http_proxy=http://127.0.0.1:8787
    export https_proxy=$http_proxy
    git config --global http.proxy $http_proxy
    git config --global https.proxy $https_proxy
    ;;

    ss|shadowsocks)
    export http_proxy=socks5://127.0.0.1:1080
    export https_proxy=$http_proxy
    git config --global http.proxy $http_proxy
    git config --global https.proxy $https_proxy
    ;;

    pr|privoxy)
    export http_proxy=http://127.0.0.1:8118
    export https_proxy=$http_proxy
    git config --global http.proxy $http_proxy
    git config --global https.proxy $https_proxy
    ;;

    "")
    echo usage: proxy [port\|ss\|shadowsocks\|la\|lantern\|off]
    ;;
    esac

    echo http_proxy=$http_proxy
    echo https_proxy=$https_proxy
    orcusfox
        9
    orcusfox  
       Jan 8, 2016
    其实只要
    http_proxy=socks5://host:port 命令
    就可以让这条命令走代理了 http 代理也行
    RqPS6rhmP3Nyn3Tm
        10
    RqPS6rhmP3Nyn3Tm  
       Jan 8, 2016
    @187j3x1 谢谢,发现不是 SIP 的锅,其他程序代理都正常,就是 brew 特别慢, update 至少十分钟
    RqPS6rhmP3Nyn3Tm
        11
    RqPS6rhmP3Nyn3Tm  
       Jan 8, 2016
    Yosemite 正常,升级 El Capitan 之后 brew 基本属于不能用的状态
    About     Help     Advertise     Blog     API     FAQ     Solana     1319 Online   Highest 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 77ms UTC 17:17 PVG 01:17 LAX 10:17 JFK 13:17
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86