mirror of
https://github.com/bolucat/Archive.git
synced 2025-12-24 13:28:37 +08:00
Update On Tue Sep 2 20:34:32 CEST 2025
This commit is contained in:
@@ -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 ->
|
||||
|
||||
@@ -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 ->
|
||||
|
||||
Reference in New Issue
Block a user