Clash: [Feature] 在 Proxy-Group 中指定默认代理

创建于 2020-03-25  ·  5评论  ·  资料来源: Dreamacro/clash

您好,请问能否在Proxy-Group中加入default-proxy字段,而不是默认选取第一个?

  - name: Proxy
    type: select
    proxies:
      - ss1
      - ss2
      - vmess1
      - auto
    default: (optional)
      - auto
enhancement

最有用的评论

支持。现在modeGLOBAL时实际上是DIRECT吧?因为GLOBAL是一个Selector,而now默认是DIRECT,需要手动调用API切换到其它proxy。我说的对吗?

所有5条评论

支持。现在modeGLOBAL时实际上是DIRECT吧?因为GLOBAL是一个Selector,而now默认是DIRECT,需要手动调用API切换到其它proxy。我说的对吗?

支持。现在modeGLOBAL时实际上是DIRECT吧?因为GLOBAL是一个Selector,而now默认是DIRECT,需要手动调用API切换到其它proxy。我说的对吗?

这其实是我也想说的一个Feature,但是我的原意是设定Proxy-Group的default代理,这是在Rule模式下的。
我也支持你的看法,现在GLOBAL模式下默认选到的是DIRECT,我认为可以在config里面加上一个默认选择

我不知道以下两种方案哪一种更优,或者还有更好的方案

  - name: Main-Proxy
    type: select
    proxies:
      - ss1
      - ss2
      - vmess1
      - auto
    default: (optional)
      - auto
    global-default: true (optional)

  - name: Forward-Proxy
    type: select
    proxies:
      - ss3
      - ss4
      - auto
    default: (optional)
      - ss3
# 在这里就不指定global-default了
- global-default: Main-Proxy

十分期待这个功能

支持。现在modeGLOBAL时实际上是DIRECT吧?因为GLOBAL是一个Selector,而now默认是DIRECT,需要手动调用API切换到其它proxy。我说的对吗?

这其实是我也想说的一个Feature,但是我的原意是设定Proxy-Group的default代理,这是在Rule模式下的。
我也支持你的看法,现在GLOBAL模式下默认选到的是DIRECT,我认为可以在config里面加上一个默认选择

我不知道以下两种方案哪一种更优,或者还有更好的方案

  - name: Main-Proxy
    type: select
    proxies:
      - ss1
      - ss2
      - vmess1
      - auto
    default: (optional)
      - auto
    global-default: true (optional)

  - name: Forward-Proxy
    type: select
    proxies:
      - ss3
      - ss4
      - auto
    default: (optional)
      - ss3
# 在这里就不指定global-default了
- global-default: Main-Proxy

个人认为后者更优吧,比起在ProxyGroup里缩进填写更符合“全局”这个语义,可以让配置更有可读性

绝对是个好主意,兄弟!
期待它

此页面是否有帮助?
0 / 5 - 0 等级