mirror of
https://github.com/wgtunnel/android.git
synced 2026-07-03 14:07:49 +02:00
Compare commits
25 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2e6b7e65ea | |||
| 7568c87927 | |||
| dfda9e8643 | |||
| 14e3290bbf | |||
| f54958e259 | |||
| a82e5d6b50 | |||
| dfeb70f85f | |||
| 08088ba1fa | |||
| 2f30a8623c | |||
| 77e7ea05da | |||
| b47f389e98 | |||
| 780e88ad18 | |||
| 05f48cd21d | |||
| 534e4c4854 | |||
| 42eebd65b7 | |||
| 95c06344c6 | |||
| 39e2cfc79c | |||
| 4cfc00c9bb | |||
| 780dd3b984 | |||
| 2a63f6e0a9 | |||
| faacb97d89 | |||
| 6bb20184f9 | |||
| 44f0794bfb | |||
| 2251912df4 | |||
| 128796ae37 |
@@ -171,7 +171,7 @@
|
|||||||
android:exported="false"
|
android:exported="false"
|
||||||
android:directBootAware="true">
|
android:directBootAware="true">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.SCREEN_ON" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
<action android:name="android.intent.action.BOOT_COMPLETED" />
|
<action android:name="android.intent.action.BOOT_COMPLETED" />
|
||||||
<action android:name="android.intent.action.QUICKBOOT_POWERON" />
|
<action android:name="android.intent.action.QUICKBOOT_POWERON" />
|
||||||
<action android:name="com.htc.intent.action.QUICKBOOT_POWERON" />
|
<action android:name="com.htc.intent.action.QUICKBOOT_POWERON" />
|
||||||
|
|||||||
-3
@@ -8,7 +8,6 @@ import com.zaneschepke.wireguardautotunnel.core.tunnel.TunnelManager
|
|||||||
import com.zaneschepke.wireguardautotunnel.di.ApplicationScope
|
import com.zaneschepke.wireguardautotunnel.di.ApplicationScope
|
||||||
import com.zaneschepke.wireguardautotunnel.di.IoDispatcher
|
import com.zaneschepke.wireguardautotunnel.di.IoDispatcher
|
||||||
import com.zaneschepke.wireguardautotunnel.domain.repository.AppDataRepository
|
import com.zaneschepke.wireguardautotunnel.domain.repository.AppDataRepository
|
||||||
import com.zaneschepke.wireguardautotunnel.util.extensions.isRunningOnTv
|
|
||||||
import dagger.hilt.android.AndroidEntryPoint
|
import dagger.hilt.android.AndroidEntryPoint
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
import kotlinx.coroutines.CoroutineDispatcher
|
import kotlinx.coroutines.CoroutineDispatcher
|
||||||
@@ -30,8 +29,6 @@ class RestartReceiver : BroadcastReceiver() {
|
|||||||
|
|
||||||
override fun onReceive(context: Context, intent: Intent) {
|
override fun onReceive(context: Context, intent: Intent) {
|
||||||
Timber.d("RestartReceiver triggered with action: ${intent.action}")
|
Timber.d("RestartReceiver triggered with action: ${intent.action}")
|
||||||
// screen on for Android TV only to help with sleep shutdowns
|
|
||||||
if (intent.action == Intent.ACTION_SCREEN_ON && !context.isRunningOnTv()) return
|
|
||||||
serviceManager.updateTunnelTile()
|
serviceManager.updateTunnelTile()
|
||||||
serviceManager.updateAutoTunnelTile()
|
serviceManager.updateAutoTunnelTile()
|
||||||
applicationScope.launch(ioDispatcher) {
|
applicationScope.launch(ioDispatcher) {
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ class RepositoryModule {
|
|||||||
AppDatabase::class.java,
|
AppDatabase::class.java,
|
||||||
context.getString(R.string.db_name),
|
context.getString(R.string.db_name),
|
||||||
)
|
)
|
||||||
.fallbackToDestructiveMigration(true)
|
.fallbackToDestructiveMigration()
|
||||||
.addCallback(DatabaseCallback())
|
.addCallback(DatabaseCallback())
|
||||||
.build()
|
.build()
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-11
@@ -50,7 +50,6 @@ constructor(
|
|||||||
tunnelId?.let { loadInitialState(it) }
|
tunnelId?.let { loadInitialState(it) }
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO improve this loading experience
|
|
||||||
private fun loadInitialState(tunnelId: Int) =
|
private fun loadInitialState(tunnelId: Int) =
|
||||||
viewModelScope.launch {
|
viewModelScope.launch {
|
||||||
val tunnel = tunnelRepository.getById(tunnelId) ?: return@launch
|
val tunnel = tunnelRepository.getById(tunnelId) ?: return@launch
|
||||||
@@ -109,7 +108,6 @@ constructor(
|
|||||||
loading = false,
|
loading = false,
|
||||||
tunnelConf = tunnel,
|
tunnelConf = tunnel,
|
||||||
tunneledApps = tunneledApps,
|
tunneledApps = tunneledApps,
|
||||||
queriedApps = tunneledApps,
|
|
||||||
splitOption = splitOption,
|
splitOption = splitOption,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -118,14 +116,14 @@ constructor(
|
|||||||
fun onSearchQuery(query: String) {
|
fun onSearchQuery(query: String) {
|
||||||
val filteredApps =
|
val filteredApps =
|
||||||
if (query.isBlank()) {
|
if (query.isBlank()) {
|
||||||
_uiState.value.tunneledApps
|
allTunneledApps
|
||||||
} else {
|
} else {
|
||||||
_uiState.value.tunneledApps.filter {
|
allTunneledApps.filter {
|
||||||
it.first.name.contains(query, ignoreCase = true) ||
|
it.first.name.contains(query, ignoreCase = true) ||
|
||||||
it.first.`package`.contains(query, ignoreCase = true)
|
it.first.`package`.contains(query, ignoreCase = true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_uiState.update { it.copy(searchQuery = query, queriedApps = filteredApps) }
|
_uiState.update { it.copy(searchQuery = query, tunneledApps = filteredApps) }
|
||||||
}
|
}
|
||||||
|
|
||||||
fun updateSplitOption(newOption: SplitOption) {
|
fun updateSplitOption(newOption: SplitOption) {
|
||||||
@@ -138,12 +136,7 @@ constructor(
|
|||||||
currentState.tunneledApps.map { (app, selected) ->
|
currentState.tunneledApps.map { (app, selected) ->
|
||||||
if (app.`package` == packageName) Pair(app, !selected) else Pair(app, selected)
|
if (app.`package` == packageName) Pair(app, !selected) else Pair(app, selected)
|
||||||
}
|
}
|
||||||
val updatedQueryApps =
|
_uiState.value = currentState.copy(tunneledApps = updatedApps)
|
||||||
currentState.queriedApps.map { (app, selected) ->
|
|
||||||
if (app.`package` == packageName) Pair(app, !selected) else Pair(app, selected)
|
|
||||||
}
|
|
||||||
_uiState.value =
|
|
||||||
currentState.copy(tunneledApps = updatedApps, queriedApps = updatedQueryApps)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun saveChanges() =
|
fun saveChanges() =
|
||||||
|
|||||||
+1
-1
@@ -29,7 +29,7 @@ fun SplitTunnelContent(
|
|||||||
)
|
)
|
||||||
if (uiState.splitOption != SplitOption.ALL) {
|
if (uiState.splitOption != SplitOption.ALL) {
|
||||||
AppListSection(
|
AppListSection(
|
||||||
apps = uiState.queriedApps,
|
apps = uiState.tunneledApps,
|
||||||
onAppSelectionToggle = onAppSelectionToggle,
|
onAppSelectionToggle = onAppSelectionToggle,
|
||||||
onQueryChange = onQueryChange,
|
onQueryChange = onQueryChange,
|
||||||
uiState.searchQuery,
|
uiState.searchQuery,
|
||||||
|
|||||||
-1
@@ -6,7 +6,6 @@ data class SplitTunnelUiState(
|
|||||||
val loading: Boolean = true,
|
val loading: Boolean = true,
|
||||||
val tunnelConf: TunnelConf? = null,
|
val tunnelConf: TunnelConf? = null,
|
||||||
val tunneledApps: SplitTunnelApps = emptyList(),
|
val tunneledApps: SplitTunnelApps = emptyList(),
|
||||||
val queriedApps: SplitTunnelApps = emptyList(),
|
|
||||||
val splitOption: SplitOption = SplitOption.ALL,
|
val splitOption: SplitOption = SplitOption.ALL,
|
||||||
val searchQuery: String = "",
|
val searchQuery: String = "",
|
||||||
val success: Boolean? = null,
|
val success: Boolean? = null,
|
||||||
|
|||||||
@@ -78,7 +78,6 @@ fun WireguardAutoTunnelTheme(theme: Theme = Theme.AUTOMATIC, content: @Composabl
|
|||||||
|
|
||||||
val view = LocalView.current
|
val view = LocalView.current
|
||||||
if (!view.isInEditMode) {
|
if (!view.isInEditMode) {
|
||||||
@Suppress("DEPRECATION")
|
|
||||||
SideEffect {
|
SideEffect {
|
||||||
val window = (view.context as Activity).window
|
val window = (view.context as Activity).window
|
||||||
WindowCompat.setDecorFitsSystemWindows(window, false)
|
WindowCompat.setDecorFitsSystemWindows(window, false)
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
<string name="name">Name</string>
|
<string name="name">Name</string>
|
||||||
<string name="always_on_vpn_support">Always-On VPN erlauben</string>
|
<string name="always_on_vpn_support">Always-On VPN erlauben</string>
|
||||||
<string name="location_services_not_detected">Standortdienste nicht erkannt</string>
|
<string name="location_services_not_detected">Standortdienste nicht erkannt</string>
|
||||||
|
<string name="hint_search_packages">Pakete suchen</string>
|
||||||
<string name="vpn_on">VPN an</string>
|
<string name="vpn_on">VPN an</string>
|
||||||
<string name="vpn_off">VPN aus</string>
|
<string name="vpn_off">VPN aus</string>
|
||||||
<string name="create_import">Von Grund auf neu erstellen</string>
|
<string name="create_import">Von Grund auf neu erstellen</string>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
object Constants {
|
object Constants {
|
||||||
const val VERSION_NAME = "3.8.3"
|
const val VERSION_NAME = "3.8.2"
|
||||||
const val JVM_TARGET = "17"
|
const val JVM_TARGET = "17"
|
||||||
const val VERSION_CODE = 38300
|
const val VERSION_CODE = 38200
|
||||||
const val TARGET_SDK = 35
|
const val TARGET_SDK = 35
|
||||||
const val MIN_SDK = 26
|
const val MIN_SDK = 26
|
||||||
const val APP_ID = "com.zaneschepke.wireguardautotunnel"
|
const val APP_ID = "com.zaneschepke.wireguardautotunnel"
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
What's new:
|
|
||||||
- Fix DNS resolution issues
|
|
||||||
- Improve Android TV restore on sleep
|
|
||||||
- Fix split tunnel search bug
|
|
||||||
- Localization updates
|
|
||||||
- Update docs links for new app website
|
|
||||||
@@ -57,7 +57,6 @@ class LogcatManager(pid: Int, logDir: String, maxFileSize: Long, maxFolderSize:
|
|||||||
isStarted = true
|
isStarted = true
|
||||||
}
|
}
|
||||||
|
|
||||||
@OptIn(ExperimentalCoroutinesApi::class)
|
|
||||||
override fun stop() {
|
override fun stop() {
|
||||||
if (!isStarted) return
|
if (!isStarted) return
|
||||||
logJob?.cancel()
|
logJob?.cancel()
|
||||||
|
|||||||
Reference in New Issue
Block a user