fix: 增加api.airovpn.tel 域名
This commit is contained in:
parent
18e932e738
commit
c42bddb129
@ -1,7 +1,6 @@
|
||||
import UIKit
|
||||
import Flutter
|
||||
import Libcore
|
||||
import PassKit
|
||||
@main
|
||||
@objc class AppDelegate: FlutterAppDelegate {
|
||||
|
||||
@ -13,21 +12,9 @@ import PassKit
|
||||
registerHandlers()
|
||||
GeneratedPluginRegistrant.register(with: self)
|
||||
|
||||
// ✅ Apple Pay 调试代码
|
||||
debugApplePaySupport()
|
||||
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
|
||||
}
|
||||
func debugApplePaySupport() {
|
||||
// 是否能使用 Apple Pay(设备是否支持)
|
||||
let canPay = PKPaymentAuthorizationController.canMakePayments()
|
||||
print("💳 Can make payments: \(canPay)")
|
||||
|
||||
// 是否能使用指定卡网络支付
|
||||
let canPayWithNetworks = PKPaymentAuthorizationController.canMakePayments(
|
||||
usingNetworks: [.visa, .masterCard, .amex]
|
||||
)
|
||||
print("💳 Can pay with Visa/Master/Amex: \(canPayWithNetworks)")
|
||||
}
|
||||
func setupFileManager() {
|
||||
try? FileManager.default.createDirectory(at: FilePath.workingDirectory, withIntermediateDirectories: true)
|
||||
FileManager.default.changeCurrentDirectoryPath(FilePath.sharedDirectory.path)
|
||||
|
||||
@ -4,10 +4,6 @@
|
||||
<dict>
|
||||
<key>aps-environment</key>
|
||||
<string>development</string>
|
||||
<key>com.apple.developer.in-app-payments</key>
|
||||
<array>
|
||||
<string>merchant.com.taw.hifastvpn</string>
|
||||
</array>
|
||||
<key>com.apple.developer.networking.networkextension</key>
|
||||
<array>
|
||||
<string>packet-tunnel-provider</string>
|
||||
|
||||
@ -4,10 +4,6 @@
|
||||
<dict>
|
||||
<key>aps-environment</key>
|
||||
<string>development</string>
|
||||
<key>com.apple.developer.in-app-payments</key>
|
||||
<array>
|
||||
<string>merchant.com.taw.hifastvpn</string>
|
||||
</array>
|
||||
<key>com.apple.developer.networking.networkextension</key>
|
||||
<array>
|
||||
<string>packet-tunnel-provider</string>
|
||||
|
||||
@ -30,8 +30,8 @@ class KRDomain {
|
||||
// static List<String> kr_baseDomains = ["apicn.bearvpn.top","apibear.nsdsox.com"];
|
||||
// static String kr_currentDomain = "apicn.bearvpn.top";
|
||||
|
||||
static List<String> kr_baseDomains = ["api.hifast.biz",];
|
||||
static String kr_currentDomain = "api.hifast.biz";
|
||||
static List<String> kr_baseDomains = ["api.hifast.biz", "api.airovpn.tel",];
|
||||
static String kr_currentDomain = "api.hifast.biz1";
|
||||
|
||||
// 备用域名获取地址列表
|
||||
static List<String> kr_backupDomainUrls = [
|
||||
@ -43,7 +43,7 @@ class KRDomain {
|
||||
|
||||
// 本地备用域名列表(当服务器获取的域名都不可用时使用)
|
||||
static List<String> kr_localBackupDomains = [
|
||||
// "api.omntech.com",
|
||||
"api.airovpn.tel",
|
||||
// "api6.omntech.com",
|
||||
// "api7.omntech.com",
|
||||
// "apicn.bearvpn.top",
|
||||
@ -202,9 +202,9 @@ class KRDomain {
|
||||
KRLogUtil.kr_w('❌ 快速检测失败,域名 $domain 连接超时或网络错误: ${e.message}', tag: 'KRDomain');
|
||||
return false;
|
||||
} else {
|
||||
// 其他错误(如404、403等)认为域名可用
|
||||
KRLogUtil.kr_i('✅ 快速检测成功,域名 $domain 可用(有响应但状态码异常): ${e.message}', tag: 'KRDomain');
|
||||
return true;
|
||||
// 其他错误(如未知错误、取消等)认为域名不可用
|
||||
KRLogUtil.kr_w('❌ 快速检测失败,域名 $domain 其他异常 (Type: ${e.type}): ${e.message}', tag: 'KRDomain');
|
||||
return false;
|
||||
}
|
||||
} catch (e) {
|
||||
KRLogUtil.kr_e('❌ 快速检测异常,域名 $domain 检查异常: $e', tag: 'KRDomain');
|
||||
@ -269,9 +269,9 @@ class KRDomain {
|
||||
KRLogUtil.kr_w('❌ 域名 $domain 连接超时或网络错误: ${e.message}', tag: 'KRDomain');
|
||||
return false;
|
||||
} else {
|
||||
// 其他错误(如404、403等)认为域名可用
|
||||
KRLogUtil.kr_i('✅ 域名 $domain 可用(有响应但状态码异常): ${e.message}', tag: 'KRDomain');
|
||||
return true;
|
||||
// 其他错误(如未知错误、取消等)认为域名不可用
|
||||
KRLogUtil.kr_w('❌ 域名 $domain 检查异常 (Type: ${e.type}): ${e.message}', tag: 'KRDomain');
|
||||
return false;
|
||||
}
|
||||
} catch (e) {
|
||||
KRLogUtil.kr_e('❌ 域名 $domain 检查异常: $e', tag: 'KRDomain');
|
||||
@ -396,7 +396,7 @@ class KRDomain {
|
||||
|
||||
// 🔧 修复4:验证兜底域名是否可用
|
||||
KRLogUtil.kr_w('⚠️ 所有域名都失败,尝试兜底域名', tag: 'KRDomain');
|
||||
const fallbackDomain = "api.maodag.top";
|
||||
const fallbackDomain = "api.airovpn.tel";
|
||||
|
||||
// 快速验证兜底域名
|
||||
bool isFallbackAvailable = await kr_fastCheckDomainAvailability(fallbackDomain);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user