http conversion through guides

This commit is contained in:
esefxdz committed 2026-08-01 23:55:54 +03:00
1 parent 1b8a67cecb
commit c1ec77a075
4 files changed
+13 -4

No files matched your search

+1
View File
@@ -99,3 +99,4 @@ scraped
scraped.zip scraped.zip
hivemind.zip hivemind.zip
XRAY_AUDIT.md XRAY_AUDIT.md
TECHNICAL_DEBT.md
+5 -2
View File
@@ -24,8 +24,11 @@ abstract final class AppConfig {
// These are normally overridden by /session/status response fields. // These are normally overridden by /session/status response fields.
static const String vlessSecurity = 'reality'; static const String vlessSecurity = 'reality';
static const String vlessType = 'tcp'; static const String vlessType = 'xhttp';
static const String vlessFlow = 'xtls-rprx-vision';
/// XHTTP path — must match the server's xhttpSettings.path.
/// Server default: "/revolt" (hardcoded in xray_config_reality.json).
static const String vlessPath = '/revolt';
// ── Updates ──────────────────────────────────────────────────────────── // ── Updates ────────────────────────────────────────────────────────────
/// Used by the updater. /// Used by the updater.
+6 -1
View File
@@ -75,11 +75,16 @@ class HivemindService {
final sni = data['reality_sni']; final sni = data['reality_sni'];
if (sni == null) throw Exception('Server did not provide reality_sni'); if (sni == null) throw Exception('Server did not provide reality_sni');
final fp = data['reality_fp'] ?? AppConfig.realityFp; 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' final vlessUrl = 'vless://$vlessUuid@$vlessIp:$vlessPort'
'?security=${AppConfig.vlessSecurity}' '?security=${AppConfig.vlessSecurity}'
'&type=${AppConfig.vlessType}' '&type=${AppConfig.vlessType}'
'&flow=${AppConfig.vlessFlow}' '&path=${Uri.encodeComponent(xhttpPath)}'
'&pbk=${Uri.encodeComponent(pbk)}' '&pbk=${Uri.encodeComponent(pbk)}'
'&sni=${Uri.encodeComponent(sni)}' '&sni=${Uri.encodeComponent(sni)}'
'&sid=${Uri.encodeComponent(sid)}' '&sid=${Uri.encodeComponent(sid)}'
+1 -1
View File
@@ -51,7 +51,7 @@ class VpnConnection extends ChangeNotifier {
try { try {
await _vless.initializeVless( await _vless.initializeVless(
providerBundleIdentifier: 'com.revoltvpn.app', providerBundleIdentifier: 'com.paladinvpn.app',
); );
_initialized = true; _initialized = true;
} catch (e) { } catch (e) {