fix(generator/ruleconvert): clash rule-provider without payload:
#752
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
what & why
#751
how
在判断
payload:
同级的位置增加type==RULESET_CLASH_DOMAIN
或者type=RULESET_CLASH_IPCIDR
并在确认 type 为
clash-domain
时仅仅解析为域名规则、在确认 type 为clash-ipcidr
时仅仅解析为 IP 规则test
通过这个 测试 config,无论是原本带
payload:
的 ruleset 和我希望修复的开头不带payload:
的 ruleset 都能正常解析。btw
对行单独(用正则表达式)判断是否为域名或者 IP,并在 type 为
clash-domain
时候仅解析是域名的行(IP 同理),而非和原来一样通过DOMAIN,
兜底一切行内容,或许会使程序更具鲁棒性。