Update app/service/OptimizeService.php

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
TomyJan 2026-01-30 17:27:19 +08:00 committed by GitHub
parent f93cfbb954
commit 3e1c02ab34
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -90,6 +90,9 @@ class OptimizeService
$url = 'https://raw.githubusercontent.com/xingpingcn/enhanced-FaaS-in-China/refs/heads/main/Cf.json';
}
$response = get_curl($url);
if ($response === '') {
throw new Exception('获取优选IP数据失败网络请求失败请检查网络连接或代理地址');
}
$arr = json_decode($response, true);
if (isset($arr['Cf']['result'])) {
$result = $arr['Cf']['result'];