V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
Infiniture
V2EX  ›  问与答

在规则模式下,如何使用终端代理?

  •  
  •   Infiniture · 2020-10-09 11:15:06 +08:00 · 1084 次点击
    这是一个创建于 1314 天前的主题,其中的信息可能已经有所发展或是发生改变。
    每次打开终端用 brew 的时候,必须是 clash 在全局模式下 才可以,有没有办法在规则模式下使用?
    4 条回复    2020-10-09 18:00:39 +08:00
    wakzz
        1
    wakzz  
       2020-10-09 11:32:30 +08:00
    newbieRenew
        2
    newbieRenew  
       2020-10-09 11:46:03 +08:00 via iPhone
    大多数代理都提供了 Shell export command,复制,终端里粘贴一下就行了
    masker
        3
    masker  
       2020-10-09 11:48:02 +08:00 via Android
    .bashrc or .zshrc
    export 一下就好了
    HarryQu
        4
    HarryQu  
       2020-10-09 18:00:39 +08:00
    vim ~/.bash_profile,add:

    export http_proxy="http://127.0.0.1:7890"
    export https_proxy="http://127.0.0.1:7890"


    source ~/.bash_profile


    话说你 brew 为什么不用镜像呢?

    https://mirrors.tuna.tsinghua.edu.cn/help/homebrew/
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1008 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 20:22 · PVG 04:22 · LAX 13:22 · JFK 16:22
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.