LucasLee92
V2EX  ›  macOS

brew 代理除了设置 all_proxy 还有什么网上找不到的技巧吗

  •  
  •   LucasLee92 · Aug 20, 2019 · 6139 views
    This topic created in 2633 days ago, the information mentioned may be changed or developed.
    1. 了解切换中科大镜像
    2. 设置 all_proxy 为了一个 brew 有点没必要
    17 replies  •  2019-08-22 09:05:45 +08:00
    bearice
    bearice
    Aug 20, 2019❤️1
    1
    alias brew='all_proxy=xxxx brew'

    另外你在网络上找网络上找不到的技巧这不是一个悖论么?
    chendy
    chendy
    Aug 20, 2019
    2
    https_proxy 差不多够用了,配镜像配崩过,就老老实实开代理了
    Nitroethane
    Nitroethane
    Aug 20, 2019 via Android
    3
    其实只有更新 homebrew 本身的时候比较慢,而下载二进制文件压缩包的时候是很快的(北京联通,除了那些需要在 GitHub 上下载二进制包的软件),而 homebrew 本身更新貌似是去 GitHub 更新仓库,所以我现在只给全局的 git 设置了代理
    pwrliang
    pwrliang
    Aug 20, 2019 via Android
    4
    3.搞个透明代理的路由器
    AnyISalIn
    AnyISalIn
    Aug 20, 2019
    5
    surge enhanced mode
    wingoo
    wingoo
    Aug 20, 2019
    6
    proxifier
    per
    per
    Aug 20, 2019
    7
    跑到 hk 用完再回来
    darrenfang
    darrenfang
    Aug 20, 2019
    8
    cat ~/.bash_profile


    #! /bin/bash

    function proxy_off(){
    unset http_proxy
    unset https_proxy
    echo -e "已关闭代理"
    }

    function proxy_on() {
    export no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com"
    export http_proxy="http://127.0.0.1:1088"
    export https_proxy=$http_proxy
    echo -e "已开启代理"
    }
    monsterxx03
    monsterxx03
    Aug 20, 2019
    9
    自己写了个透明代理: https://github.com/monsterxx03/snet 直接本地国内外分流. Mac 用的少,测试可能不够
    wyanassert
    wyanassert
    Aug 20, 2019
    10
    用 proxychanins-ng 启动 shell, 能够解决部分用了 all_proxy 但是没走代理的情况
    hzw1199
    hzw1199
    Aug 20, 2019 via Android
    11
    brew 拉取都是基于 git 的,在全局 gitconfig 中加入酸酸乳代理一劳永逸,当然国内仓库也会走代理了
    Wicked
    Wicked
    Aug 20, 2019 via iPhone
    12
    全走代理,目前没发现有啥问题
    或者可以试下前置代理,用规则过滤一下墙内 ip
    edsion996
    edsion996
    Aug 20, 2019
    13
    https://blog.i1hao.com/2019/07/27/homebrew-tencent-mirror/

    brew cask 的只能走代理,其他走腾讯云镜像
    mXw
    mXw
    Aug 20, 2019
    14
    surge 你值得拥有
    LucasLee92
    LucasLee92
    OP
    Aug 20, 2019
    15
    @bearice 这个可以,谢谢
    610915518
    610915518
    Aug 22, 2019 via iPhone
    17
    Surge +1
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1314 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 69ms · UTC 21:07 · PVG 05:07 · LAX 13:07 · JFK 16:07
    ♥ Do have faith in what you're doing.