ostp/ostp-flutter
ospab e7a750dd77 fix(android): request battery-optimization exemption so Doze can't freeze the VPN
On phones the tunnel dropped quickly and never reconnected. Root cause: the app
had a foreground service and a wake lock but never asked to be exempt from
battery optimization, so Doze / App Standby froze the whole VPN process when the
screen went off. A frozen process means not just a dead socket but that the
in-process reconnect logic — wall-clock suspend detection, the NetworkChanged
handler, keepalive — never runs at all, which is exactly "reconnect doesn't
work."

Adds the REQUEST_IGNORE_BATTERY_OPTIMIZATIONS permission and, on VPN start,
prompts for the exemption when it isn't already granted (checked via
isIgnoringBatteryOptimizations, so it asks once). Fired after the VPN consent so
the two system dialogs don't stack. Socket protection on reconnect was already
correct (try_connect_transport protects every new socket), so this targets the
process-freeze, which is the part that stopped recovery.
2026-08-29 00:36:20 +03:00
..
android fix(android): request battery-optimization exemption so Doze can't freeze the VPN 2026-08-29 00:36:20 +03:00
assets feat(icons): apply logo_new.png to all apps and watermarks 2026-07-11 00:58:44 +03:00
lib feat(flutter): show app version at the bottom of the home screen 2026-08-24 14:42:47 +03:00
test feat: implement built-in DNS server, adblock and dns leak prevention 2026-06-07 19:55:42 +03:00
.gitignore Fix Tauri build args, split Android into matrix, track flutter/gui, update docs and contacts 2026-05-28 15:01:41 +03:00
.metadata Fix Tauri build args, split Android into matrix, track flutter/gui, update docs and contacts 2026-05-28 15:01:41 +03:00
README.md Fix Tauri build args, split Android into matrix, track flutter/gui, update docs and contacts 2026-05-28 15:01:41 +03:00
analysis_options.yaml Fix Tauri build args, split Android into matrix, track flutter/gui, update docs and contacts 2026-05-28 15:01:41 +03:00
android_icon.png Fix CLI setup permissions, enforce global debug tracing, and fix GUI silent startup crash 2026-06-13 01:25:54 +03:00
android_icon_backup.png Fix memory leaks, hang issues, gui helper token vulns, and log spam 2026-06-16 14:11:37 +03:00
build.ps1 §A.3: remove dead tun2socks code (native OSTP TUN is the only path) 2026-06-27 16:29:55 +03:00
build_android_jni.ps1 §A.3: remove dead tun2socks code (native OSTP TUN is the only path) 2026-06-27 16:29:55 +03:00
devtools_options.yaml Refactor: Phase 1 and 2 - Async architecture, JNI fixes, SmolTCP data races, and Tunnel optimizations 2026-06-03 02:06:06 +03:00
ostp-client-release.apk feat: implement built-in DNS server, adblock and dns leak prevention 2026-06-07 19:55:42 +03:00
pubspec.lock Fix memory leaks, hang issues, gui helper token vulns, and log spam 2026-06-16 14:11:37 +03:00
pubspec.yaml chore: release v0.4.5-beta.15 on beta 2026-08-25 10:17:42 +03:00
resize_icon.ps1 Fix memory leaks, hang issues, gui helper token vulns, and log spam 2026-06-16 14:11:37 +03:00

README.md

ostp_client

A new Flutter project.

Getting Started

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter development, view the online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.