Skip to content

Commit afd44b7

Browse files
committed
refactor: adjust allowInsecure handling in MihomoGeneratorService
1 parent eda1467 commit afd44b7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/modules/subscription-template/generators/mihomo.generator.service.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -328,9 +328,6 @@ export class MihomoGeneratorService {
328328
if (alpn) {
329329
node.alpn = alpn.split(',');
330330
}
331-
if (allowInsecure) {
332-
node['skip-cert-verify'] = allowInsecure;
333-
}
334331
}
335332

336333
let netOpts: NetworkConfig = {};
@@ -366,6 +363,10 @@ export class MihomoGeneratorService {
366363
}
367364
}
368365

366+
if (allowInsecure && type !== 'ss') {
367+
node['skip-cert-verify'] = allowInsecure;
368+
}
369+
369370
node['client-fingerprint'] = clientFingerprint || 'chrome';
370371

371372
return node;

0 commit comments

Comments
 (0)