We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
selector
urltest
1.11.x
block
reject
受上述内容启发,Selector 与 URLTest 有改造为 action 的条件:将现有的 route 动作变更为支持指定多个出站,然后通过指定 mode 的方式来决定具体使用哪一个作为出站。其中 mode 支持手动选择 selector ,自动选择 urltest 。如果可能的话可以提供更丰富的模式用于实现类似负载均衡的效果,比如提供随机选择、轮询选择、权重选择等。
Selector
URLTest
action
route
mode
{ "action": "route", "outbounds": [ // 数组长度为 1 时可以直接使用字符串 "proxy" ], "default": "", // 默认第一个出站 "mode": "", // 默认是手动选择 // ... 特定模式的额外字段 // ... 其余 route 字段 }
此方案存在一些不足:
提供一个新的类似于 selector 的负载均衡出站,并提供不同的负载均衡策略,比如随机选择、轮询选择、权重选择等。
{ "type": "balancer", "outbounds": [ "node-a", "node-b", "node-c" ], "mode": "", "default": "node-a", "interrupt_exist_connections": false, }
把 selector 作为单独的字段,其选项不再限定为节点。
{ "selectors": [ { "name": "广告过滤" "options": ["开", "关"], "default": "关" } ], "route": { "rules": [ { "selector": "广告过滤", "selector-value": "开", // ... } ] } }
目前通过 clash_mode 可以实现类似的效果,但 clash_mode 只有一个因此当用户存在多个需要手动选择的条件时会变得乏力。
clash_mode
The text was updated successfully, but these errors were encountered:
No branches or pull requests
描述
方案一:使用路由动作替代原本的
selector
urltest
出站(存在问题)1.11.x
中block
被reject
取代,但selector
似乎不支持规则动作 #2471 (comment)受上述内容启发,
Selector
与URLTest
有改造为action
的条件:将现有的route
动作变更为支持指定多个出站,然后通过指定mode
的方式来决定具体使用哪一个作为出站。其中 mode 支持手动选择selector
,自动选择urltest
。如果可能的话可以提供更丰富的模式用于实现类似负载均衡的效果,比如提供随机选择、轮询选择、权重选择等。此方案存在一些不足:
selector
目前只允许指定出站节点而无法使用其它的最终动作。action
替代出站后会导致selector
无法嵌套。方案二:提供负载均衡出站支持
提供一个新的类似于
selector
的负载均衡出站,并提供不同的负载均衡策略,比如随机选择、轮询选择、权重选择等。方案三:支持
selector
的选项作为路由条件把
selector
作为单独的字段,其选项不再限定为节点。支持我们
完整性要求
The text was updated successfully, but these errors were encountered: