diff --git a/app/lib/OptimizeService.php b/app/lib/OptimizeService.php index 72d5d03..fb792f2 100644 --- a/app/lib/OptimizeService.php +++ b/app/lib/OptimizeService.php @@ -28,7 +28,7 @@ class OptimizeService }elseif($api == 1){ $url = 'https://api.hostmonit.com/get_license?license='.$key; }else{ - $url = 'https://monitor.gacjie.cn/api/client/get_account_integral?license='.$key; + $url = 'https://www.182682.xyz/api/cf2dns/get_license?license='.$key; } $response = get_curl($url); $arr = json_decode($response, true); @@ -43,20 +43,24 @@ class OptimizeService public function get_ip_address($cdn_type = 1, $ip_type = 'v4'){ $api = config_get('optimize_ip_api', 0); - if($api == 1){ + if($api == 2){ $url = 'https://api.345673.xyz/get_data'; }elseif($api == 1){ $url = 'https://api.hostmonit.com/get_optimization_ip'; }else{ - $url = 'https://monitor.gacjie.cn/api/client/get_ip_address'; + $url = 'https://www.182682.xyz/api/cf2dns/'; + if($cdn_type == 1){ + $url .= 'get_cloudflare_ip'; + }elseif($cdn_type == 2){ + $url .= 'get_cloudfront_ip'; + }elseif($cdn_type == 3){ + $url .= 'get_gcore_ip'; + } } $params = [ 'key' => config_get('optimize_ip_key', 'o1zrmHAF'), 'type' => $ip_type, ]; - if($api == 0){ - $params['cdn_server'] = $cdn_type; - } $response = get_curl($url, json_encode($params), 0, 0, 0, 0, 0, ['Content-Type: application/json; charset=UTF-8']); $arr = json_decode($response, true); if(isset($arr['code']) && $arr['code'] == 200){ diff --git a/app/view/optimizeip/opipset.html b/app/view/optimizeip/opipset.html index 8eb5d93..8af3748 100644 --- a/app/view/optimizeip/opipset.html +++ b/app/view/optimizeip/opipset.html @@ -13,7 +13,7 @@

使用说明

-

  • 数据接口:GacJieMonitor 数据接口支持CloudFlare、CloudFront、Gcore;HostMonit 只支持CloudFlare;345673.xyz 只支持CloudFlare。
  • +

  • 数据接口:182682.xyz 数据接口支持CloudFlare、CloudFront、Gcore;HostMonit 只支持CloudFlare;345673.xyz 只支持CloudFlare。
  • 接口密钥:默认o1zrmHAF为免费KEY可永久免费使用。
  • 计划任务:将以下命令添加到计划任务,周期设置为15分钟以上
  • cd {:app()->getRootPath()} && php think opiptask

    @@ -27,7 +27,7 @@
    -
    +