mirror of
https://github.com/wgtunnel/android.git
synced 2026-07-03 14:07:49 +02:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1987712fac |
@@ -4,9 +4,6 @@ permissions:
|
|||||||
packages: write
|
packages: write
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- '[0-9]*.[0-9]*.[0-9]*'
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
track:
|
track:
|
||||||
@@ -52,19 +49,19 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
build-fdroid:
|
build-fdroid:
|
||||||
if: ${{ github.event_name == 'push' || inputs.release_type == 'release' || inputs.flavor == 'fdroid' }}
|
if: ${{ inputs.release_type == 'release' || inputs.flavor == 'fdroid' }}
|
||||||
uses: ./.github/workflows/build.yml
|
uses: ./.github/workflows/build.yml
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
with:
|
with:
|
||||||
build_type: ${{ github.event_name == 'push' && 'release' || inputs.release_type }}
|
build_type: ${{ inputs.release_type }}
|
||||||
flavor: fdroid
|
flavor: fdroid
|
||||||
|
|
||||||
build-standalone:
|
build-standalone:
|
||||||
if: ${{ github.event_name == 'push' || inputs.release_type == 'release' || inputs.release_type == 'prerelease' || inputs.flavor == 'standalone' }}
|
if: ${{ inputs.release_type == 'release' || inputs.release_type == 'prerelease' || inputs.flavor == 'standalone' }}
|
||||||
uses: ./.github/workflows/build.yml
|
uses: ./.github/workflows/build.yml
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
with:
|
with:
|
||||||
build_type: ${{ github.event_name == 'push' && 'release' || inputs.release_type }}
|
build_type: ${{ inputs.release_type }}
|
||||||
flavor: standalone
|
flavor: standalone
|
||||||
|
|
||||||
publish:
|
publish:
|
||||||
@@ -75,7 +72,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.event_name == 'push' && github.ref || 'main' }}
|
ref: main
|
||||||
- name: Install system dependencies
|
- name: Install system dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt update && sudo apt install -y gh apksigner
|
sudo apt update && sudo apt install -y gh apksigner
|
||||||
@@ -116,7 +113,7 @@ jobs:
|
|||||||
merge-multiple: true
|
merge-multiple: true
|
||||||
|
|
||||||
- name: Set version release notes
|
- name: Set version release notes
|
||||||
if: ${{ github.event_name == 'push' || inputs.release_type == 'release' }}
|
if: ${{ inputs.release_type == 'release' }}
|
||||||
run: |
|
run: |
|
||||||
VERSION_NAME=$(grep "const val VERSION_NAME" buildSrc/src/main/kotlin/Constants.kt | awk -F'"' '{print $2}')
|
VERSION_NAME=$(grep "const val VERSION_NAME" buildSrc/src/main/kotlin/Constants.kt | awk -F'"' '{print $2}')
|
||||||
RELEASE_NOTES="$(cat ${{ github.workspace }}/fastlane/metadata/android/en-US/changelogs/${VERSION_NAME}.txt || echo "No changelog found for ${VERSION_NAME}")"
|
RELEASE_NOTES="$(cat ${{ github.workspace }}/fastlane/metadata/android/en-US/changelogs/${VERSION_NAME}.txt || echo "No changelog found for ${VERSION_NAME}")"
|
||||||
@@ -125,7 +122,7 @@ jobs:
|
|||||||
echo "EOF" >> $GITHUB_ENV
|
echo "EOF" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: On prerelease release notes
|
- name: On prerelease release notes
|
||||||
if: ${{ github.event_name != 'push' && inputs.release_type == 'prerelease' }}
|
if: ${{ inputs.release_type == 'prerelease' }}
|
||||||
run: |
|
run: |
|
||||||
echo "RELEASE_NOTES=Testing version of app for specific feature." >> $GITHUB_ENV
|
echo "RELEASE_NOTES=Testing version of app for specific feature." >> $GITHUB_ENV
|
||||||
|
|
||||||
@@ -159,11 +156,11 @@ jobs:
|
|||||||
|
|
||||||
### Changelog
|
### Changelog
|
||||||
${{ steps.changelog.outputs.changes }}
|
${{ steps.changelog.outputs.changes }}
|
||||||
tag_name: ${{ github.event_name == 'push' && github.ref_name || github.event.inputs.tag_name }}
|
tag_name: ${{ github.event.inputs.tag_name }}
|
||||||
name: ${{ github.event_name == 'push' && github.ref_name || github.event.inputs.tag_name }}
|
name: ${{ github.event.inputs.tag_name }}
|
||||||
draft: false
|
draft: false
|
||||||
prerelease: ${{ github.event_name != 'push' && inputs.release_type == 'prerelease' }}
|
prerelease: ${{ inputs.release_type == 'prerelease' }}
|
||||||
make_latest: ${{ github.event_name == 'push' || inputs.release_type == 'release' }}
|
make_latest: ${{ inputs.release_type == 'release' }}
|
||||||
files: |
|
files: |
|
||||||
${{ github.workspace }}/temp/**/*.apk
|
${{ github.workspace }}/temp/**/*.apk
|
||||||
env:
|
env:
|
||||||
@@ -173,7 +170,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs:
|
needs:
|
||||||
- build-fdroid
|
- build-fdroid
|
||||||
if: ${{ github.event_name == 'push' || inputs.release_type == 'release' }}
|
if: inputs.release_type == 'release'
|
||||||
steps:
|
steps:
|
||||||
- name: Dispatch update for fdroid repo
|
- name: Dispatch update for fdroid repo
|
||||||
uses: peter-evans/repository-dispatch@v3
|
uses: peter-evans/repository-dispatch@v3
|
||||||
@@ -183,7 +180,7 @@ jobs:
|
|||||||
event-type: fdroid-update
|
event-type: fdroid-update
|
||||||
|
|
||||||
publish-play:
|
publish-play:
|
||||||
if: ${{ github.event_name == 'push' || inputs.track != 'none' }}
|
if: ${{ inputs.track != 'none' }}
|
||||||
name: Publish to Google Play
|
name: Publish to Google Play
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
@@ -233,6 +230,4 @@ jobs:
|
|||||||
bundler-cache: true
|
bundler-cache: true
|
||||||
|
|
||||||
- name: Distribute app to Prod track 🚀
|
- name: Distribute app to Prod track 🚀
|
||||||
run: |
|
run: (cd ${{ github.workspace }} && bundle install && bundle exec fastlane ${{ inputs.track }})
|
||||||
track=${{ github.event_name == 'push' && 'production' || inputs.track }}
|
|
||||||
(cd ${{ github.workspace }} && bundle install && bundle exec fastlane $track)
|
|
||||||
@@ -231,10 +231,3 @@ tasks.register<Copy>("copyLicenseeJsonToAssets") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
tasks.named("preBuild") { dependsOn("copyLicenseeJsonToAssets") }
|
tasks.named("preBuild") { dependsOn("copyLicenseeJsonToAssets") }
|
||||||
|
|
||||||
// https://gist.github.com/obfusk/61046e09cee352ae6dd109911534b12e#fix-proposed-by-linsui-disable-baseline-profiles
|
|
||||||
tasks.whenTaskAdded {
|
|
||||||
if (name.contains("ArtProfile")) {
|
|
||||||
enabled = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -51,8 +51,10 @@ fun MainScreen(appUiState: AppUiState, appViewState: AppViewState, viewModel: Ap
|
|||||||
rememberLauncherForActivityResult(
|
rememberLauncherForActivityResult(
|
||||||
contract = ScanContract(),
|
contract = ScanContract(),
|
||||||
onResult = { result ->
|
onResult = { result ->
|
||||||
if (result != null && result.contents.isNotEmpty())
|
{
|
||||||
viewModel.handleEvent(AppEvent.ImportTunnelFromQrCode(result.contents))
|
if (result != null && result.contents.isNotEmpty())
|
||||||
|
viewModel.handleEvent(AppEvent.ImportTunnelFromQrCode(result.contents))
|
||||||
|
}
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -67,7 +69,7 @@ fun MainScreen(appUiState: AppUiState, appViewState: AppViewState, viewModel: Ap
|
|||||||
)
|
)
|
||||||
return@rememberLauncherForActivityResult
|
return@rememberLauncherForActivityResult
|
||||||
}
|
}
|
||||||
scanLauncher.launch(ScanOptions().setDesiredBarcodeFormats(ScanOptions.QR_CODE).setBeepEnabled(false))
|
scanLauncher.launch(ScanOptions().setDesiredBarcodeFormats(ScanOptions.QR_CODE))
|
||||||
}
|
}
|
||||||
|
|
||||||
if (appViewState.showModal == AppViewState.ModalType.DELETE) {
|
if (appViewState.showModal == AppViewState.ModalType.DELETE) {
|
||||||
|
|||||||
@@ -400,6 +400,7 @@ constructor(
|
|||||||
|
|
||||||
private suspend fun handleClipboardImport(config: String, tunnels: List<TunnelConf>) {
|
private suspend fun handleClipboardImport(config: String, tunnels: List<TunnelConf>) {
|
||||||
runCatching {
|
runCatching {
|
||||||
|
Timber.d("Config: $config")
|
||||||
val amConfig = TunnelConf.configFromAmQuick(config)
|
val amConfig = TunnelConf.configFromAmQuick(config)
|
||||||
val tunnelConf = TunnelConf.tunnelConfigFromAmConfig(amConfig)
|
val tunnelConf = TunnelConf.tunnelConfigFromAmConfig(amConfig)
|
||||||
saveTunnel(
|
saveTunnel(
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
object Constants {
|
object Constants {
|
||||||
const val VERSION_NAME = "3.9.2"
|
const val VERSION_NAME = "3.9.1"
|
||||||
const val JVM_TARGET = "17"
|
const val JVM_TARGET = "17"
|
||||||
const val VERSION_CODE = 39200
|
const val VERSION_CODE = 39100
|
||||||
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,4 +0,0 @@
|
|||||||
What's new:
|
|
||||||
- Fixes QR scanner bug
|
|
||||||
- Fixes active Wi-Fi network tracking bug
|
|
||||||
- Fixes Fdroid reproducibility
|
|
||||||
@@ -6,17 +6,17 @@ androidx-junit = "1.2.1"
|
|||||||
appcompat = "1.7.0"
|
appcompat = "1.7.0"
|
||||||
biometricKtx = "1.2.0-alpha05"
|
biometricKtx = "1.2.0-alpha05"
|
||||||
coreKtx = "1.16.0"
|
coreKtx = "1.16.0"
|
||||||
datastorePreferences = "1.2.0-alpha02"
|
datastorePreferences = "1.2.0-alpha01"
|
||||||
desugar_jdk_libs = "2.1.5"
|
desugar_jdk_libs = "2.1.5"
|
||||||
espressoCore = "3.6.1"
|
espressoCore = "3.6.1"
|
||||||
hiltAndroid = "2.56.2"
|
hiltAndroid = "2.56.2"
|
||||||
hiltCompiler = "1.2.0"
|
hiltCompiler = "1.2.0"
|
||||||
junit = "4.13.2"
|
junit = "4.13.2"
|
||||||
kotlinx-serialization-json = "1.8.1"
|
kotlinx-serialization-json = "1.8.1"
|
||||||
ktorClientCore = "3.1.3"
|
ktorClientCore = "3.1.2"
|
||||||
lifecycle-runtime-compose = "2.9.0"
|
lifecycle-runtime-compose = "2.8.7"
|
||||||
material3 = "1.3.2"
|
material3 = "1.3.2"
|
||||||
navigationCompose = "2.9.0"
|
navigationCompose = "2.8.9"
|
||||||
pinLockCompose = "1.0.4"
|
pinLockCompose = "1.0.4"
|
||||||
qrose = "1.0.1"
|
qrose = "1.0.1"
|
||||||
roomVersion = "2.7.1"
|
roomVersion = "2.7.1"
|
||||||
@@ -24,10 +24,10 @@ semver4j = "3.1.0"
|
|||||||
slf4jAndroid = "1.7.36"
|
slf4jAndroid = "1.7.36"
|
||||||
timber = "5.0.1"
|
timber = "5.0.1"
|
||||||
tunnel = "1.3.0"
|
tunnel = "1.3.0"
|
||||||
androidGradlePlugin = "8.9.3"
|
androidGradlePlugin = "8.9.2"
|
||||||
kotlin = "2.1.21"
|
kotlin = "2.1.20"
|
||||||
ksp = "2.1.21-2.0.1"
|
ksp = "2.1.20-2.0.1"
|
||||||
composeBom = "2025.05.00"
|
composeBom = "2025.04.01"
|
||||||
compose = "1.8.1"
|
compose = "1.8.1"
|
||||||
icons = "1.7.8"
|
icons = "1.7.8"
|
||||||
workRuntimeKtxVersion = "2.10.1"
|
workRuntimeKtxVersion = "2.10.1"
|
||||||
|
|||||||
+3
-3
@@ -51,7 +51,7 @@ class AndroidNetworkMonitor(
|
|||||||
@get:Synchronized @set:Synchronized var wifiConnected = false
|
@get:Synchronized @set:Synchronized var wifiConnected = false
|
||||||
|
|
||||||
// Track active Wi-Fi networks and last active network ID
|
// Track active Wi-Fi networks and last active network ID
|
||||||
private val activeNetworks = Collections.synchronizedSet(mutableSetOf<String>())
|
private val activeNetworks = Collections.synchronizedSet(mutableSetOf<Network>())
|
||||||
|
|
||||||
data class WifiState(
|
data class WifiState(
|
||||||
val connected: Boolean = false,
|
val connected: Boolean = false,
|
||||||
@@ -148,7 +148,7 @@ class AndroidNetworkMonitor(
|
|||||||
object : ConnectivityManager.NetworkCallback() {
|
object : ConnectivityManager.NetworkCallback() {
|
||||||
override fun onAvailable(network: Network) {
|
override fun onAvailable(network: Network) {
|
||||||
Timber.d("Wi-Fi onAvailable: network=$network")
|
Timber.d("Wi-Fi onAvailable: network=$network")
|
||||||
activeNetworks.add(network.toString())
|
activeNetworks.add(network)
|
||||||
launch {
|
launch {
|
||||||
currentSsid = getWifiSsid()
|
currentSsid = getWifiSsid()
|
||||||
securityType = wifiManager?.getCurrentSecurityType()
|
securityType = wifiManager?.getCurrentSecurityType()
|
||||||
@@ -165,7 +165,7 @@ class AndroidNetworkMonitor(
|
|||||||
|
|
||||||
override fun onLost(network: Network) {
|
override fun onLost(network: Network) {
|
||||||
Timber.d("Wi-Fi onLost: network=$network")
|
Timber.d("Wi-Fi onLost: network=$network")
|
||||||
activeNetworks.remove(network.toString())
|
activeNetworks.remove(network)
|
||||||
if (activeNetworks.isEmpty()) {
|
if (activeNetworks.isEmpty()) {
|
||||||
Timber.d(
|
Timber.d(
|
||||||
"All Wi-Fi networks disconnected, clearing currentSsid and wifiConnected"
|
"All Wi-Fi networks disconnected, clearing currentSsid and wifiConnected"
|
||||||
|
|||||||
Reference in New Issue
Block a user