Update:更新了一些小脚本

This commit is contained in:
Akatsuki-Misaki 2025-02-24 22:48:23 +08:00
parent 779350df46
commit ed857900ae
10 changed files with 909 additions and 137 deletions

4
.gitignore vendored
View File

@ -5,4 +5,6 @@ build
dist
@*
Home_ping_log.txt
Server_guangzhou_ping_log.txt
Server_guangzhou_ping_log.txt
main_*.py
*@*

49
PHP/ipsearch.php Normal file
View File

@ -0,0 +1,49 @@
<?php
//允许跨域
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS');
header('Access-Control-Allow-Headers: Content-Type, Authorization');
$ip_address = $_SERVER['HTTP_X_FORWARDED_FOR'];
// 可能会获取到多个ip仅此使用最前面的IP
$ip_address = explode(',', $ip_address)[0];
// 将获取到的IP进行地址查询 小小API
$info_ip = file_get_contents("https://v2.xxapi.cn/api/ip?ip=".$ip_address);
// 获取网络json的data中的address
$info_ip = json_decode($info_ip, true);
$info_ip_address = $info_ip['data']['address'];
$info_ip_isp = $info_ip['data']['isp'];
$format = $_GET['format'];
if($format === 'json'){
if($ip_address !== ''){
header('Content-Type: application/json');
http_response_code(200);
$data = array(
'ip' => $ip_address,
'address' => $info_ip_address,
'isp' => $info_ip_isp
);
echo json_encode($data);
}else{
header('Content-Type: application/json');
http_response_code(403);
$data = array(
'info' => '获取失败'
);
echo json_encode($data);
}
}else if($format === 'text'){
echo $ip_address;
}else{
header('Content-Type: application/json');
http_response_code(403);
$data = array(
'info' => '服务器认为格式有误(EC: 3).ο(=•ω<=)ρ⌒☆'
);
echo json_encode($data);
}
?>

View File

@ -1,133 +0,0 @@
<?php
$file = $_SERVER['REQUEST_URI'];
if(strpos($file, '/gh/') === 0) {
// 过滤 非/npm/开头的文件访问
}elseif(strpos($file, '/npm/') === 0) {
// 过滤 非/wp/开头的文件访问
}elseif(strpos($file, '/wp/') === 0) {
}else{
exit('/* 你不正常 */');
}
// 过滤 禁止php文件访问
if(strpos($file, '.php') !== false) exit('/* 你想干嘛? */');
//过滤没有文件后缀使用正则表达式
if(!preg_match('/\.\w+$/', $file)) exit('/* 你文件呢? */');
//过滤 非静态文件访问 js css img 等
if(!preg_match('/\.(js|css|png|jpg|jpeg|gif|bmp|ico|webp|mp3|mp4|webm|ogg|svg|eot|ttf|woff|woff2|json|xml|txt|swf|htc|pdf|doc|docx|xls|xlsx|ppt|pptx|zip|rar|gz|bz2)$/i', $file)) exit('/* 文件格式不在白名单内 */');
// 过滤 非/gh/开头的文件访问
$self_path = pathinfo($_SERVER['PHP_SELF'], PATHINFO_DIRNAME); // 当前目录
$query = '';
if($_SERVER['QUERY_STRING']) // 有query string
{
$file = explode('?', $file)[0]; // 去掉query string
$query = '?' . $_SERVER['QUERY_STRING']; // 重新构造query string
}
$file_info = pathinfo($file); // 获取文件信息
$path = $file_info['dirname'];
if($path=='/') exit('/* ??? */');
$mimetype = get_mimetype($file_info['extension']);
$cdn_file = $file;
if(strlen($self_path)>1){ // 非根目录
$cdn_file = substr($file, strlen($self_path)); // 去掉开头的目录
}
$local_path = substr(pathinfo( $cdn_file, PATHINFO_DIRNAME), 1); // 去掉开头的/
if($local_path && !is_dir($local_path)){ // 目录不存在
@mkdir($local_path, 755, true); // 创建目录
}
$url = 'https://cdn.jsdelivr.net' . $cdn_file . $query; // 构造CDN文件URL
$content = curl($url); // 获取文件内容
if($content){
header('content-type:'. $mimetype .';charset=utf-8'); // 输出文件头
file_put_contents(substr($cdn_file, 1), $content); // 保存文件
exit($content); // 输出文件
}else{
header('location: ' .$url );
}
function curl($url)
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_NOSIGNAL, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT_MS, 3000);
curl_setopt($ch, CURLOPT_TIMEOUT_MS, 3000);
if (strpos($url, 'https') !== false) {
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
}
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.190 Safari/537.36');
$result = curl_exec($ch);
curl_close($ch);
return $result;
}
/**
* 根据文件后缀获取其mine类型
* @param string $extension
* @return string
*/
function get_mimetype($extension) {
$ct['htm'] = 'text/html';
$ct['html'] = 'text/html';
$ct['txt'] = 'text/plain';
$ct['asc'] = 'text/plain';
$ct['bmp'] = 'image/bmp';
$ct['gif'] = 'image/gif';
$ct['jpeg'] = 'image/jpeg';
$ct['jpg'] = 'image/jpeg';
$ct['jpe'] = 'image/jpeg';
$ct['png'] = 'image/png';
$ct['ico'] = 'image/vnd.microsoft.icon';
$ct['mpeg'] = 'video/mpeg';
$ct['mpg'] = 'video/mpeg';
$ct['mpe'] = 'video/mpeg';
$ct['qt'] = 'video/quicktime';
$ct['mov'] = 'video/quicktime';
$ct['avi'] = 'video/x-msvideo';
$ct['wmv'] = 'video/x-ms-wmv';
$ct['mp2'] = 'audio/mpeg';
$ct['mp3'] = 'audio/mpeg';
$ct['rm'] = 'audio/x-pn-realaudio';
$ct['ram'] = 'audio/x-pn-realaudio';
$ct['rpm'] = 'audio/x-pn-realaudio-plugin';
$ct['ra'] = 'audio/x-realaudio';
$ct['wav'] = 'audio/x-wav';
$ct['css'] = 'text/css';
$ct['zip'] = 'application/zip';
$ct['pdf'] = 'application/pdf';
$ct['doc'] = 'application/msword';
$ct['bin'] = 'application/octet-stream';
$ct['exe'] = 'application/octet-stream';
$ct['class'] = 'application/octet-stream';
$ct['dll'] = 'application/octet-stream';
$ct['xls'] = 'application/vnd.ms-excel';
$ct['ppt'] = 'application/vnd.ms-powerpoint';
$ct['wbxml'] = 'application/vnd.wap.wbxml';
$ct['wmlc'] = 'application/vnd.wap.wmlc';
$ct['wmlsc'] = 'application/vnd.wap.wmlscriptc';
$ct['dvi'] = 'application/x-dvi';
$ct['spl'] = 'application/x-futuresplash';
$ct['gtar'] = 'application/x-gtar';
$ct['gzip'] = 'application/x-gzip';
$ct['js'] = 'application/javascript';
$ct['swf'] = 'application/x-shockwave-flash';
$ct['tar'] = 'application/x-tar';
$ct['7z'] = 'application/x7zcompressed';
$ct['rar'] = 'application/x-rar-compressed';
$ct['xhtml'] = 'application/xhtml+xml';
$ct['au'] = 'audio/basic';
$ct['snd'] = 'audio/basic';
$ct['midi'] = 'audio/midi';
$ct['mid'] = 'audio/midi';
$ct['m3u'] = 'audio/x-mpegurl';
$ct['tiff'] = 'image/tiff';
$ct['tif'] = 'image/tiff';
$ct['rtf'] = 'text/rtf';
$ct['wml'] = 'text/vnd.wap.wml';
$ct['wmls'] = 'text/vnd.wap.wmlscript';
$ct['xsl'] = 'text/xml';
$ct['xml'] = 'text/xml';
return isset($ct[strtolower($extension)]) ? $ct[strtolower($extension)] : 'text/html';
}

19
PHP/jsd加速/README.md Normal file
View File

@ -0,0 +1,19 @@
# 伪静态需求
```Apache
RewriteEngine on
RewriteBase /
RewriteCond $1 ^(index\.php)?$ [OR]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} ^index\.php?$
RewriteRule ^(.*)$ - [S=1]
RewriteRule . /index.php [L]
```
```nginx
location / {
try_files $uri $uri/ /index.php?$query_string;
}
```

203
PHP/jsd加速/index.php Normal file
View File

@ -0,0 +1,203 @@
<?php
header('Access-Control-Allow-Origin: *');
// 获取文件名
$file = $_SERVER['REQUEST_URI'];
// 获取文件类型
$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');
if($_SERVER['REQUEST_URI'] == '/'){
// 输出首页
header('content-type: text/html;charset=utf-8');
echo file_get_contents('jsd.html');
exit();
}
if($_SERVER['REQUEST_URI'] == '/help'){
header('content-type: application/json;charset=utf-8');
echo json_encode(array(
'code' => 200,
'title'=> 'Welcome to use OvOfish Studio API',
'message' => '这是一个反代接口,如有需要请联系管理员。',
'How_to_use' => '您只需将原有的域名更改为本站域名如需要使用jsdelivr的反代请添加/jsd如需要raw.githubusercontent.com则添加/gh',
'support_list' => '支持的接口:'.implode(',', array('/gh', '/jsd', '/unpkg')),
'file_ext_list' => '允许的后缀列表:'.implode(',', $allow_ext)
));
exit();
}
if($_SERVER['REQUEST_URI'] == '/contact'){
header('content-type: application/json;charset=utf-8');
echo json_encode(array(
'code' => 200,
'title'=> 'Welcome to use OvOfish Studio API',
'message' => '这是一个反代接口,如有需要请联系管理员。',
'QQnumber' => '1709964150',
'email' => 'mirai@lolicon.team',
'blog' => 'https://lolicon.team'
));
exit();
}
if(empty($file_ext)){
header('content-type: application/json;charset=utf-8');
echo json_encode(array(
'code' => 403,
'title'=> 'Welcome to use OvOfish Studio API',
'message' => '未能识别到文件类型',
'file_ext' => '当前文件类型为NULL',
'file_ext_list' => '允许的后缀列表:'.implode(',', $allow_ext)
));
exit();
}
// 判断后缀是否在允许的后缀列表中 如果不在则返回403
if(!in_array($file_ext, $allow_ext)){
header('content-type: application/json;charset=utf-8');
echo json_encode(array(
'code' => 403,
'title'=> 'Welcome to OvOfish Studio API',
'message' => '该文件类型不被允许, 请不要滥用本接口。',
'file_ext' => '当前文件类型为:'.$file_ext,
'file_ext_list' => '允许的后缀列表:'.implode(',', $allow_ext)
));
exit();
}
$mimetype = get_mimetype($file_info['extension']);
header('content-type:'. $mimetype .';charset=utf-8');
// 代理的域名及使用的协议最后不用加/
$target_host = "";
$new_request_uri = "";
if (strpos($_SERVER['REQUEST_URI'], '/gh') === 0) {
$target_host = "https://raw.githubusercontent.com";
$new_request_uri = substr($_SERVER['REQUEST_URI'], 3);
} elseif (strpos($_SERVER['REQUEST_URI'], '/jsd') === 0) {
$target_host = "https://cdn.jsdelivr.net";
$new_request_uri = substr($_SERVER['REQUEST_URI'], 5);
}elseif (strpos($_SERVER['REQUEST_URI'], '/unpkg') === 0) {
$target_host = "https://unpkg.com";
$new_request_uri = substr($_SERVER['REQUEST_URI'], 6);
} else {
header('content-type: application/json;charset=utf-8');
// 返回404状态
http_response_code(404);
echo json_encode(array(
'code' => 404,
'title'=> 'Welcome to use OvOfish Studio API',
'message' => '无效的请求路径'
));
exit;
}
// 解析url参数
function get_request_params()
{
$url = $_SERVER["REQUEST_URI"];
$refer_url = parse_url($url);
$params = $refer_url['query'];
$arr = array();
if(!empty($params))
{
$paramsArr = explode('&',$params);
foreach($paramsArr as $k=>$v)
{
$a = explode('=',$v);
$arr[$a[0]] = $a[1];
}
}
return $arr;
}
// 解析HTTP响应头
function parse_headers($headers)
{
global $root, $top;
foreach( $headers as $k=>$v )
{
$t = explode( ':', $v, 2 );
if( isset( $t[1] ) )
{
if(strcasecmp('Set-Cookie',trim($t[0]))==0)
{
$targetcookie=trim( $t[1] ).";";
$res_cookie=preg_replace("/domain=.*?;/","domain=".$_SERVER["SERVER_NAME"].";",$targetcookie);
$res_cookie=substr($res_cookie,0,strlen($res_cookie)-1);
header("Set-Cookie: ".$res_cookie);
}
elseif(strcasecmp('Content-Type',trim($t[0]))==0)
{
header("Content-Type: ".trim( $t[1] ));
}
elseif(strcasecmp('Location',trim( $t[0] ))==0)
{
$relocation=str_replace($protocal_host['host'],$_SERVER["SERVER_NAME"],trim( $t[1] ));
header("Location: ".$relocation);
}
elseif(strcasecmp('cache-control',trim( $t[0] ))==0)
{
header("cache-control: ".trim( $t[1] ));
}
else
continue;
}
}
return;
}
// 组装HTTP请求头
$opts = array(
'http'=>array(
'method'=>$_SERVER['REQUEST_METHOD'],
'header'=>"Accept-language: zh-CN\r\n" .
"user-agent: {$_SERVER['HTTP_USER_AGENT']}\r\n".
"Cookie: ".array_to_str($_COOKIE)."\r\n"
)
);
$context = stream_context_create($opts);
// 发送请求
$homepage = file_get_contents($target_host.'/'.$new_request_uri,false,$context);
if ($homepage === FALSE) {
header('content-type: application/json;charset=utf-8');
echo json_encode(array(
'code' => 404,
'title'=> 'Welcome to use OvOfish Studio API',
'message' => '未能找到文件',
'file_ext' => '当前文件类型为:'.$file_ext
));
exit;
}
function get_mimetype($extension) {
// MIME类型数组
$ct = array(
'js' => 'application/javascript',
'css' => 'text/css',
'png' => 'image/png',
'jpg' => 'image/jpeg',
'jpeg' => 'image/jpeg',
'gif' => 'image/gif',
'ico' => 'image/vnd.microsoft.icon',
'json' => 'application/json',
'txt' => 'text/plain',
'moc' => 'text/plain',
'moc3' => 'text/plain',
'svg' => 'image/svg+xml',
'webp' => 'image/webp'
);
return isset($ct[strtolower($extension)]) ? $ct[strtolower($extension)] : 'text/plain';
}
function array_to_str($array)
{
$string="";
if (is_array($array))
{
foreach ($array as $key => $value)
{
if(!empty($string))
$string.="; ".$key."=".$value;
else
$string.=$key."=".$value;
}
} else
{
$string = $array;
}
return $string;
}
// 输出网页内容
echo $homepage;
?>

387
PHP/jsd加速/jsd.html Normal file
View File

@ -0,0 +1,387 @@
<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='utf-8'>
<title>ovofish - A free, fast, and reliable CDN for JS and open source</title>
</head>
<body>
<div>
<style>
* {
box-sizing: border-box;
}
body {
margin: 0;
}
#i72pql {
vertical-align: inherit;
}
* {
box-sizing: border-box;
}
body {
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
margin-left: 0px;
font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Roboto, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft Yahei", "Microsoft Jhenghei", sans-serif;
}
.logo path {
pointer-events: none;
fill: none;
stroke-linecap: round;
stroke-width: 7px;
stroke: rgb(255, 255, 255);
}
.wechat-group img {
max-width: 220px;
height: auto;
border-top-left-radius: 8px;
border-top-right-radius: 8px;
border-bottom-right-radius: 8px;
border-bottom-left-radius: 8px;
margin-top: 0px;
margin-right: auto;
margin-bottom: 0px;
margin-left: auto;
width: 100%;
}
.welcome-img img {
width: 100%;
}
#header:not(.sticky-header) #logo a {
opacity: 0;
pointer-events: none;
}
.display-1.mb-3.text-white {
font-size: 45px;
}
.fdb-block {
font-family: "Roboto", sans-serif;
font-size: 16px;
line-height: 1.5;
text-rendering: optimizelegibility;
padding-top: 100px;
padding-right: 0px;
padding-bottom: 100px;
padding-left: 0px;
color: rgb(68, 68, 68);
position: relative;
background-size: cover;
background-position-x: center;
background-position-y: center;
background-color: rgb(255, 255, 255);
}
.text-center {
text-align: center;
}
.fdb-block .text-h1,
.fdb-block h1 {
font-size: 1.75rem;
margin-bottom: 0.5em;
margin-top: 0.3em;
font-weight: 400;
}
.img-fluid {
max-width: 100%;
height: auto;
}
.fdb-block .col-fill-left {
width: 50%;
position: absolute;
left: 0px;
top: 0px;
bottom: 0px;
background-size: cover;
background-position-x: center;
background-position-y: center;
z-index: 1;
}
a {
color: rgb(0, 123, 255);
text-decoration-line: none;
text-decoration-style: solid;
text-decoration-color: currentcolor;
text-decoration-thickness: auto;
background-color: transparent;
}
a:hover {
color: rgb(0, 86, 179);
text-decoration-line: underline;
text-decoration-style: solid;
text-decoration-color: currentcolor;
text-decoration-thickness: auto;
}
.c102664 {
background-image: url(img/bg_c_1.svg);
}
.col-fill-left.c102664 {
background-repeat: no-repeat;
background-position: center center;
background-attachment: scroll;
background-size: cover;
background-image: url('https://img-bohe.lolicon.team/i/img/img-cdn/74573F0B38416BABA998256E6240C0A7.jpg');
}
.lead.px-md-12.px-lg-12.px-xl-15.px-xxl-18 {
text-align: center;
font-size: 18px;
}
.progress-list .progressbar.line {
height: 8px;
background-color: rgb(244, 244, 244);
}
.fdb-block img.fdb-icon {
width: 60px;
}
.pt-4 {
padding-top: 1.5rem !important;
}
.mt-5 {
margin-top: 3rem !important;
}
.fdb-block img+h3,
.fdb-block img+h4,
.fdb-block img+p {
margin-top: 20px;
}
.fdb-block .text-h3,
.fdb-block h3 {
font-size: 0.875rem;
margin-bottom: 0.5em;
margin-top: 0.3em;
font-weight: 400;
}
@media (min-width: 576px) {
.pt-sm-0 {
padding-top: 0px !important;
}
}
@media (max-width: 992px) {
#iwtj0h{
display: none;
}
#helpx{
flex:none;
max-width:none;
}
}
</style>
<div>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="A free, fast, and reliable CDN for JS and open source" />
<meta name="keywords"
content="A free, fast, and reliable CDN for JS and open source" />
<meta name="author" content="OvOFish" />
<title>ovofish - A free, fast, and reliable CDN for JS and open source</title>
<link rel="preload" href="fonts/Unicons.woff2" as="font" type="font/woff2" crossorigin="" />
<link rel="shortcut icon" href="https://img-bohe.lolicon.team/i/img/svg/logo.ico" />
<link rel="stylesheet" href="https://down-cdn.lolicon.team/static/miraipip/css/plugins.css" />
<link rel="stylesheet" href="https://down-cdn.lolicon.team/static/miraipip/css/style.css" />
<nav id="sticky-navbar" class="navbar navbar-expand-lg classic transparent navbar-light navbar-clone fixed">
<div class="container flex-lg-row flex-nowrap align-items-center">
<div class="navbar-brand w-100"><a href="/"><img style="width: 24vh;" src="https://img-bohe.lolicon.team/i/img/svg/logo-small-dark.webp" alt="" /></a></div>
<div class="navbar-collapse offcanvas offcanvas-nav offcanvas-start">
<div class="offcanvas-header d-lg-none">
<h3 class="text-white fs-30 mb-0">LOLICON.TEAM</h3><button type="button"
data-bs-dismiss="offcanvas" aria-label="Close"
class="btn-close btn-close-white"></button>
</div>
<div class="offcanvas-body ms-lg-auto d-flex flex-column h-100">
<ul class="navbar-nav"><a href="/" class="nav-link">首页</a><a href="/help"
class="nav-link">帮助</a>
<li class="nav-item"><a href="https://lolicon.team" target="_blank"
class="nav-link">博客<br /></a></li>
<li class="nav-item dropdown"></li>
</ul><!-- /.navbar-nav -->
<div class="offcanvas-footer d-lg-none">
<div><a href="mailto:mirai@lolicon.team" class="link-inverse">mirai@lolicon.team</a><br />
QQ:1709964150<br />
</div>
</div><!-- /.offcanvas-footer -->
</div><!-- /.offcanvas-body -->
</div><!-- /.navbar-collapse -->
</div><!-- /.container -->
</nav>
<div class="content-wrapper">
<header class="wrapper bg-soft-primary">
<nav class="navbar navbar-expand-lg center-nav transparent position-absolute navbar-dark">
<div class="container flex-lg-row flex-nowrap align-items-center">
<div class="navbar-brand w-100"><a href="/"><img
src="https://img-bohe.lolicon.team/i/img/svg/logo-small-dark.webp" style="width: 24vh;" alt="" class="logo-dark" /><img
src="https://img-bohe.lolicon.team/i/img/svg/logo-small-dark.webp" style="width: 24vh;" alt="" class="logo-light" /></a></div>
<div class="navbar-collapse offcanvas offcanvas-nav offcanvas-start">
<div class="offcanvas-header d-lg-none">
<h3 class="text-white fs-30 mb-0">LOLICON.TEAM</h3><button type="button"
data-bs-dismiss="offcanvas" aria-label="Close"
class="btn-close btn-close-white"></button>
</div>
<div class="offcanvas-body ms-lg-auto d-flex flex-column h-100">
<ul class="navbar-nav">
<li class="nav-item"><a href="/" class="nav-link">首页</a></li>
<li class="nav-item dropdown"><a href="/help" class="nav-link">帮助</a></li>
<li class="nav-item dropdown">
</li><a href="https://lolicon.team" class="nav-link">博客</a>
</ul><!-- /.navbar-nav -->
</div><!-- /.offcanvas-body -->
</div><!-- /.navbar-collapse -->
<div class="navbar-other w-100 d-flex ms-auto">
<ul class="navbar-nav flex-row align-items-center ms-auto">
<li class="nav-item d-none d-md-block"><a href="/contact"
class="btn btn-sm btn-white rounded-pill">联系我们</a></li>
<li class="nav-item d-lg-none"><button type="button"
class="hamburger offcanvas-nav-btn"></button></li>
</ul><!-- /.navbar-nav -->
</div><!-- /.navbar-other -->
</div><!-- /.container -->
</nav><!-- /.navbar -->
</header><!-- /header -->
<section data-image-src="https://img-bohe.lolicon.team/i/img/img-cdn/Akatsuki/001922551404335.webp" style="background-position: fixed; background-size: cover; background-repeat: no-repeat; background-attachment: scroll; height: 75vh;"
class="wrapper image-wrapper bg-image bg-overlay text-white">
<div class="container pt-17 pb-12 pt-md-19 pb-md-16 text-center">
<div class="row">
<div class="col-md-10 mx-auto">
<div class="post-header">
<div class="post-category text-line text-white"><a href="#" rel="category"
class="text-reset">Fast. Reliable. Automated.</a></div><!-- /.post-category -->
<h1 class="display-1 mb-3 text-white">A free CDN for open source projects</h1>
<p class="lead px-md-12 px-lg-12 px-xl-15 px-xxl-18">
前端文件加速服务,<br />妈妈再也不用担心我的博客加载慢啦!</p>
</div><!-- /.post-header -->
</div><!-- /column -->
</div><!-- /.row -->
</div><!-- /.container -->
</section><!-- /section -->
<section class="wrapper bg-light wrapper-border">
<div class="container pt-14 pt-md-16 pb-13 pb-md-15">
<div class="container py-10">
<link rel="stylesheet" href="https://down-cdn.lolicon.team/static/miraipip/css/bootstrap.min.css" />
<section data-block-type="contents" data-id="3" draggable="true" class="fdb-block">
<div id="iwtj0h" class="col-fill-left c102664"></div>
<div class="container">
<div class="row justify-content-end">
<div class="col-12 col-md-5 text-center" id="helpx">
<h1>安心稳定的服务</h1>
<p class="text-h3">
由于本项目是反代jsdelivr和github的raw。<br />具有亚太CDN缓存(亚马逊服务器)<br />为了防止被滥用,我们限制了文件类型<br />
</p>
<p class="mt-4"><a href="/help">使用方法 &gt;</a></p>
</div>
</div>
</div>
</section><!--/.row -->
</div>
<link rel="stylesheet" href="https://down-cdn.lolicon.team/static/miraipip/css/plugins.css" />
<link rel="stylesheet" href="https://down-cdn.lolicon.team/static/miraipip/css/style.css" />
<link rel="stylesheet" href="https://down-cdn.lolicon.team/static/miraipip/css/bootstrap.min.css" />
<section data-block-type="features" data-id="4" draggable="true" class="fdb-block">
<div class="container">
<div class="row justify-content-center">
<div class="col-12 text-center">
<h1>
<font>
<h2 class="text-4xl font-bold max-w-lg md:text-5xl">
<font id="i72pql">探索更多的可能</font>
</h2>
</font>
</h1>
</div>
</div>
<div class="row text-center mt-5">
<div class="col-12 col-sm-4"><img alt="image" src="https://down-cdn.lolicon.team/static/miraipip/img/img_round.svg"
class="fdb-icon" />
<h3><strong>稳定性</strong></h3>
<p>服务使用市面上成熟可靠的程序和服务为OvOFish Studio API提供了稳固的底层基础。</p>
</div>
<div class="col-12 col-sm-4 pt-4 pt-sm-0"><img alt="image" src="https://down-cdn.lolicon.team/static/miraipip/img/img_round.svg"
class="fdb-icon" />
<h3><strong>安全性</strong></h3>
<p>OvOFish Studio API使用质量可靠的SSL证书最低TLS版本为1.2,保障文件不被篡改。</p>
</div>
<div class="col-12 col-sm-4 pt-4 pt-sm-0"><img alt="image" src="https://down-cdn.lolicon.team/static/miraipip/img/img_round.svg"
class="fdb-icon" />
<h3><strong>高速传输</strong></h3>
<p>使用亚马逊服务器搭建的CDN加速保障每一次文件加载都是最快延迟极低的本地缓存让除第一次访问外的回源无比迅速。</p>
</div>
</div>
<div class="row mt-5">
<div class="col-12"><img alt="image" src="https://img-bohe.lolicon.team/i/img/img-cdn/Akatsuki/2BF88138E5D3FB086F90A0CEB84BC475.jpg" class="img-fluid" /></div>
</div>
</div>
</section>
<section class="wrapper"><!-- /.container --></section><!-- /section -->
<script src="https://down-cdn.lolicon.team/static/miraipip/js/plugins.js"></script>
<script src="https://down-cdn.lolicon.team/static/miraipip/js/theme.js"></script><!-- /.row -->
</div><!-- /.container -->
<div class="container-fluid px-md-6"><!-- /.swiper-container --></div><!-- /.container-fluid -->
</section><!-- /section -->
<section class="wrapper bg-light"><!-- /.container --></section><!-- /section -->
</div><!-- /.content-wrapper -->
<footer class="bg-dark text-inverse">
<div class="container py-13 py-md-15">
<div class="row gy-6 gy-lg-0">
<div class="col-md-4 col-lg-3">
<div class="widget"><img src="https://img-bohe.lolicon.team/i/static/beta/img/logo-small-white1.webp" style="width: 22vh;" alt="" class="mb-4" />
<p class="mb-4">© 2024 OvOFish Studio. <br class="d-none d-lg-block" />All rights reserved.</p>
<!-- /.social -->
</div><!-- /.widget -->
</div><!-- /column -->
<div class="col-md-4 col-lg-3">
<div class="widget">
<h4 class="widget-title text-white mb-3">联系我们</h4>
<address class="pe-xl-15 pe-xxl-17">中国·广东·肇庆</address><a
href="mailto:mirai@lolicon.team">mirai@lolicon.team</a><br />
</div><!-- /.widget -->
</div><!-- /column -->
<div class="col-md-4 col-lg-3">
<div class="widget">
<h4 class="widget-title text-white mb-3">了解更多</h4>
<ul class="list-unstyled mb-0">
<li><a href="/help">查询帮助</a></li>
</ul>
</div><!-- /.widget -->
</div><!-- /column -->
<div class="col-md-12 col-lg-3">
<div class="widget">
<h4 class="widget-title text-white mb-3">电子邮件</h4>
<p class="mb-5">您可以发送邮件到:<a href="mail:mirai@lolicon.team"
class="hover">mirai@lolicon.team</a>联系我们!</p><!-- /.newsletter-wrapper -->
</div><!-- /.widget -->
</div><!-- /column -->
</div><!--/.row -->
</div><!-- /.container -->
</footer>
<script src="https://down-cdn.lolicon.team/static/miraipip/js/plugins.js"></script>
<script src="https://down-cdn.lolicon.team/static/miraipip/js/theme.js"></script>
</div>
</div>
</body>
</html>

View File

@ -7,7 +7,7 @@ from requests.adapters import HTTPAdapter
from urllib3.util.retry import Retry
# 配置
url = "https://unpkg.ovofish.com/"
url = "https://unpkg.com/"
headers = {
'Accept-Language': 'zh-CN,zh;q=0.8',
'Content-Type': 'text/html; Charset=utf-8',
@ -123,8 +123,8 @@ else:
use_proxy = input("是否使用代理?(输入 'y''n': ").lower()
if use_proxy == 'y':
# 获取代理设置
default_proxy_host = "10.10.50.210" # 设置默认代理主机
default_proxy_port = 65115 # 设置默认代理端口
default_proxy_host = "10.10.50.65" # 设置默认代理主机
default_proxy_port = 7897 # 设置默认代理端口
proxy_host = input(f"请输入代理主机 (默认为 {default_proxy_host}): ") or default_proxy_host
proxy_port = int(input(f"请输入代理端口 (默认为 {default_proxy_port}): ") or default_proxy_port)

View File

@ -0,0 +1,13 @@
<div align="center">
<img height="100px" alt="logo" src="https://img-bohe.lolicon.team/i/img/svg/logo.ico"/>
<p><em>🗂OVOFISH STUDIO</em></p>
# 说明
这是一个自动化音频转换格式的脚本
因为wav格式不支持内部歌词数据所以要转为flac格式
运行前请先安装依赖库
```
pip install pydub mutagen eyed3
```

View File

@ -0,0 +1,71 @@
import os
from pydub import AudioSegment
import eyed3
from mutagen.flac import FLAC
def convert_and_clean(wav_path):
try:
# 增强版元数据读取
tags = {}
audiofile = eyed3.load(wav_path)
# 处理无标签文件
if audiofile is not None and audiofile.tag is not None:
tags = {
'ARTIST': audiofile.tag.artist or '',
'ALBUM': audiofile.tag.album or '',
'TITLE': audiofile.tag.title or '',
'GENRE': audiofile.tag.genre.name if audiofile.tag.genre else '',
'DATE': str(audiofile.tag.getBestDate()) or '',
'TRACKNUMBER': str(audiofile.tag.track_num[0]) if audiofile.tag.track_num else ''
}
else:
# 从文件名提取基础信息
filename = os.path.basename(wav_path)
base_info = os.path.splitext(filename)[0].split('-', 1)
if len(base_info) > 1:
tags['ARTIST'] = base_info[0].strip()
tags['TITLE'] = base_info[1].strip()
# 转换音频格式
flac_path = os.path.splitext(wav_path)[0] + '.flac'
AudioSegment.from_wav(wav_path).export(flac_path, format='flac')
# 写入FLAC元数据
if tags:
flac_audio = FLAC(flac_path)
flac_audio.delete()
flac_audio.update(tags)
flac_audio.save()
# 安全删除验证
if os.path.exists(flac_path) and os.path.getsize(flac_path) > 0:
os.remove(wav_path)
print(f"成功转换并删除: {wav_path}")
return True
return False
except Exception as e:
print(f"处理失败 {wav_path}: {str(e)}")
if 'flac_path' in locals() and os.path.exists(flac_path):
os.remove(flac_path)
return False
def batch_convert():
deleted_count = 0
error_count = 0
for root, _, files in os.walk('.'):
for file in files:
if file.lower().endswith('.wav'):
full_path = os.path.join(root, file)
if convert_and_clean(full_path):
deleted_count += 1
else:
error_count += 1
print(f"\n转换总结:\n成功转换并删除: {deleted_count} 个文件\n失败文件: {error_count}")
if __name__ == "__main__":
print("=== WAV转FLAC工具 (增强安全版) ===")
batch_convert()

161
ip.txt Normal file
View File

@ -0,0 +1,161 @@
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