From e93fe9552447aa53e01eb991ffe3d3950013f3a0 Mon Sep 17 00:00:00 2001 From: Akatsuki-Misaki Date: Sun, 4 May 2025 18:03:28 +0800 Subject: [PATCH] =?UTF-8?q?update:github=E7=9A=84=E5=8F=8D=E4=BB=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PHP/ipsearch.php | 4 +- PHP/jsd加速/index.php | 58 +++++++++++++- PHP/jsd加速/jsd.html | 8 +- PHP/jsd加速/web.config | 19 +++++ ip.txt | 171 +++-------------------------------------- 5 files changed, 90 insertions(+), 170 deletions(-) create mode 100644 PHP/jsd加速/web.config diff --git a/PHP/ipsearch.php b/PHP/ipsearch.php index 981389a..934e49c 100644 --- a/PHP/ipsearch.php +++ b/PHP/ipsearch.php @@ -4,8 +4,8 @@ header('Access-Control-Allow-Origin: *'); header('Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS'); header('Access-Control-Allow-Headers: Content-Type, Authorization'); -// 获取ip -$ip_address = $_SERVER['X-Real-IP']; +// 从设备获取ip +$ip_address = $_SERVER['REMOTE_ADDR']; // 将获取到的IP进行地址查询 小小API diff --git a/PHP/jsd加速/index.php b/PHP/jsd加速/index.php index 9b2cbdb..d765be7 100644 --- a/PHP/jsd加速/index.php +++ b/PHP/jsd加速/index.php @@ -1,5 +1,48 @@ $ip_address, + 'address' => $info_ip_address, + 'isp' => $info_ip_isp + ); + echo json_encode($data); + exit(); + }else{ + header('Content-Type: application/json'); + http_response_code(403); + $data = array( + 'info' => '获取失败' + ); + echo json_encode($data); + exit(); + } +}else if($format === 'text'){ + echo $ip_address; + exit(); +} + + + // 获取文件名 $file = $_SERVER['REQUEST_URI']; // 获取文件类型 @@ -7,7 +50,7 @@ $file_info = pathinfo($file); // 获取文件后缀名 $file_ext = $file_info['extension']; // 定义允许的后缀 -$allow_ext = array('js', 'css', 'png', 'jpg', 'jpeg', 'gif', 'ico', 'json', 'txt', 'moc', 'moc3', 'svg', 'webp' , 'hosts', 'ttf', 'woff', 'woff2', 'eot', 'sgmodule'); +$allow_ext = array('js', 'css', 'png', 'jpg', 'jpeg', 'gif', 'ico', 'json', 'txt', 'moc', 'moc3', 'svg', 'webp' , 'hosts', 'ttf', 'woff', 'woff2', 'eot', 'sgmodule', 'apk', 'zip', 'exe'); if($_SERVER['REQUEST_URI'] == '/'){ // 输出首页 header('content-type: text/html;charset=utf-8'); @@ -21,7 +64,7 @@ if($_SERVER['REQUEST_URI'] == '/help'){ 'title'=> 'Welcome to use OvOfish Studio API', 'message' => '这是一个反代接口,如有需要请联系管理员。', 'How_to_use' => '您只需将原有的域名更改为本站域名如需要使用jsdelivr的反代请添加/jsd,如需要raw.githubusercontent.com则添加/gh', - 'support_list' => '支持的接口:'.implode(',', array('/gh', '/jsd', '/unpkg')), + 'support_list' => '支持的接口:'.implode(',', array('/gh', '/jsd', '/unpkg' ,'/releases')), 'file_ext_list' => '允许的后缀列表:'.implode(',', $allow_ext) )); exit(); @@ -75,6 +118,9 @@ if (strpos($_SERVER['REQUEST_URI'], '/gh') === 0) { }elseif (strpos($_SERVER['REQUEST_URI'], '/unpkg') === 0) { $target_host = "https://unpkg.com"; $new_request_uri = substr($_SERVER['REQUEST_URI'], 6); +}elseif (strpos($_SERVER['REQUEST_URI'], '/releases') === 0) { + $target_host = "https://github.com"; + $new_request_uri = substr($_SERVER['REQUEST_URI'], 9); } else { header('content-type: application/json;charset=utf-8'); // 返回404状态 @@ -176,7 +222,10 @@ function get_mimetype($extension) { 'moc' => 'text/plain', 'moc3' => 'text/plain', 'svg' => 'image/svg+xml', - 'webp' => 'image/webp' + 'webp' => 'image/webp', + 'zip' => 'application/zip', + 'exe' => 'application/octet-stream', + 'apk' => 'application/vnd.android.package-archive' ); return isset($ct[strtolower($extension)]) ? $ct[strtolower($extension)] : 'text/plain'; } @@ -200,4 +249,7 @@ function array_to_str($array) } // 输出网页内容 echo $homepage; + + + ?> \ No newline at end of file diff --git a/PHP/jsd加速/jsd.html b/PHP/jsd加速/jsd.html index 2a71381..9f9d083 100644 --- a/PHP/jsd加速/jsd.html +++ b/PHP/jsd加速/jsd.html @@ -222,7 +222,7 @@
@@ -371,8 +371,8 @@

电子邮件

-

您可以发送邮件到:mirai@lolicon.team联系我们!

+

您可以发送邮件到:i@ovofish.com联系我们!

diff --git a/PHP/jsd加速/web.config b/PHP/jsd加速/web.config new file mode 100644 index 0000000..c4ec80c --- /dev/null +++ b/PHP/jsd加速/web.config @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ip.txt b/ip.txt index ad4cb08..c20f9a6 100644 --- a/ip.txt +++ b/ip.txt @@ -1,161 +1,10 @@ -10.10.50.90 -10.10.50.91 -10.10.50.92 -10.10.50.93 -10.10.50.94 -10.10.50.95 -10.10.50.96 -10.10.50.97 -10.10.50.98 -10.10.50.99 -10.10.50.100 -10.10.50.101 -10.10.50.102 -10.10.50.103 -10.10.50.104 -10.10.50.105 -10.10.50.106 -10.10.50.107 -10.10.50.108 -10.10.50.109 -10.10.50.110 -10.10.50.111 -10.10.50.112 -10.10.50.113 -10.10.50.114 -10.10.50.115 -10.10.50.116 -10.10.50.117 -10.10.50.118 -10.10.50.119 -10.10.50.120 -10.10.50.121 -10.10.50.122 -10.10.50.123 -10.10.50.124 -10.10.50.125 -10.10.50.126 -10.10.50.127 -10.10.50.128 -10.10.50.129 -10.10.50.130 -10.10.50.131 -10.10.50.132 -10.10.50.133 -10.10.50.134 -10.10.50.135 -10.10.50.136 -10.10.50.137 -10.10.50.138 -10.10.50.139 -10.10.50.140 -10.10.50.141 -10.10.50.142 -10.10.50.143 -10.10.50.144 -10.10.50.145 -10.10.50.146 -10.10.50.147 -10.10.50.148 -10.10.50.149 -10.10.50.150 -10.10.50.151 -10.10.50.152 -10.10.50.153 -10.10.50.154 -10.10.50.155 -10.10.50.156 -10.10.50.157 -10.10.50.158 -10.10.50.159 -10.10.50.160 -10.10.50.161 -10.10.50.162 -10.10.50.163 -10.10.50.164 -10.10.50.165 -10.10.50.166 -10.10.50.167 -10.10.50.168 -10.10.50.169 -10.10.50.170 -10.10.50.171 -10.10.50.172 -10.10.50.173 -10.10.50.174 -10.10.50.175 -10.10.50.176 -10.10.50.177 -10.10.50.178 -10.10.50.179 -10.10.50.180 -10.10.50.181 -10.10.50.182 -10.10.50.183 -10.10.50.184 -10.10.50.185 -10.10.50.186 -10.10.50.187 -10.10.50.188 -10.10.50.189 -10.10.50.190 -10.10.50.191 -10.10.50.192 -10.10.50.193 -10.10.50.194 -10.10.50.195 -10.10.50.196 -10.10.50.197 -10.10.50.198 -10.10.50.199 -10.10.50.200 -10.10.50.201 -10.10.50.202 -10.10.50.203 -10.10.50.204 -10.10.50.205 -10.10.50.206 -10.10.50.207 -10.10.50.208 -10.10.50.209 -10.10.50.210 -10.10.50.211 -10.10.50.212 -10.10.50.213 -10.10.50.214 -10.10.50.215 -10.10.50.216 -10.10.50.217 -10.10.50.218 -10.10.50.219 -10.10.50.220 -10.10.50.221 -10.10.50.222 -10.10.50.223 -10.10.50.224 -10.10.50.225 -10.10.50.226 -10.10.50.227 -10.10.50.228 -10.10.50.229 -10.10.50.230 -10.10.50.231 -10.10.50.232 -10.10.50.233 -10.10.50.234 -10.10.50.235 -10.10.50.236 -10.10.50.237 -10.10.50.238 -10.10.50.239 -10.10.50.240 -10.10.50.241 -10.10.50.242 -10.10.50.243 -10.10.50.244 -10.10.50.245 -10.10.50.246 -10.10.50.247 -10.10.50.248 -10.10.50.249 -10.10.50.250 +13.225.99.128 authserver.mojang.com +13.107.246.31 resources.download.minecraft.net +13.107.246.31 libraries.minecraft.net +13.107.246.31 launcher.mojang.com +13.107.246.31 launchermeta.mojang.com +13.107.246.31 sessionserver.mojang.com +13.107.246.31 api.minecraftservices.com +13.107.246.31 textures.minecraft.net +13.107.246.31 redstone-launcher.mojang.com +13.107.246.31 api.mojang.com \ No newline at end of file