Skip to content

Commit 676f2d0

Browse files
committed
Add windows server mode start process verify
Add linux deb dependencies Add backup recovery strategy select Support custom text scaling Optimize the display of different text scale Optimize windows setup experience Optimize startTun performance Optimize android tv experience Optimize default option Optimize computed text size Optimize hyperOS freeform window Add developer mode Update core Optimize more details
1 parent fb9d0cb commit 676f2d0

File tree

128 files changed

+5448
-1730
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

128 files changed

+5448
-1730
lines changed

.github/workflows/build.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
os: windows-latest
2020
arch: amd64
2121
- platform: linux
22-
os: ubuntu-latest
22+
os: ubuntu-22.04
2323
arch: amd64
2424
- platform: macos
2525
os: macos-13
@@ -201,6 +201,7 @@ jobs:
201201
env:
202202
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
203203
TAG: ${{ github.ref_name }}
204+
RUN_ID: ${{ github.run_id }}
204205
run: |
205206
python -m pip install --upgrade pip
206207
pip install requests
@@ -211,6 +212,14 @@ jobs:
211212
version=$(echo "${{ github.ref_name }}" | sed 's/^v//')
212213
sed "s|VERSION|$version|g" ./.github/release_template.md >> release.md
213214
215+
- name: Generate sha256
216+
if: env.IS_STABLE == 'true'
217+
run: |
218+
cd ./dist
219+
for file in $(find . -type f -not -name "*.sha256"); do
220+
sha256sum "$file" > "${file}.sha256"
221+
done
222+
214223
- name: Release
215224
if: ${{ env.IS_STABLE == 'true' }}
216225
uses: softprops/action-gh-release@v2

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ on Mobile:
4141
⚠️ Make sure to install the following dependencies before using them
4242

4343
```bash
44-
sudo apt-get install appindicator3-0.1 libappindicator3-dev
45-
sudo apt-get install keybinder-3.0
44+
sudo apt-get install libayatana-appindicator3-dev
45+
sudo apt-get install libkeybinder-3.0-dev
4646
```
4747

4848
### Android

README_zh_CN.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ on Mobile:
4141
⚠️ 使用前请确保安装以下依赖
4242

4343
```bash
44-
sudo apt-get install appindicator3-0.1 libappindicator3-dev
45-
sudo apt-get install keybinder-3.0
44+
sudo apt-get install libayatana-appindicator3-dev
45+
sudo apt-get install libkeybinder-3.0-dev
4646
```
4747

4848
### Android

android/app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
<intent-filter>
4545
<action android:name="android.intent.action.MAIN" />
4646
<category android:name="android.intent.category.LAUNCHER" />
47+
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
4748
</intent-filter>
4849
<intent-filter>
4950
<action android:name="android.service.quicksettings.action.QS_TILE_PREFERENCES" />

android/app/src/main/kotlin/com/follow/clash/GlobalState.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ enum class RunState {
2020
object GlobalState {
2121
val runLock = ReentrantLock()
2222

23+
const val NOTIFICATION_CHANNEL = "FlClash"
24+
25+
const val NOTIFICATION_ID = 1
26+
2327
val runState: MutableLiveData<RunState> = MutableLiveData<RunState>(RunState.STOP)
2428
var flutterEngine: FlutterEngine? = null
2529
private var serviceEngine: FlutterEngine? = null

android/app/src/main/kotlin/com/follow/clash/MainActivity.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package com.follow.clash
22

3-
import com.follow.clash.core.Core
43
import com.follow.clash.plugins.AppPlugin
54
import com.follow.clash.plugins.ServicePlugin
65
import com.follow.clash.plugins.TilePlugin

android/app/src/main/kotlin/com/follow/clash/extensions/Ext.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import java.util.concurrent.locks.ReentrantLock
2727
import kotlin.coroutines.resume
2828
import kotlin.coroutines.suspendCoroutine
2929

30-
3130
suspend fun Drawable.getBase64(): String {
3231
val drawable = this
3332
return withContext(Dispatchers.IO) {

android/app/src/main/kotlin/com/follow/clash/models/Package.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package com.follow.clash.models
33
data class Package(
44
val packageName: String,
55
val label: String,
6-
val isSystem: Boolean,
6+
val system: Boolean,
7+
val internet: Boolean,
78
val lastUpdateTime: Long,
89
)

android/app/src/main/kotlin/com/follow/clash/plugins/AppPlugin.kt

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -293,19 +293,17 @@ class AppPlugin : FlutterPlugin, MethodChannel.MethodCallHandler, ActivityAware
293293
if (packages.isNotEmpty()) return packages
294294
packageManager?.getInstalledPackages(PackageManager.GET_META_DATA or PackageManager.GET_PERMISSIONS)
295295
?.filter {
296-
it.packageName != FlClashApplication.getAppContext().packageName && (
297-
it.requestedPermissions?.contains(Manifest.permission.INTERNET) == true
298-
|| it.packageName == "android"
299-
)
296+
it.packageName != FlClashApplication.getAppContext().packageName || it.packageName == "android"
300297

301298
}?.map {
302-
Package(
303-
packageName = it.packageName,
304-
label = it.applicationInfo?.loadLabel(packageManager).toString(),
305-
isSystem = (it.applicationInfo?.flags?.and(ApplicationInfo.FLAG_SYSTEM)) == 1,
306-
lastUpdateTime = it.lastUpdateTime
307-
)
308-
}?.let { packages.addAll(it) }
299+
Package(
300+
packageName = it.packageName,
301+
label = it.applicationInfo?.loadLabel(packageManager).toString(),
302+
system = (it.applicationInfo?.flags?.and(ApplicationInfo.FLAG_SYSTEM)) == 1,
303+
lastUpdateTime = it.lastUpdateTime,
304+
internet = it.requestedPermissions?.contains(Manifest.permission.INTERNET) == true
305+
)
306+
}?.let { packages.addAll(it) }
309307
return packages
310308
}
311309

android/app/src/main/kotlin/com/follow/clash/plugins/VpnPlugin.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,10 @@ data object VpnPlugin : FlutterPlugin, MethodChannel.MethodCallHandler {
168168
try {
169169
if (GlobalState.runState.value != RunState.START) return
170170
val data = flutterMethodChannel.awaitResult<String>("getStartForegroundParams")
171-
val startForegroundParams = Gson().fromJson(
171+
val startForegroundParams = if (data != null) Gson().fromJson(
172172
data, StartForegroundParams::class.java
173+
) else StartForegroundParams(
174+
title = "", content = ""
173175
)
174176
if (lastStartForegroundParams != startForegroundParams) {
175177
lastStartForegroundParams = startForegroundParams

0 commit comments

Comments
 (0)