Skip to content

Conversation

@ghost
Copy link

@ghost ghost commented Jan 22, 2021

添加特性:RuleSet

  • 支持多配置文件
  • 支持与其他规则配合使用
  • 支持套娃

定义一个RuleSet

{
  "tag": "rs",
  "rules" : [
    {
      "type": "field",
      "ip": [
        "8.8.8.8"
      ]
    },
    {
      "type": "field",
      "domain": [
        "domain:google.com"
      ]
    }
  ]
}

RuleObjectRuleSet使用RuleSet

{
  "type": "field",
  "ruleSet": "rs",
  "outboundTag": "outbound"
}

@AkinoKaede
Copy link
Contributor

应当保持命名风格一致,建议改成 ruleSet

@ghost ghost changed the title Add RuleSet support Add ruleSet support Jan 22, 2021
@ghost ghost changed the title Add ruleSet support Add RuleSet support Jan 22, 2021
@badO1a5A90
Copy link
Member

虽然会让路由规则更显得复杂化,但表示支持的,加入ruleset可以方便写各种组合规则。

@ghost ghost requested a review from AkinoKaede March 3, 2021 09:24
@ghost ghost closed this Mar 4, 2021
@ghost ghost reopened this Mar 4, 2021
@AkinoKaede
Copy link
Contributor

AkinoKaede commented Mar 6, 2021

cond, err := test.rule.BuildCondition()

func (rr *RoutingRule) BuildCondition(rsm *rsManager) (*ConditionChan, error) {

测试需要修下

@ghost ghost changed the title Add RuleSet support Add RuleSet Mar 6, 2021
@RPRX
Copy link
Member

RPRX commented Mar 2, 2025

咋 Xray 这边也有个 ruleSet,这东西最早是 Clash 搞的?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants