mirror of
https://github.com/wgtunnel/android.git
synced 2026-07-03 14:07:49 +02:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5e4fcdc634 |
+3
-1
@@ -39,7 +39,9 @@ class RestartReceiver : BroadcastReceiver() {
|
|||||||
applicationScope.launch(ioDispatcher) {
|
applicationScope.launch(ioDispatcher) {
|
||||||
val settings = appDataRepository.settings.get()
|
val settings = appDataRepository.settings.get()
|
||||||
if (settings.isRestoreOnBootEnabled) {
|
if (settings.isRestoreOnBootEnabled) {
|
||||||
if (settings.isAutoTunnelEnabled && !serviceManager.autoTunnelActive.value) {
|
if (
|
||||||
|
settings.isAutoTunnelEnabled && serviceManager.autoTunnelService.value == null
|
||||||
|
) {
|
||||||
Timber.d("Starting auto-tunnel on boot/update")
|
Timber.d("Starting auto-tunnel on boot/update")
|
||||||
serviceManager.startAutoTunnel()
|
serviceManager.startAutoTunnel()
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
+71
-55
@@ -1,10 +1,11 @@
|
|||||||
package com.zaneschepke.wireguardautotunnel.core.service
|
package com.zaneschepke.wireguardautotunnel.core.service
|
||||||
|
|
||||||
import android.app.Service
|
import android.content.ComponentName
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
|
import android.content.ServiceConnection
|
||||||
import android.net.VpnService
|
import android.net.VpnService
|
||||||
import com.zaneschepke.wireguardautotunnel.WireGuardAutoTunnel
|
import android.os.IBinder
|
||||||
import com.zaneschepke.wireguardautotunnel.core.service.autotunnel.AutoTunnelService
|
import com.zaneschepke.wireguardautotunnel.core.service.autotunnel.AutoTunnelService
|
||||||
import com.zaneschepke.wireguardautotunnel.di.ApplicationScope
|
import com.zaneschepke.wireguardautotunnel.di.ApplicationScope
|
||||||
import com.zaneschepke.wireguardautotunnel.di.IoDispatcher
|
import com.zaneschepke.wireguardautotunnel.di.IoDispatcher
|
||||||
@@ -13,7 +14,6 @@ import com.zaneschepke.wireguardautotunnel.domain.repository.AppDataRepository
|
|||||||
import com.zaneschepke.wireguardautotunnel.util.extensions.requestAutoTunnelTileServiceUpdate
|
import com.zaneschepke.wireguardautotunnel.util.extensions.requestAutoTunnelTileServiceUpdate
|
||||||
import com.zaneschepke.wireguardautotunnel.util.extensions.requestTunnelTileServiceStateUpdate
|
import com.zaneschepke.wireguardautotunnel.util.extensions.requestTunnelTileServiceStateUpdate
|
||||||
import jakarta.inject.Inject
|
import jakarta.inject.Inject
|
||||||
import kotlinx.coroutines.CompletableDeferred
|
|
||||||
import kotlinx.coroutines.CoroutineDispatcher
|
import kotlinx.coroutines.CoroutineDispatcher
|
||||||
import kotlinx.coroutines.CoroutineScope
|
import kotlinx.coroutines.CoroutineScope
|
||||||
import kotlinx.coroutines.flow.MutableStateFlow
|
import kotlinx.coroutines.flow.MutableStateFlow
|
||||||
@@ -37,23 +37,37 @@ constructor(
|
|||||||
|
|
||||||
private val autoTunnelMutex = Mutex()
|
private val autoTunnelMutex = Mutex()
|
||||||
|
|
||||||
private val _autoTunnelActive = MutableStateFlow(false)
|
private val _tunnelService = MutableStateFlow<TunnelForegroundService?>(null)
|
||||||
val autoTunnelActive = _autoTunnelActive.asStateFlow()
|
private val _autoTunnelService = MutableStateFlow<AutoTunnelService?>(null)
|
||||||
|
val autoTunnelService = _autoTunnelService.asStateFlow()
|
||||||
|
|
||||||
var autoTunnelService = CompletableDeferred<AutoTunnelService>()
|
private val tunnelServiceConnection =
|
||||||
var backgroundService = CompletableDeferred<TunnelForegroundService>()
|
object : ServiceConnection {
|
||||||
|
override fun onServiceConnected(name: ComponentName, service: IBinder) {
|
||||||
private fun <T : Service> startService(cls: Class<T>, background: Boolean) {
|
val binder = service as? TunnelForegroundService.LocalBinder
|
||||||
runCatching {
|
_tunnelService.value = binder?.service
|
||||||
val intent = Intent(context, cls)
|
Timber.d("TunnelForegroundService connected")
|
||||||
if (background) {
|
|
||||||
context.startForegroundService(intent)
|
|
||||||
} else {
|
|
||||||
context.startService(intent)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
.onFailure { Timber.e(it) }
|
|
||||||
}
|
override fun onServiceDisconnected(name: ComponentName) {
|
||||||
|
_tunnelService.value = null
|
||||||
|
Timber.d("TunnelForegroundService disconnected")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private val autoTunnelServiceConnection =
|
||||||
|
object : ServiceConnection {
|
||||||
|
override fun onServiceConnected(name: ComponentName, service: IBinder) {
|
||||||
|
val binder = service as? AutoTunnelService.LocalBinder
|
||||||
|
_autoTunnelService.value = binder?.service
|
||||||
|
Timber.d("AutoTunnelService connected")
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onServiceDisconnected(name: ComponentName) {
|
||||||
|
_autoTunnelService.value = null
|
||||||
|
Timber.d("AutoTunnelService disconnected")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fun hasVpnPermission(): Boolean {
|
fun hasVpnPermission(): Boolean {
|
||||||
return VpnService.prepare(context) == null
|
return VpnService.prepare(context) == null
|
||||||
@@ -63,20 +77,13 @@ constructor(
|
|||||||
autoTunnelMutex.withLock {
|
autoTunnelMutex.withLock {
|
||||||
val settings = appDataRepository.settings.get()
|
val settings = appDataRepository.settings.get()
|
||||||
appDataRepository.settings.save(settings.copy(isAutoTunnelEnabled = true))
|
appDataRepository.settings.save(settings.copy(isAutoTunnelEnabled = true))
|
||||||
if (autoTunnelService.isCompleted) {
|
if (_autoTunnelService.value != null) return
|
||||||
_autoTunnelActive.update { true }
|
withContext(ioDispatcher) {
|
||||||
return
|
val intent = Intent(context, AutoTunnelService::class.java)
|
||||||
|
context.startForegroundService(intent)
|
||||||
|
context.bindService(intent, autoTunnelServiceConnection, Context.BIND_AUTO_CREATE)
|
||||||
|
withContext(mainDispatcher) { updateAutoTunnelTile() }
|
||||||
}
|
}
|
||||||
runCatching {
|
|
||||||
autoTunnelService = CompletableDeferred()
|
|
||||||
startService(AutoTunnelService::class.java, !WireGuardAutoTunnel.isForeground())
|
|
||||||
_autoTunnelActive.update { true }
|
|
||||||
}
|
|
||||||
.onFailure {
|
|
||||||
Timber.e(it)
|
|
||||||
_autoTunnelActive.update { false }
|
|
||||||
}
|
|
||||||
withContext(mainDispatcher) { updateAutoTunnelTile() }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -84,43 +91,44 @@ constructor(
|
|||||||
autoTunnelMutex.withLock {
|
autoTunnelMutex.withLock {
|
||||||
val settings = appDataRepository.settings.get()
|
val settings = appDataRepository.settings.get()
|
||||||
appDataRepository.settings.save(settings.copy(isAutoTunnelEnabled = false))
|
appDataRepository.settings.save(settings.copy(isAutoTunnelEnabled = false))
|
||||||
if (!autoTunnelService.isCompleted) return
|
if (_autoTunnelService.value == null) return
|
||||||
runCatching {
|
_autoTunnelService.value?.let { service ->
|
||||||
val service = autoTunnelService.await()
|
service.stop()
|
||||||
service.stop()
|
try {
|
||||||
_autoTunnelActive.update { false }
|
context.unbindService(autoTunnelServiceConnection)
|
||||||
autoTunnelService = CompletableDeferred()
|
} finally {
|
||||||
|
_tunnelService.value = null
|
||||||
}
|
}
|
||||||
.onFailure { Timber.e(it) }
|
}
|
||||||
withContext(mainDispatcher) { updateAutoTunnelTile() }
|
withContext(mainDispatcher) { updateAutoTunnelTile() }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun startTunnelForegroundService() {
|
suspend fun startTunnelForegroundService() {
|
||||||
if (backgroundService.isCompleted) return
|
if (_tunnelService.value != null) return
|
||||||
runCatching {
|
withContext(ioDispatcher) {
|
||||||
backgroundService = CompletableDeferred()
|
applicationScope.launch(ioDispatcher) {
|
||||||
startService(
|
val intent = Intent(context, TunnelForegroundService::class.java)
|
||||||
TunnelForegroundService::class.java,
|
context.startForegroundService(intent)
|
||||||
!WireGuardAutoTunnel.isForeground(),
|
context.bindService(intent, tunnelServiceConnection, Context.BIND_AUTO_CREATE)
|
||||||
)
|
|
||||||
}
|
}
|
||||||
.onFailure { Timber.e(it) }
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun stopTunnelForegroundService() {
|
fun stopTunnelForegroundService() {
|
||||||
if (!backgroundService.isCompleted) return
|
_tunnelService.value?.let { service ->
|
||||||
runCatching {
|
service.stop()
|
||||||
val service = backgroundService.await()
|
try {
|
||||||
service.stop()
|
context.unbindService(tunnelServiceConnection)
|
||||||
backgroundService = CompletableDeferred()
|
} finally {
|
||||||
|
_tunnelService.value = null
|
||||||
}
|
}
|
||||||
.onFailure { Timber.e(it) }
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun toggleAutoTunnel() {
|
fun toggleAutoTunnel() {
|
||||||
applicationScope.launch(ioDispatcher) {
|
applicationScope.launch(ioDispatcher) {
|
||||||
if (_autoTunnelActive.value) stopAutoTunnel() else startAutoTunnel()
|
if (_autoTunnelService.value != null) stopAutoTunnel() else startAutoTunnel()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -131,4 +139,12 @@ constructor(
|
|||||||
fun updateTunnelTile() {
|
fun updateTunnelTile() {
|
||||||
context.requestTunnelTileServiceStateUpdate()
|
context.requestTunnelTileServiceStateUpdate()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun handleTunnelServiceDestroy() {
|
||||||
|
_tunnelService.update { null }
|
||||||
|
}
|
||||||
|
|
||||||
|
fun handleAutoTunnelServiceDestroy() {
|
||||||
|
_autoTunnelService.update { null }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+8
-6
@@ -2,6 +2,7 @@ package com.zaneschepke.wireguardautotunnel.core.service
|
|||||||
|
|
||||||
import android.app.Notification
|
import android.app.Notification
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
|
import android.os.Binder
|
||||||
import android.os.IBinder
|
import android.os.IBinder
|
||||||
import androidx.core.app.ServiceCompat
|
import androidx.core.app.ServiceCompat
|
||||||
import androidx.lifecycle.LifecycleService
|
import androidx.lifecycle.LifecycleService
|
||||||
@@ -23,7 +24,6 @@ import com.zaneschepke.wireguardautotunnel.util.extensions.distinctByKeys
|
|||||||
import dagger.hilt.android.AndroidEntryPoint
|
import dagger.hilt.android.AndroidEntryPoint
|
||||||
import java.util.concurrent.ConcurrentHashMap
|
import java.util.concurrent.ConcurrentHashMap
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
import kotlinx.coroutines.CompletableDeferred
|
|
||||||
import kotlinx.coroutines.CoroutineDispatcher
|
import kotlinx.coroutines.CoroutineDispatcher
|
||||||
import kotlinx.coroutines.Job
|
import kotlinx.coroutines.Job
|
||||||
import kotlinx.coroutines.NonCancellable
|
import kotlinx.coroutines.NonCancellable
|
||||||
@@ -64,9 +64,12 @@ class TunnelForegroundService : LifecycleService() {
|
|||||||
|
|
||||||
private val jobsMutex = Mutex()
|
private val jobsMutex = Mutex()
|
||||||
|
|
||||||
|
class LocalBinder(val service: TunnelForegroundService) : Binder()
|
||||||
|
|
||||||
|
private val binder = LocalBinder(this)
|
||||||
|
|
||||||
override fun onCreate() {
|
override fun onCreate() {
|
||||||
super.onCreate()
|
super.onCreate()
|
||||||
serviceManager.backgroundService.complete(this)
|
|
||||||
ServiceCompat.startForeground(
|
ServiceCompat.startForeground(
|
||||||
this@TunnelForegroundService,
|
this@TunnelForegroundService,
|
||||||
NotificationManager.VPN_NOTIFICATION_ID,
|
NotificationManager.VPN_NOTIFICATION_ID,
|
||||||
@@ -75,14 +78,13 @@ class TunnelForegroundService : LifecycleService() {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onBind(intent: Intent): IBinder? {
|
override fun onBind(intent: Intent): IBinder {
|
||||||
super.onBind(intent)
|
super.onBind(intent)
|
||||||
return null
|
return binder
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
|
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
|
||||||
super.onStartCommand(intent, flags, startId)
|
super.onStartCommand(intent, flags, startId)
|
||||||
serviceManager.backgroundService.complete(this)
|
|
||||||
ServiceCompat.startForeground(
|
ServiceCompat.startForeground(
|
||||||
this@TunnelForegroundService,
|
this@TunnelForegroundService,
|
||||||
NotificationManager.VPN_NOTIFICATION_ID,
|
NotificationManager.VPN_NOTIFICATION_ID,
|
||||||
@@ -273,7 +275,7 @@ class TunnelForegroundService : LifecycleService() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun onDestroy() {
|
override fun onDestroy() {
|
||||||
serviceManager.backgroundService = CompletableDeferred()
|
serviceManager.handleTunnelServiceDestroy()
|
||||||
ServiceCompat.stopForeground(this, ServiceCompat.STOP_FOREGROUND_REMOVE)
|
ServiceCompat.stopForeground(this, ServiceCompat.STOP_FOREGROUND_REMOVE)
|
||||||
super.onDestroy()
|
super.onDestroy()
|
||||||
}
|
}
|
||||||
|
|||||||
+8
-6
@@ -1,6 +1,7 @@
|
|||||||
package com.zaneschepke.wireguardautotunnel.core.service.autotunnel
|
package com.zaneschepke.wireguardautotunnel.core.service.autotunnel
|
||||||
|
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
|
import android.os.Binder
|
||||||
import android.os.IBinder
|
import android.os.IBinder
|
||||||
import android.os.PowerManager
|
import android.os.PowerManager
|
||||||
import androidx.core.app.ServiceCompat
|
import androidx.core.app.ServiceCompat
|
||||||
@@ -28,7 +29,6 @@ import com.zaneschepke.wireguardautotunnel.util.extensions.Tunnels
|
|||||||
import dagger.hilt.android.AndroidEntryPoint
|
import dagger.hilt.android.AndroidEntryPoint
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
import javax.inject.Provider
|
import javax.inject.Provider
|
||||||
import kotlinx.coroutines.CompletableDeferred
|
|
||||||
import kotlinx.coroutines.CoroutineDispatcher
|
import kotlinx.coroutines.CoroutineDispatcher
|
||||||
import kotlinx.coroutines.ExperimentalCoroutinesApi
|
import kotlinx.coroutines.ExperimentalCoroutinesApi
|
||||||
import kotlinx.coroutines.FlowPreview
|
import kotlinx.coroutines.FlowPreview
|
||||||
@@ -68,21 +68,23 @@ class AutoTunnelService : LifecycleService() {
|
|||||||
|
|
||||||
private var killSwitchJob: Job? = null
|
private var killSwitchJob: Job? = null
|
||||||
|
|
||||||
|
class LocalBinder(val service: AutoTunnelService) : Binder()
|
||||||
|
|
||||||
|
private val binder = LocalBinder(this)
|
||||||
|
|
||||||
override fun onCreate() {
|
override fun onCreate() {
|
||||||
super.onCreate()
|
super.onCreate()
|
||||||
serviceManager.autoTunnelService.complete(this)
|
|
||||||
launchWatcherNotification()
|
launchWatcherNotification()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onBind(intent: Intent): IBinder? {
|
override fun onBind(intent: Intent): IBinder {
|
||||||
super.onBind(intent)
|
super.onBind(intent)
|
||||||
return null
|
return binder
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
|
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
|
||||||
super.onStartCommand(intent, flags, startId)
|
super.onStartCommand(intent, flags, startId)
|
||||||
Timber.d("onStartCommand executed with startId: $startId")
|
Timber.d("onStartCommand executed with startId: $startId")
|
||||||
serviceManager.autoTunnelService.complete(this)
|
|
||||||
start()
|
start()
|
||||||
return START_STICKY
|
return START_STICKY
|
||||||
}
|
}
|
||||||
@@ -105,7 +107,7 @@ class AutoTunnelService : LifecycleService() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun onDestroy() {
|
override fun onDestroy() {
|
||||||
serviceManager.autoTunnelService = CompletableDeferred()
|
serviceManager.handleAutoTunnelServiceDestroy()
|
||||||
restoreVpnKillSwitch()
|
restoreVpnKillSwitch()
|
||||||
super.onDestroy()
|
super.onDestroy()
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -38,8 +38,8 @@ class AutoTunnelControlTile : TileService(), LifecycleOwner {
|
|||||||
lifecycleRegistry.handleLifecycleEvent(Lifecycle.Event.ON_START)
|
lifecycleRegistry.handleLifecycleEvent(Lifecycle.Event.ON_START)
|
||||||
Timber.d("Start listening called for auto tunnel tile")
|
Timber.d("Start listening called for auto tunnel tile")
|
||||||
lifecycleScope.launch {
|
lifecycleScope.launch {
|
||||||
serviceManager.autoTunnelActive.collect {
|
serviceManager.autoTunnelService.collect {
|
||||||
if (it) return@collect setActive()
|
if (it != null) return@collect setActive()
|
||||||
setInactive()
|
setInactive()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -56,7 +56,7 @@ class AutoTunnelControlTile : TileService(), LifecycleOwner {
|
|||||||
super.onClick()
|
super.onClick()
|
||||||
unlockAndRun {
|
unlockAndRun {
|
||||||
lifecycleScope.launch {
|
lifecycleScope.launch {
|
||||||
if (serviceManager.autoTunnelActive.value) {
|
if (serviceManager.autoTunnelService.value != null) {
|
||||||
serviceManager.stopAutoTunnel()
|
serviceManager.stopAutoTunnel()
|
||||||
setInactive()
|
setInactive()
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -193,15 +193,16 @@ abstract class BaseTunnel(
|
|||||||
tunThreads[tunnel.id]?.let {
|
tunThreads[tunnel.id]?.let {
|
||||||
if (it.state != Thread.State.TERMINATED) {
|
if (it.state != Thread.State.TERMINATED) {
|
||||||
it.interrupt()
|
it.interrupt()
|
||||||
updateTunnelStatus(tunnel, TunnelStatus.Down)
|
|
||||||
} else {
|
} else {
|
||||||
Timber.d("Thread already terminated")
|
Timber.d("Thread already terminated")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
Timber.e(e, "Failed to stop tunnel thread for ${tunnel.name}")
|
Timber.e(e, "Failed to stop tunnel thread for ${tunnel.name}")
|
||||||
|
} finally {
|
||||||
|
updateTunnelStatus(tunnel, TunnelStatus.Down)
|
||||||
|
cleanUpTunThread(tunnel)
|
||||||
}
|
}
|
||||||
cleanUpTunThread(tunnel)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun cleanUpTunThread(tunnel: TunnelConf) {
|
private fun cleanUpTunThread(tunnel: TunnelConf) {
|
||||||
|
|||||||
+1
-1
@@ -69,7 +69,7 @@ constructor(
|
|||||||
// restore vpn kill switch if needed
|
// restore vpn kill switch if needed
|
||||||
private fun handlePreviouslyEnabledVpnKillSwitch() {
|
private fun handlePreviouslyEnabledVpnKillSwitch() {
|
||||||
// let auto tunnel handle this if it is active
|
// let auto tunnel handle this if it is active
|
||||||
if (!serviceManager.autoTunnelActive.value) {
|
if (serviceManager.autoTunnelService.value == null) {
|
||||||
previousBackendState?.let { (state, lanEnabled) ->
|
previousBackendState?.let { (state, lanEnabled) ->
|
||||||
Timber.d("Restoring kill switch configuration")
|
Timber.d("Restoring kill switch configuration")
|
||||||
val lan = if (lanEnabled) TunnelConf.LAN_BYPASS_ALLOWED_IPS else emptyList()
|
val lan = if (lanEnabled) TunnelConf.LAN_BYPASS_ALLOWED_IPS else emptyList()
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ constructor(
|
|||||||
withContext(ioDispatcher) {
|
withContext(ioDispatcher) {
|
||||||
Timber.i("Service worker started")
|
Timber.i("Service worker started")
|
||||||
with(appDataRepository.settings.get()) {
|
with(appDataRepository.settings.get()) {
|
||||||
if (isAutoTunnelEnabled && !serviceManager.autoTunnelActive.value)
|
if (isAutoTunnelEnabled && serviceManager.autoTunnelService.value == null)
|
||||||
return@with serviceManager.startAutoTunnel()
|
return@with serviceManager.startAutoTunnel()
|
||||||
if (tunnelManager.activeTunnels.value.isEmpty())
|
if (tunnelManager.activeTunnels.value.isEmpty())
|
||||||
tunnelManager.restorePreviousState()
|
tunnelManager.restorePreviousState()
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ constructor(
|
|||||||
appDataRepository.tunnels.flow,
|
appDataRepository.tunnels.flow,
|
||||||
appDataRepository.appState.flow,
|
appDataRepository.appState.flow,
|
||||||
tunnelManager.activeTunnels,
|
tunnelManager.activeTunnels,
|
||||||
serviceManager.autoTunnelActive,
|
serviceManager.autoTunnelService.map { it != null },
|
||||||
networkMonitor.networkStatusFlow,
|
networkMonitor.networkStatusFlow,
|
||||||
) { array ->
|
) { array ->
|
||||||
val settings = array[0] as AppSettings
|
val settings = array[0] as AppSettings
|
||||||
|
|||||||
Reference in New Issue
Block a user