V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
LucasLee92
V2EX  ›  macOS

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

  •  
  •   LucasLee92 · Aug 20, 2019 · 5611 views
    This topic created in 2448 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
        1
    bearice  
       Aug 20, 2019   ❤️ 1
    alias brew='all_proxy=xxxx brew'

    另外你在网络上找网络上找不到的技巧这不是一个悖论么?
    chendy
        2
    chendy  
       Aug 20, 2019
    https_proxy 差不多够用了,配镜像配崩过,就老老实实开代理了
    Nitroethane
        3
    Nitroethane  
       Aug 20, 2019 via Android
    其实只有更新 homebrew 本身的时候比较慢,而下载二进制文件压缩包的时候是很快的(北京联通,除了那些需要在 GitHub 上下载二进制包的软件),而 homebrew 本身更新貌似是去 GitHub 更新仓库,所以我现在只给全局的 git 设置了代理
    pwrliang
        4
    pwrliang  
       Aug 20, 2019 via Android
    3.搞个透明代理的路由器
    AnyISalIn
        5
    AnyISalIn  
       Aug 20, 2019
    surge enhanced mode
    wingoo
        6
    wingoo  
       Aug 20, 2019
    proxifier
    per
        7
    per  
       Aug 20, 2019
    跑到 hk 用完再回来
    darrenfang
        8
    darrenfang  
       Aug 20, 2019
    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
        9
    monsterxx03  
       Aug 20, 2019
    自己写了个透明代理: https://github.com/monsterxx03/snet 直接本地国内外分流. Mac 用的少,测试可能不够
    wyanassert
        10
    wyanassert  
       Aug 20, 2019
    用 proxychanins-ng 启动 shell, 能够解决部分用了 all_proxy 但是没走代理的情况
    hzw1199
        11
    hzw1199  
       Aug 20, 2019 via Android
    brew 拉取都是基于 git 的,在全局 gitconfig 中加入酸酸乳代理一劳永逸,当然国内仓库也会走代理了
    Wicked
        12
    Wicked  
       Aug 20, 2019 via iPhone
    全走代理,目前没发现有啥问题
    或者可以试下前置代理,用规则过滤一下墙内 ip
    edsion996
        13
    edsion996  
       Aug 20, 2019
    https://blog.i1hao.com/2019/07/27/homebrew-tencent-mirror/

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