v3.0.0: domain-free client, bootstrap tunnel, tunnel-internal API

This commit is contained in:
esefxdz committed 2026-08-02 14:00:38 +03:00
1 parent 75cf59f22c
commit 4fde4a9217
6 files changed
+158 -105

No files matched your search

+22 -8
View File
@@ -9,11 +9,26 @@ abstract final class AppConfig {
/// Your server's public IP. The VPN tunnel is pinned to this.
static const String serverIp = '0.0.0.0'; // ◄── REPLACE
/// API domain for session management (TLS traffic blending).
static const String serverDomain = 'yourdomain.com'; // ◄── REPLACE
/// API base — routed through the tunnel to Flask via Xray "api" outbound.
static const String hivemindApiBase = 'http://10.254.254.1:5000/api';
/// Hivemind API base URL — standard TLS to the domain.
static String get hivemindApiBase => 'https://$serverDomain/api';
// ── Bootstrap (first-connect config fetch) ────────────────────────────
/// Hardcoded Reality config. App connects with this, fetches the real
/// per-session VLESS URL through the tunnel, then reconnects.
static String get bootstrapVlessUrl =>
'vless://$bootstrapUuid@$serverIp:8443'
'?security=reality&type=xhttp&path=/revolt'
'&pbk=$realityPbk&sni=www.github.com&sid=$realitySid&fp=chrome'
'#ReVoltVPN';
/// Generate with `xray uuid` on the server. Must match xray_config_reality.json.
static const String bootstrapUuid = '00000000-0000-0000-0000-000000000000'; // ◄── REPLACE
/// Server's Reality public key (from `xray x25519`).
static const String realityPbk = 'REPLACE_WITH_YOUR_PUBLIC_KEY';
/// Must be in xray_config_reality.json shortIds[].
static const String realitySid = 'abc123';
// ── Reality (VPN tunnel) ──────────────────────────────────────────────
/// The server picks a random SNI per session from REALITY_SNI_POOL.
@@ -26,8 +41,7 @@ abstract final class AppConfig {
static const String vlessSecurity = 'reality';
static const String vlessType = 'xhttp';
/// XHTTP path — must match the server's xhttpSettings.path.
/// Server default: "/revolt" (hardcoded in xray_config_reality.json).
/// XHTTP path — must match xray_config_reality.json xhttpSettings.path.
static const String vlessPath = '/revolt';
// ── Updates ────────────────────────────────────────────────────────────
@@ -36,9 +50,9 @@ abstract final class AppConfig {
static const String githubOwner = 'YOUR_USERNAME'; // ◄── REPLACE
static const String githubRepo = 'revoltvpn'; // ◄── REPLACE
/// Fallback URL if the GitHub API call fails — just opens the releases page.
/// Fallback URL if the GitHub API call fails.
static const String githubReleasesUrl = 'https://github.com/$githubOwner/$githubRepo/releases/latest';
// ── AdMob ──────────────────────────────────────────────────────────────
static const String adUnitId = 'ca-app-pub-0000000000000000/0000000000'; // REPLACE
}
}