iOS 1.0.3 source candidate only; no Apple build or installation acceptance

This commit is contained in:
2026-10-27 02:46:08 +00:00
parent 1cf54a46e4
commit 295799b1ab
29 changed files with 1499 additions and 213 deletions
+5 -5
View File
@@ -4,7 +4,7 @@ import UIKit
actor PlatformAPI {
static let shared = PlatformAPI()
private let baseURL = URL(string: "https://vpn.toplc.cn/")!
private let baseURL = URL(string: "https://vpn.example.invalid/")!
private let session: URLSession
private let decoder = JSONDecoder()
private let encoder = JSONEncoder()
@@ -16,7 +16,7 @@ actor PlatformAPI {
configuration.waitsForConnectivity = true
configuration.httpAdditionalHeaders = [
"Accept": "application/json",
"User-Agent": "UCVL-Zonghengjia/1.0.2 iOS",
"User-Agent": "UCVL-Zonghengjia/1.0.3 iOS",
]
session = URLSession(configuration: configuration)
}
@@ -27,7 +27,7 @@ actor PlatformAPI {
"password": password,
"device_id": SecureStore.deviceID(),
"device_name": await MainActor.run { UIDevice.current.name },
"app_version": Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? "1.0.2",
"app_version": Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? "1.0.3",
"platform": "ios",
]
return try await send(
@@ -98,7 +98,7 @@ actor PlatformAPI {
if NetworkAddress.isPublicIPv4(host) { return host }
// 001/002 是后台节点名称。NPM TCP Stream 依靠 11081/11082 等端口
// 分流,不要求每个节点子域名都单独发布 A 记录;解析不到时使用统一入口。
let candidateHosts = host == "vpn.toplc.cn" ? [host] : [host, "vpn.toplc.cn"]
let candidateHosts = host == "vpn.example.invalid" ? [host] : [host, "vpn.example.invalid"]
let resolvers = [
"https://dns.alidns.com/resolve",
"https://doh.pub/resolve",
@@ -131,7 +131,7 @@ actor PlatformAPI {
}
}
}
throw UCVLError.connection("无法取得 NPM 入口 vpn.toplc.cn 的真实公网 IPv4;已拒绝 Fake-IP/内网地址。")
throw UCVLError.connection("无法取得 NPM 入口 vpn.example.invalid 的真实公网 IPv4;已拒绝 Fake-IP/内网地址。")
}
func logout(token: String) async {