Skip to content

Commit 4e6d6de

Browse files
committed
fix: correct regex pattern for FlClash X detection in MihomoGeneratorService
1 parent 542285f commit 4e6d6de

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/modules/subscription-template/render-templates.service.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,11 @@ export class RenderTemplatesService {
7171

7272
case 'MIHOMO':
7373
return {
74-
sub: await this.mihomoGeneratorService.generateConfig(formattedHosts, false),
74+
sub: await this.mihomoGeneratorService.generateConfig(
75+
formattedHosts,
76+
false,
77+
/^FlClash X\//.test(userAgent),
78+
),
7579
contentType: configParams.CONTENT_TYPE,
7680
};
7781

@@ -147,7 +151,7 @@ export class RenderTemplatesService {
147151
sub: await this.mihomoGeneratorService.generateConfig(
148152
formattedHosts,
149153
false,
150-
/^FlClashX\//.test(userAgent),
154+
/^FlClash X\//.test(userAgent),
151155
),
152156
contentType: SUBSCRIPTION_CONFIG_TYPES.MIHOMO.CONTENT_TYPE,
153157
};

0 commit comments

Comments
 (0)