diff --git a/.gitignore b/.gitignore index 50af9ff..d10bd39 100644 --- a/.gitignore +++ b/.gitignore @@ -99,3 +99,4 @@ scraped scraped.zip hivemind.zip XRAY_AUDIT.md +TECHNICAL_DEBT.md diff --git a/lib/logic/app_config.example.dart b/lib/logic/app_config.example.dart index ac88102..8c8d48e 100644 --- a/lib/logic/app_config.example.dart +++ b/lib/logic/app_config.example.dart @@ -24,8 +24,11 @@ abstract final class AppConfig { // These are normally overridden by /session/status response fields. static const String vlessSecurity = 'reality'; - static const String vlessType = 'tcp'; - static const String vlessFlow = 'xtls-rprx-vision'; + static const String vlessType = 'xhttp'; + + /// XHTTP path — must match the server's xhttpSettings.path. + /// Server default: "/revolt" (hardcoded in xray_config_reality.json). + static const String vlessPath = '/revolt'; // ── Updates ──────────────────────────────────────────────────────────── /// Used by the updater. diff --git a/lib/logic/hivemind_service.dart b/lib/logic/hivemind_service.dart index 8b8eb2f..6aa0ca2 100644 --- a/lib/logic/hivemind_service.dart +++ b/lib/logic/hivemind_service.dart @@ -75,11 +75,16 @@ class HivemindService { final sni = data['reality_sni']; if (sni == null) throw Exception('Server did not provide reality_sni'); final fp = data['reality_fp'] ?? AppConfig.realityFp; + final xhttpPath = data['xhttp_path'] ?? AppConfig.vlessPath; + // host is intentionally omitted per XHTTP docs: + // "建议没事别设" — the server doesn't set host, so it won't check. + // Client falls through: host → serverName (SNI) → address. + // With Reality SNI = github.com, the Host header blends naturally. final vlessUrl = 'vless://$vlessUuid@$vlessIp:$vlessPort' '?security=${AppConfig.vlessSecurity}' '&type=${AppConfig.vlessType}' - '&flow=${AppConfig.vlessFlow}' + '&path=${Uri.encodeComponent(xhttpPath)}' '&pbk=${Uri.encodeComponent(pbk)}' '&sni=${Uri.encodeComponent(sni)}' '&sid=${Uri.encodeComponent(sid)}' diff --git a/lib/logic/vpn_connection.dart b/lib/logic/vpn_connection.dart index 8f891fe..8fc0174 100644 --- a/lib/logic/vpn_connection.dart +++ b/lib/logic/vpn_connection.dart @@ -51,7 +51,7 @@ class VpnConnection extends ChangeNotifier { try { await _vless.initializeVless( - providerBundleIdentifier: 'com.revoltvpn.app', + providerBundleIdentifier: 'com.paladinvpn.app', ); _initialized = true; } catch (e) {