diff --git a/.gitignore b/.gitignore index 15223c3..4d597db 100644 --- a/.gitignore +++ b/.gitignore @@ -65,6 +65,7 @@ local_packages/*/.dart_tool/ # Secrets android/key.properties android/admob.properties +SECURITY_HARDENING.md AGENTS.md SERVER_NOTES.md lib/logic/backup/ @@ -73,3 +74,4 @@ server full picture.txt technical_debt_1_answer.md technical_debt_1.md server_full_picture_2.txt +hivemind_backup.py diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts index 85659a1..4543fde 100644 --- a/android/app/build.gradle.kts +++ b/android/app/build.gradle.kts @@ -21,15 +21,6 @@ android { resources.excludes.add("META-INF/**") } - defaultConfig { - applicationId = "com.paladinvpn.app" - minSdk = flutter.minSdkVersion - targetSdk = flutter.targetSdkVersion - versionCode = flutter.versionCode - versionName = flutter.versionName - manifestPlaceholders["ADMOB_APP_ID"] = admobProperties.getProperty("ADMOB_APP_ID", "ca-app-pub-0000000000000000~0000000000") - } - val keystorePropertiesFile = rootProject.file("key.properties") val keystoreProperties = Properties() if (keystorePropertiesFile.exists()) { @@ -42,6 +33,15 @@ android { admobProperties.load(FileInputStream(admobPropertiesFile)) } + defaultConfig { + applicationId = "com.paladinvpn.app" + minSdk = flutter.minSdkVersion + targetSdk = flutter.targetSdkVersion + versionCode = flutter.versionCode + versionName = flutter.versionName + manifestPlaceholders["ADMOB_APP_ID"] = admobProperties.getProperty("ADMOB_APP_ID", "ca-app-pub-0000000000000000~0000000000") + } + signingConfigs { create("release") { keyAlias = keystoreProperties["keyAlias"] as String? diff --git a/lib/logic/session_timer.dart b/lib/logic/session_timer.dart index a8d69cb..91ef9a5 100644 --- a/lib/logic/session_timer.dart +++ b/lib/logic/session_timer.dart @@ -322,6 +322,8 @@ class SessionTimer extends ChangeNotifier { _timer?.cancel(); _timer = null; _currentSpeedKBps = 0.0; + _hasSyncedOnce = false; + _remainingSeconds = 0; notifyListeners(); } diff --git a/server_hivemind_5_0.py b/server_hivemind_5_0.py index fb2eb94..ca3031b 100644 --- a/server_hivemind_5_0.py +++ b/server_hivemind_5_0.py @@ -89,14 +89,11 @@ SERVER_PUBKEY = None # } active_sessions = {} -# Simple IP pool allocation (100 to 250) -IP_POOL_START = 100 -IP_POOL_END = 250 - -# Pre-computed pool of all available IPv4 addresses in the 10.8.0.0/16 subnet. +# Pre-computed pool of all available IPv4 addresses in the 10.8.0.0/16 subnet +# (10.8.0.0 through 10.8.255.255 = 65,534 host addresses). # Initialised once at module load; allocate_ip() pops from it, release_ip() returns to it. AVAILABLE_IPS = {str(ip) for ip in ipaddress.IPv4Network('10.8.0.0/16').hosts()} -AVAILABLE_IPS.discard('10.8.0.1') +AVAILABLE_IPS.discard('10.8.0.1') # reserved for gateway # ==============================================================================