Update v1.2.0

This commit is contained in:
amurcanov
2026-05-26 22:48:52 +03:00
parent 63ba2cf1d9
commit bc0c8f5fc9
33 changed files with 1689 additions and 546 deletions
@@ -137,6 +137,15 @@ class WireGuardHelper(context: Context) {
}
}
suspend fun isTunnelUp(): Boolean = wgMutex.withLock {
val current = sharedTunnel ?: return false
return try {
backend.getState(current) == Tunnel.State.UP
} catch (e: Exception) {
false
}
}
suspend fun stopTunnel() = wgMutex.withLock {
withContext(Dispatchers.IO) {
try {