Skip to content

Commit 81f954d

Browse files
committed
add update
1 parent 211c402 commit 81f954d

File tree

10 files changed

+452
-127
lines changed

10 files changed

+452
-127
lines changed

app/build.gradle.kts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ plugins {
33
alias(libs.plugins.kotlin.android)
44
alias(libs.plugins.kotlin.compose)
55
alias(libs.plugins.google.services) // ✅ 添加 Firebase 插件(引用 toml 别名)
6+
id("org.jetbrains.kotlin.plugin.serialization") version "1.9.23"
67

78
}
89

@@ -104,6 +105,18 @@ dependencies {
104105

105106
implementation("com.google.android.material:material:1.11.0")
106107

108+
// ... 其他依赖
109+
110+
// OkHttp 用于网络请求
111+
implementation("com.squareup.okhttp3:okhttp:4.12.0")
112+
113+
// Kotlinx Serialization 用于 JSON 解析
114+
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3")
115+
116+
// Kotlin Coroutines 协程核心库
117+
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.0")
118+
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.0")
119+
107120

108121
implementation(libs.androidx.core.ktx)
109122
implementation(libs.androidx.lifecycle.runtime.ktx)

app/src/main/assets/build3.zip

-382 KB
Binary file not shown.
Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +0,0 @@
1-
package com.silentPass.vpn
2-
3-
class AssetManifest {
4-
}
Lines changed: 60 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,62 @@
1+
@file:OptIn(kotlinx.serialization.InternalSerializationApi::class)
12
package com.silentPass.vpn
3+
// 关键改动: 将 OptIn 注解移到文件顶部,并添加 @file:
24

3-
class DataModels {
4-
}
5+
// AssetManifest.kt
6+
import kotlinx.serialization.Serializable
7+
// 现在这个注解对下面的所有 data class 都有效
8+
@Serializable
9+
data class AssetManifest(
10+
val files: Map<String, String>,
11+
val entrypoints: List<String>
12+
)
13+
14+
@Serializable
15+
data class UpdateInfo(
16+
val ver: String,
17+
val filename: String
18+
)
19+
20+
21+
data class Node (
22+
val country: String,
23+
val ip_addr: String,
24+
val region: String,
25+
val armoredPublicKey: String,
26+
val nftNumber: String
27+
)
28+
29+
data class StartVPNData(
30+
val entryNodes: List<Node>,
31+
val exitNode: List<Node>,
32+
val privateKey: String
33+
)
34+
35+
data class VE_IPptpStream (
36+
val host: String,
37+
val port: String,
38+
val buffer: String,
39+
val uuid: String
40+
)
41+
42+
data class SICommandObj (
43+
val command: String,
44+
val algorithm: String,
45+
val Securitykey: String,
46+
val requestData: List<VE_IPptpStream>,
47+
val walletAddress: String
48+
)
49+
50+
data class requestData (
51+
val message: String,
52+
val signMessage: String
53+
)
54+
55+
data class postHttp (
56+
val data: String
57+
)
58+
59+
data class CmdPayload(
60+
val cmd: String,
61+
val data: String
62+
)

app/src/main/java/com/silentPass/vpn/LayerMinus.kt

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -22,43 +22,6 @@ import java.security.SecureRandom
2222
import java.util.UUID
2323

2424

25-
data class Node (
26-
val country: String,
27-
val ip_addr: String,
28-
val region: String,
29-
val armoredPublicKey: String,
30-
val nftNumber: String
31-
)
32-
33-
data class StartVPNData(
34-
val entryNodes: List<Node>,
35-
val exitNode: List<Node>,
36-
val privateKey: String
37-
)
38-
39-
data class VE_IPptpStream (
40-
val host: String,
41-
val port: String,
42-
val buffer: String,
43-
val uuid: String
44-
)
45-
46-
data class SICommandObj (
47-
val command: String,
48-
val algorithm: String,
49-
val Securitykey: String,
50-
val requestData: List<VE_IPptpStream>,
51-
val walletAddress: String
52-
)
53-
54-
data class requestData (
55-
val message: String,
56-
val signMessage: String
57-
)
58-
59-
data class postHttp (
60-
val data: String
61-
)
6225

6326
class LayerMinus(startVPNData: StartVPNData) {
6427
private val credentials: Credentials = Credentials.create(

app/src/main/java/com/silentPass/vpn/LocalServer.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ class SocketServerService : Service() {
7575
if (serverThread == null || !serverThread!!.isAlive) {
7676
startSocketServer()
7777
}
78-
7978
return START_STICKY
8079
}
8180

0 commit comments

Comments
 (0)