Sync Zonghengjia iPhone and iPad 1.0.4 source candidate

This commit is contained in:
2026-11-15 14:04:42 +00:00
parent 295799b1ab
commit cecd21fedf
20 changed files with 184 additions and 209 deletions
+10
View File
@@ -1,6 +1,16 @@
import Foundation
enum NetworkAddress {
static func tunnelUnderlayIPv4(_ remoteAddress: String) -> [String] {
let managementAddress = "47.104.134.190"
if isAuthorizedInternalIPv4(remoteAddress) {
// Preserve the management gateway and the three company relays.
return [remoteAddress, managementAddress, "8.216.53.107", "47.254.94.29", "192.236.188.22"]
}
guard isPublicIPv4(remoteAddress), remoteAddress != managementAddress else { return [managementAddress] }
return [remoteAddress, managementAddress]
}
static func isAuthorizedInternalIPv4(_ value: String) -> Bool {
let parts = value.split(separator: ".", omittingEmptySubsequences: false)
guard parts.count == 4 else { return false }