diff --git a/utils/functions.php b/utils/functions.php index ff0d2c0..1d7a7ae 100644 --- a/utils/functions.php +++ b/utils/functions.php @@ -22,11 +22,7 @@ function get_webpage($url,$host="",$ip="") { curl_setopt($ch, CURLOPT_PROXY, PROXY_IP_TH); break; default: - if ($host = CUSTOM_HOST_TH_TOKEN || $host = CUSTOM_HOST_TH_SEARCH || $host = CUSTOM_HOST_TH || $host = CUSTOM_HOST_TH_SUB) { - curl_setopt($ch, CURLOPT_PROXY, PROXY_IP_TH); - } else { - curl_setopt($ch, CURLOPT_PROXY, PROXY_IP); - } + curl_setopt($ch, CURLOPT_PROXY, PROXY_IP); } } if (IP_RESOLVE == 1) { // 指定ip回源 diff --git a/utils/functions_cache.php b/utils/functions_cache.php index e6afa05..392bb25 100644 --- a/utils/functions_cache.php +++ b/utils/functions_cache.php @@ -269,7 +269,6 @@ function write_cache_season() { if ($refresh_cache_season_main == 1) { $sql = "UPDATE `cache` SET `expired_time` = '".$ts."', `cache` = '".$output."' WHERE `area` = '".$area."' AND `cache_type` = 'season_".$cache_type."' AND `cid` = '".$ss_id."' AND `ep_id` = '".$ep_id."';"; } - $dbh -> exec($sql); } else if($code !== ""){ // 缓存到自身 AREA 里面 $sql = "INSERT INTO `cache` (`expired_time`,`area`,`type`,`cache_type`,`cid`,`ep_id`,`cache`) VALUES ('".$ts."','".AREA."','0','season_".$cache_type."','".$ss_id."','".$ep_id."','".$output."')"; diff --git a/utils/process.php b/utils/process.php index ec93fb3..71a22d4 100644 --- a/utils/process.php +++ b/utils/process.php @@ -17,13 +17,20 @@ if (BILIROAMING_VERSION == '') { $baned = 10; block($baned); } - if (@$_GET['area'] == '' || @$_GET['area'] == 'false') { //web脚本 - define('AREA', 'noarea'); + if (@$_GET['area'] == '' || @$_GET['area'] == 'false') { //web脚本,兼容泰区无area情况 + if ($path == "/intl/gateway/v2/app/search/type" || $path == "/intl/gateway/v2/app/subtitle" || $path == "/intl/gateway/v2/ogv/view/app/season") { + define('AREA', 'th'); + } else { + define('AREA', 'noarea'); } else { define('AREA', @$_GET['area']); } -} else if (@$_GET['area'] == '') { //适配老漫游版本 - define('AREA', 'oldversion'); +} else if (@$_GET['area'] == '') { //适配老漫游版本,兼容泰区无area情况 + if ($path == "/intl/gateway/v2/app/search/type" || $path == "/intl/gateway/v2/app/subtitle" || $path == "/intl/gateway/v2/ogv/view/app/season") { + define('AREA', 'th'); + } else { + define('AREA', 'oldversion'); + } } else { define('AREA', @$_GET['area']); } @@ -84,4 +91,4 @@ function block($baned){ http_response_code(404); exit('{"code":-418,"message":"'.$reason.'"}'); } -?> \ No newline at end of file +?> diff --git a/x/intl/passport-login/oauth2/refresh_token/index.php b/x/intl/passport-login/oauth2/refresh_token/index.php index 4d2d979..9ef266f 100644 --- a/x/intl/passport-login/oauth2/refresh_token/index.php +++ b/x/intl/passport-login/oauth2/refresh_token/index.php @@ -24,7 +24,7 @@ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_POST, true); if (PROXY_ON == 1) { curl_setopt($ch, CURLOPT_PROXYTYPE, PROXY_TYPE); - curl_setopt($ch, CURLOPT_PROXY, PROXY_IP); + curl_setopt($ch, CURLOPT_PROXY, PROXY_IP_TH); } if (IP_RESOLVE == 1) { curl_setopt($ch, CURLOPT_RESOLVE, [$host.":443:".$ip]);