mirror of
https://github.com/SukkaW/Surge.git
synced 2026-01-29 01:51:52 +08:00
Refactor: support RULE-SET as Mihomo's nameserver-policy
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user