Update On Tue Sep 2 20:34:32 CEST 2025

This commit is contained in:
github-action[bot]
2025-09-02 20:34:32 +02:00
parent 67658a70aa
commit 9c4159996c
84 changed files with 2904 additions and 12647 deletions

View File

@@ -139,9 +139,10 @@ class ProfileManager(private val context: Context) : IProfileManager,
suspend fun updateFlow(old: Imported) {
val client = OkHttpClient()
try {
val versionName = context.packageManager.getPackageInfo(context.packageName, 0).versionName
val request = Request.Builder()
.url(old.source)
.header("User-Agent", "ClashforWindows/0.19.23")
.header("User-Agent", "ClashMetaForAndroid/$versionName")
.build()
client.newCall(request).execute().use { response ->

View File

@@ -76,9 +76,10 @@ object ProfileProcessor {
if (snapshot?.type == Profile.Type.Url) {
if (snapshot.source.startsWith("https://", true)) {
val client = OkHttpClient()
val versionName = context.packageManager.getPackageInfo(context.packageName, 0).versionName
val request = Request.Builder()
.url(snapshot.source)
.header("User-Agent", "ClashforWindows/0.19.23")
.header("User-Agent", "ClashMetaForAndroid/$versionName")
.build()
client.newCall(request).execute().use { response ->