feat: fix clash

This commit is contained in:
2026-04-17 22:19:12 +08:00
parent e268ed6d10
commit c3d8e1a961
7 changed files with 1368 additions and 320 deletions

View File

@@ -10,14 +10,14 @@ export function generateSurgeConfig(hostUrl: string): string {
return '# No subscription config available. Add and fetch a subscription first.';
}
// Collect enabled fetched nodes
// Collect enabled fetched nodes (exclude vless — Surge doesn't support it)
const fetchedNodes = db.prepare(
'SELECT surge_line FROM fetched_nodes WHERE enabled = 1 ORDER BY subscription_id, id'
'SELECT surge_line FROM fetched_nodes WHERE enabled = 1 AND type != \'vless\' ORDER BY subscription_id, id'
).all() as any[];
// Collect enabled static nodes (these go FIRST)
// Collect enabled static nodes (these go FIRST, exclude vless)
const staticNodes = db.prepare(
'SELECT surge_line FROM static_nodes WHERE enabled = 1 ORDER BY sort_order, id'
'SELECT surge_line FROM static_nodes WHERE enabled = 1 AND type != \'vless\' ORDER BY sort_order, id'
).all() as any[];
// Collect enabled rules