Refactor: support RULE-SET as Mihomo's nameserver-policy

This commit is contained in:
SukkaW
2025-10-16 23:01:38 +08:00
parent 7aa2597641
commit f96612053e
3 changed files with 90 additions and 23 deletions

View File

@@ -35,6 +35,21 @@ export class SurgeOnlyRulesetOutput extends FileOutput {
}
}
export class MihomoNameserverPolicyOutput extends FileOutput {
constructor(
span: Span,
id: string,
type: 'non_ip' | (string & {}),
overrideOutputDir?: string
) {
super(span, id);
this.strategies = [
new ClashClassicRuleSet(type, overrideOutputDir)
];
}
}
export class ClashOnlyRulesetOutput extends FileOutput {
constructor(
span: Span,