2024-10-26 10:38:22 +08:00
|
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
include './cfg.php';
|
|
|
|
|
|
|
|
|
|
$themeDir = "$neko_www/assets/theme";
|
|
|
|
|
$tmpPath = "$neko_www/lib/selected_config.txt";
|
|
|
|
|
$arrFiles = array();
|
|
|
|
|
$arrFiles = glob("$themeDir/*.css");
|
|
|
|
|
|
|
|
|
|
for($x=0;$x<count($arrFiles);$x++) $arrFiles[$x] = substr($arrFiles[$x], strlen($themeDir)+1);
|
|
|
|
|
|
|
|
|
|
if(isset($_POST['themechange'])){
|
|
|
|
|
$dt = $_POST['themechange'];
|
|
|
|
|
shell_exec("echo $dt > $neko_www/lib/theme.txt");
|
|
|
|
|
$neko_theme = $dt;
|
|
|
|
|
}
|
|
|
|
|
if(isset($_POST['fw'])){
|
|
|
|
|
$dt = $_POST['fw'];
|
|
|
|
|
if ($dt == 'enable') shell_exec("uci set neko.cfg.new_interface='1' && uci commit neko");
|
|
|
|
|
if ($dt == 'disable') shell_exec("uci set neko.cfg.new_interface='0' && uci commit neko");
|
|
|
|
|
}
|
|
|
|
|
$fwstatus=shell_exec("uci get neko.cfg.new_interface");
|
|
|
|
|
?>
|
|
|
|
|
<?php
|
|
|
|
|
function getSingboxVersion() {
|
|
|
|
|
$singBoxPath = '/usr/bin/sing-box';
|
|
|
|
|
$command = "$singBoxPath version 2>&1";
|
|
|
|
|
exec($command, $output, $returnVar);
|
|
|
|
|
|
|
|
|
|
if ($returnVar === 0) {
|
|
|
|
|
foreach ($output as $line) {
|
|
|
|
|
if (strpos($line, 'version') !== false) {
|
|
|
|
|
$parts = explode(' ', $line);
|
|
|
|
|
return end($parts);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return '未知版本';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$singBoxVersion = getSingboxVersion();
|
|
|
|
|
?>
|
2024-10-26 16:23:41 +08:00
|
|
|
|
|
|
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
function getUiVersion() {
|
2024-12-04 09:43:01 +08:00
|
|
|
|
$versionFile = '/etc/neko/ui/zashboard/version.txt';
|
2024-10-26 16:23:41 +08:00
|
|
|
|
|
|
|
|
|
if (file_exists($versionFile)) {
|
|
|
|
|
return trim(file_get_contents($versionFile));
|
|
|
|
|
} else {
|
|
|
|
|
return "版本文件不存在";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$uiVersion = getUiVersion();
|
|
|
|
|
?>
|
|
|
|
|
|
2024-10-26 10:38:22 +08:00
|
|
|
|
<!doctype html>
|
|
|
|
|
<html lang="en" data-bs-theme="<?php echo substr($neko_theme,0,-4) ?>">
|
|
|
|
|
<head>
|
|
|
|
|
<meta charset="utf-8">
|
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
|
|
<title>Settings - Neko</title>
|
|
|
|
|
<link rel="icon" href="./assets/img/nekobox.png">
|
|
|
|
|
<link href="./assets/css/bootstrap.min.css" rel="stylesheet">
|
|
|
|
|
<link href="./assets/theme/<?php echo $neko_theme ?>" rel="stylesheet">
|
|
|
|
|
<link href="./assets/css/custom.css" rel="stylesheet">
|
|
|
|
|
<script type="text/javascript" src="./assets/js/bootstrap.min.js"></script>
|
|
|
|
|
<script type="text/javascript" src="./assets/js/feather.min.js"></script>
|
2024-10-26 16:23:41 +08:00
|
|
|
|
<script type="text/javascript" src="./assets/bootstrap/bootstrap.bundle.min.js"></script>
|
2024-10-26 10:38:22 +08:00
|
|
|
|
<script type="text/javascript" src="./assets/js/jquery-2.1.3.min.js"></script>
|
|
|
|
|
<script type="text/javascript" src="./assets/js/neko.js"></script>
|
2024-11-03 20:36:08 +08:00
|
|
|
|
<?php include './ping.php'; ?>
|
2024-10-26 10:38:22 +08:00
|
|
|
|
</head>
|
|
|
|
|
<body>
|
|
|
|
|
<div class="container-sm container-bg text-center callout border border-3 rounded-4 col-11">
|
|
|
|
|
<div class="row">
|
|
|
|
|
<a href="./" class="col btn btn-lg">🏠 首页</a>
|
|
|
|
|
<a href="./dashboard.php" class="col btn btn-lg">📊 面板</a>
|
|
|
|
|
<a href="./configs.php" class="col btn btn-lg">⚙️ 配置</a>
|
2024-12-04 09:43:01 +08:00
|
|
|
|
<a href="/nekobox/mon.php" class="col btn btn-lg"></i>📦 订阅</a>
|
2024-10-26 10:38:22 +08:00
|
|
|
|
<a href="#" class="col btn btn-lg">🛠️ 设定</a>
|
2024-11-06 09:24:05 +08:00
|
|
|
|
<div class="container px-4">
|
|
|
|
|
<h2 class="text-center p-2 mb-3">主题设定</h2>
|
|
|
|
|
<form action="settings.php" method="post">
|
|
|
|
|
<div class="text-center justify-content-md-center">
|
|
|
|
|
<div class="row justify-content-md-center">
|
|
|
|
|
<div class="col mb-3 justify-content-md-center">
|
|
|
|
|
<select class="form-select" name="themechange" aria-label="themex">
|
|
|
|
|
<option selected>Change Theme (<?php echo $neko_theme ?>)</option>
|
|
|
|
|
<?php foreach ($arrFiles as $file) echo "<option value=\"".$file.'">'.$file."</option>" ?>
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
2024-10-26 10:38:22 +08:00
|
|
|
|
<div class="row justify-content-md-center">
|
2024-11-06 09:24:05 +08:00
|
|
|
|
<div class="col justify-content-md-center mb-3">
|
|
|
|
|
<input class="btn btn-info" type="submit" value="🖫 更改主题">
|
2024-10-26 10:38:22 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2024-11-06 09:24:05 +08:00
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
<div class="card mb-4">
|
|
|
|
|
<div class="card-body">
|
|
|
|
|
<table class="table table-borderless mb-3">
|
|
|
|
|
<tbody>
|
|
|
|
|
<tr>
|
|
|
|
|
<td colspan="2">
|
|
|
|
|
<h2 class="text-center mb-3">自动重载防火墙</h2>
|
|
|
|
|
<form action="settings.php" method="post">
|
|
|
|
|
<div class="btn-group d-flex justify-content-center">
|
|
|
|
|
<button type="submit" name="fw" value="enable" class="btn btn<?php if($fwstatus==1) echo "-outline" ?>-success <?php if($fwstatus==1) echo "disabled" ?>">启用</button>
|
|
|
|
|
<button type="submit" name="fw" value="disable" class="btn btn<?php if($fwstatus==0) echo "-outline" ?>-danger <?php if($fwstatus==0) echo "disabled" ?>">停用</button>
|
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td colspan="2">
|
|
|
|
|
<div class="row g-4">
|
|
|
|
|
<div class="col-md-6 mb-3">
|
|
|
|
|
<div class="text-center">
|
|
|
|
|
<h3>客户端版本</h3>
|
|
|
|
|
<div class="form-control text-center" style="font-family: monospace; text-align: center;">
|
2024-12-04 13:29:55 +08:00
|
|
|
|
<span id="cliver"></span><span id="NewCliver"> </span>
|
2024-11-06 09:24:05 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div class="text-center mt-2">
|
|
|
|
|
<button class="btn btn-pink" id="checkCliverButton">🔍 检测版本</button>
|
2024-11-24 12:24:44 +08:00
|
|
|
|
<button class="btn btn-info" id="updateButton" title="更新到最新版本" onclick="showUpdateVersionModal()">🔄 更新版本</button>
|
2024-10-26 10:38:22 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2024-11-06 09:24:05 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div class="col-md-6 mb-3">
|
|
|
|
|
<div class="text-center">
|
2024-12-03 16:28:37 +08:00
|
|
|
|
<h3>Ui 控制面板</h3>
|
2024-11-06 09:24:05 +08:00
|
|
|
|
<div class="form-control text-center">
|
2024-12-04 13:29:55 +08:00
|
|
|
|
<?php echo htmlspecialchars($uiVersion); ?><span id="NewUi"> </span>
|
2024-11-06 09:24:05 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div class="text-center mt-2">
|
|
|
|
|
<button class="btn btn-pink" id="checkUiButton">🔍 检测版本</button>
|
2024-12-03 16:28:37 +08:00
|
|
|
|
<button class="btn btn-info" id="updateUiButton" title="更新面板" onclick="showPanelSelector()">🔄 更新版本</button>
|
2024-10-26 16:23:41 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2024-11-06 09:24:05 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div class="col-md-6 mb-3">
|
|
|
|
|
<div class="text-center">
|
|
|
|
|
<h3>Sing-box 核心版本</h3>
|
|
|
|
|
<div class="form-control text-center">
|
|
|
|
|
<div id="singBoxCorever">
|
2024-12-04 13:29:55 +08:00
|
|
|
|
<?php echo htmlspecialchars($singBoxVersion); ?><span id="NewSingbox"></span>
|
2024-10-26 10:38:22 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2024-11-06 09:24:05 +08:00
|
|
|
|
<div class="text-center mt-2">
|
|
|
|
|
<button class="btn btn-pink" id="checkSingboxButton">🔍 检测版本</button>
|
|
|
|
|
<button class="btn btn-info" id="singboxOptionsButton" title="Singbox 相关操作">🔄 更新版本</button>
|
|
|
|
|
</div>
|
2024-10-26 10:38:22 +08:00
|
|
|
|
</div>
|
2024-11-06 09:24:05 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div class="col-md-6 mb-3">
|
|
|
|
|
<div class="text-center">
|
|
|
|
|
<h3>Mihomo 核心版本</h3>
|
|
|
|
|
<div class="form-control text-center">
|
2024-12-04 13:29:55 +08:00
|
|
|
|
<span id="corever"></span><span id="NewMihomo"> </span>
|
2024-11-06 09:24:05 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div class="text-center mt-2">
|
|
|
|
|
<button class="btn btn-pink" id="checkMihomoButton">🔍 检测版本</button>
|
2024-11-24 11:00:22 +08:00
|
|
|
|
<button class="btn btn-info" id="updateCoreButton" title="更新 Mihomo 内核" onclick="showMihomoVersionSelector()">🔄 更新版本</button>
|
2024-10-26 10:38:22 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2024-11-06 09:24:05 +08:00
|
|
|
|
</div>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
2024-12-03 16:28:37 +08:00
|
|
|
|
|
2024-11-24 12:24:44 +08:00
|
|
|
|
<div class="modal fade" id="updateVersionModal" tabindex="-1" aria-labelledby="updateVersionModalLabel" aria-hidden="true" data-bs-backdrop="static" data-bs-keyboard="false">
|
|
|
|
|
<div class="modal-dialog modal-lg">
|
|
|
|
|
<div class="modal-content">
|
|
|
|
|
<div class="modal-header">
|
|
|
|
|
<h5 class="modal-title" id="updateVersionModalLabel">选择更新版本语言</h5>
|
|
|
|
|
<button type="button" class="close" data-bs-dismiss="modal" aria-label="Close">
|
|
|
|
|
<span aria-hidden="true">×</span>
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="modal-body">
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label for="languageSelect">选择语言</label>
|
|
|
|
|
<select id="languageSelect" class="form-select">
|
|
|
|
|
<option value="cn">中文版</option>
|
|
|
|
|
<option value="en">英文版</option>
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="modal-footer">
|
|
|
|
|
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">取消</button>
|
|
|
|
|
<button type="button" class="btn btn-primary" onclick="confirmUpdateVersion()">确认</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2024-11-24 11:00:22 +08:00
|
|
|
|
<div class="modal fade" id="mihomoVersionSelectionModal" tabindex="-1" aria-labelledby="mihomoVersionSelectionModalLabel" aria-hidden="true" data-bs-backdrop="static" data-bs-keyboard="false">
|
|
|
|
|
<div class="modal-dialog modal-lg">
|
|
|
|
|
<div class="modal-content">
|
|
|
|
|
<div class="modal-header">
|
|
|
|
|
<h5 class="modal-title" id="mihomoVersionSelectionModalLabel">选择 Mihomo 内核版本</h5>
|
|
|
|
|
<button type="button" class="close" data-bs-dismiss="modal" aria-label="Close">
|
|
|
|
|
<span aria-hidden="true">×</span>
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="modal-body">
|
|
|
|
|
<select id="mihomoVersionSelect" class="form-select">
|
|
|
|
|
<option value="stable">稳定版</option>
|
|
|
|
|
<option value="preview">预览版</option>
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="modal-footer">
|
|
|
|
|
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">取消</button>
|
|
|
|
|
<button type="button" class="btn btn-primary" onclick="confirmMihomoVersion()">确认</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2024-12-03 16:28:37 +08:00
|
|
|
|
|
2024-11-06 09:24:05 +08:00
|
|
|
|
<div class="modal fade" id="optionsModal" tabindex="-1" aria-labelledby="optionsModalLabel" aria-hidden="true" data-bs-backdrop="static" data-bs-keyboard="false">
|
|
|
|
|
<div class="modal-dialog modal-lg">
|
|
|
|
|
<div class="modal-content">
|
|
|
|
|
<div class="modal-header">
|
|
|
|
|
<h5 class="modal-title" id="optionsModalLabel">选择操作</h5>
|
|
|
|
|
<button type="button" class="close" data-bs-dismiss="modal" aria-label="Close">
|
|
|
|
|
<span aria-hidden="true">×</span>
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="modal-body">
|
|
|
|
|
<div class="d-grid gap-2">
|
2024-11-24 11:00:22 +08:00
|
|
|
|
<button class="btn btn-info" onclick="showSingboxVersionSelector()">更新 Singbox 内核(通道一)</button>
|
2024-11-26 10:55:19 +08:00
|
|
|
|
<button class="btn btn-success" onclick="showSingboxVersionSelectorForChannelTwo()">更新 Singbox 内核(通道二)</button>
|
2024-11-06 09:24:05 +08:00
|
|
|
|
<button class="btn btn-success" onclick="selectOperation('puernya')">切换 Puernya 内核</button>
|
|
|
|
|
<button class="btn btn-primary" onclick="selectOperation('rule')">更新 Singbox 规则集</button>
|
|
|
|
|
<button class="btn btn-primary" onclick="selectOperation('config')">更新 Mihomo 配置文件</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2024-11-08 10:44:50 +08:00
|
|
|
|
<div class="modal fade" id="versionSelectionModal" tabindex="-1" aria-labelledby="versionSelectionModalLabel" aria-hidden="true" data-bs-backdrop="static" data-bs-keyboard="false">
|
2024-11-13 00:25:36 +08:00
|
|
|
|
<div class="modal-dialog modal-lg">
|
2024-11-08 10:44:50 +08:00
|
|
|
|
<div class="modal-content">
|
|
|
|
|
<div class="modal-header">
|
2024-11-26 10:55:19 +08:00
|
|
|
|
<h5 class="modal-title" id="versionSelectionModalLabel">选择 Singbox 内核版本 (通道一)</h5>
|
2024-11-08 10:44:50 +08:00
|
|
|
|
<button type="button" class="close" data-bs-dismiss="modal" aria-label="Close">
|
|
|
|
|
<span aria-hidden="true">×</span>
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="modal-body">
|
|
|
|
|
<select id="singboxVersionSelect" class="form-select">
|
|
|
|
|
<option value="v1.11.0-alpha.6">v1.11.0-alpha.6</option>
|
|
|
|
|
<option value="v1.11.0-alpha.7">v1.11.0-alpha.7</option>
|
|
|
|
|
<option value="v1.11.0-alpha.8">v1.11.0-alpha.8</option>
|
|
|
|
|
<option value="v1.11.0-alpha.9">v1.11.0-alpha.9</option>
|
2024-11-09 20:34:05 +08:00
|
|
|
|
<option value="v1.11.0-alpha.10">v1.11.0-alpha.10</option>
|
2024-11-24 20:36:59 +08:00
|
|
|
|
<option value="v1.11.0-alpha.15">v1.11.0-alpha.15</option>
|
|
|
|
|
<option value="v1.11.0-alpha.20">v1.11.0-alpha.20</option>
|
2024-12-04 13:29:55 +08:00
|
|
|
|
<option value="v1.11.0-beta.5">v1.11.0-beta.5</option>
|
2024-11-08 10:44:50 +08:00
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="modal-footer">
|
|
|
|
|
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">取消</button>
|
|
|
|
|
<button type="button" class="btn btn-primary" onclick="confirmSingboxVersion()">确认</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2024-11-26 10:55:19 +08:00
|
|
|
|
<div class="modal fade" id="singboxVersionModal" tabindex="-1" aria-labelledby="singboxVersionModalLabel" aria-hidden="true" data-bs-backdrop="static" data-bs-keyboard="false">
|
|
|
|
|
<div class="modal-dialog modal-lg">
|
|
|
|
|
<div class="modal-content">
|
|
|
|
|
<div class="modal-header">
|
|
|
|
|
<h5 class="modal-title" id="singboxVersionModalLabel">选择 Singbox 核心版本(通道二)</h5>
|
|
|
|
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="modal-body">
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label for="singboxVersionSelectForChannelTwo">选择版本</label>
|
|
|
|
|
<select id="singboxVersionSelectForChannelTwo" class="form-control">
|
|
|
|
|
<option value="preview" selected>预览版</option>
|
|
|
|
|
<option value="stable">稳定版</option>
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="modal-footer">
|
|
|
|
|
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">关闭</button>
|
|
|
|
|
<button type="button" class="btn btn-primary" onclick="confirmSingboxVersionForChannelTwo()">确认</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2024-12-03 16:28:37 +08:00
|
|
|
|
<div id="panelSelectionModal" class="modal fade" tabindex="-1" aria-labelledby="panelSelectionModalLabel" aria-hidden="true" data-bs-backdrop="static" data-bs-keyboard="false">
|
|
|
|
|
<div class="modal-dialog modal-lg">
|
|
|
|
|
<div class="modal-content">
|
|
|
|
|
<div class="modal-header">
|
|
|
|
|
<h5 class="modal-title" id="panelSelectionModalLabel">选择面板</h5>
|
|
|
|
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="modal-body">
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label for="panelSelect">选择一个面板</label>
|
|
|
|
|
<select id="panelSelect" class="form-select">
|
|
|
|
|
<option value="zashboard">Zashboard 面板</option>
|
2024-12-04 09:43:01 +08:00
|
|
|
|
<option value="metacubexd">Metacubexd 面板</option>
|
2024-12-03 16:28:37 +08:00
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="modal-footer">
|
|
|
|
|
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">取消</button>
|
|
|
|
|
<button type="button" class="btn btn-primary" onclick="confirmPanelSelection()">确认</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2024-12-04 13:29:55 +08:00
|
|
|
|
<div class="modal fade" id="versionModal" tabindex="-1" aria-labelledby="versionModalLabel" aria-hidden="true" data-bs-backdrop="static" data-bs-keyboard="false">
|
|
|
|
|
<div class="modal-dialog modal-lg">
|
|
|
|
|
<div class="modal-content">
|
|
|
|
|
<div class="modal-header">
|
|
|
|
|
<h5 class="modal-title" id="versionModalLabel">版本检测结果</h5>
|
|
|
|
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="modal-body">
|
|
|
|
|
<div id="modalContent">
|
|
|
|
|
<p>正在加载...</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="modal-footer">
|
|
|
|
|
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">关闭</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2024-11-06 09:24:05 +08:00
|
|
|
|
<div class="modal fade" id="updateModal" tabindex="-1" aria-labelledby="updateModalLabel" aria-hidden="true" data-bs-backdrop="static" data-bs-keyboard="false">
|
|
|
|
|
<div class="modal-dialog modal-lg">
|
|
|
|
|
<div class="modal-content">
|
|
|
|
|
<div class="modal-header">
|
|
|
|
|
<h5 class="modal-title" id="updateModalLabel">更新状态</h5>
|
|
|
|
|
<button type="button" class="close" data-bs-dismiss="modal" aria-label="Close">
|
|
|
|
|
<span aria-hidden="true">×</span>
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="modal-body text-center">
|
|
|
|
|
<div id="updateDescription" class="alert alert-info mb-3"></div>
|
|
|
|
|
<pre id="logOutput" style="white-space: pre-wrap; word-wrap: break-word; text-align: left; display: inline-block;">等待操作开始...</pre>
|
2024-11-03 20:36:08 +08:00
|
|
|
|
<div class="alert alert-info mt-3" role="alert">
|
2024-11-04 20:39:08 +08:00
|
|
|
|
提示: 如遇到更新失败,请在终端输入 <code>nekobox</code> 进行更新!
|
2024-11-06 09:24:05 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2024-11-03 20:36:08 +08:00
|
|
|
|
</div>
|
2024-11-06 09:24:05 +08:00
|
|
|
|
|
2024-10-26 16:23:41 +08:00
|
|
|
|
<div id="logOutput" class="mt-3"></div>
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
.table-container {
|
|
|
|
|
overflow-x: auto;
|
|
|
|
|
}
|
2024-10-26 10:38:22 +08:00
|
|
|
|
|
2024-10-26 16:23:41 +08:00
|
|
|
|
.table {
|
|
|
|
|
width: 100%;
|
|
|
|
|
border-collapse: collapse;
|
|
|
|
|
}
|
2024-10-26 10:38:22 +08:00
|
|
|
|
|
2024-10-26 16:23:41 +08:00
|
|
|
|
.table td {
|
|
|
|
|
padding: 10px;
|
|
|
|
|
word-wrap: break-word;
|
|
|
|
|
}
|
2024-10-26 10:38:22 +08:00
|
|
|
|
|
2024-10-26 16:23:41 +08:00
|
|
|
|
.form-control {
|
|
|
|
|
width: 100%;
|
|
|
|
|
}
|
2024-10-26 10:38:22 +08:00
|
|
|
|
|
2024-10-26 16:23:41 +08:00
|
|
|
|
.btn {
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
flex: 1;
|
|
|
|
|
}
|
2024-10-26 10:38:22 +08:00
|
|
|
|
|
2024-10-26 16:23:41 +08:00
|
|
|
|
@media (max-width: 767px) {
|
|
|
|
|
.table td {
|
|
|
|
|
display: block;
|
|
|
|
|
width: 100%;
|
|
|
|
|
}
|
2024-10-26 10:38:22 +08:00
|
|
|
|
|
2024-10-26 16:23:41 +08:00
|
|
|
|
.form-control {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
}
|
2024-10-26 10:38:22 +08:00
|
|
|
|
|
2024-10-26 16:23:41 +08:00
|
|
|
|
.btn-group {
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-10-26 10:38:22 +08:00
|
|
|
|
|
2024-10-26 16:23:41 +08:00
|
|
|
|
</style>
|
2024-10-26 10:38:22 +08:00
|
|
|
|
|
|
|
|
|
<script>
|
2024-11-08 10:44:50 +08:00
|
|
|
|
let selectedSingboxVersion = 'v1.11.0-alpha.6';
|
2024-11-24 11:00:22 +08:00
|
|
|
|
let selectedMihomoVersion = 'stable';
|
2024-11-24 12:24:44 +08:00
|
|
|
|
let selectedLanguage = 'cn';
|
2024-11-26 10:55:19 +08:00
|
|
|
|
let selectedSingboxVersionForChannelTwo = 'preview';
|
2024-12-04 09:43:01 +08:00
|
|
|
|
let selectedPanel = 'zashboard';
|
2024-12-03 16:28:37 +08:00
|
|
|
|
|
|
|
|
|
function showPanelSelector() {
|
|
|
|
|
$('#panelSelectionModal').modal('show');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function confirmPanelSelection() {
|
|
|
|
|
selectedPanel = document.getElementById('panelSelect').value;
|
|
|
|
|
$('#panelSelectionModal').modal('hide');
|
|
|
|
|
selectOperation('panel');
|
|
|
|
|
}
|
2024-11-24 12:24:44 +08:00
|
|
|
|
|
|
|
|
|
function showUpdateVersionModal() {
|
|
|
|
|
$('#updateVersionModal').modal('show');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function confirmUpdateVersion() {
|
|
|
|
|
selectedLanguage = document.getElementById('languageSelect').value;
|
|
|
|
|
$('#updateVersionModal').modal('hide');
|
|
|
|
|
selectOperation('client');
|
|
|
|
|
}
|
2024-11-24 11:00:22 +08:00
|
|
|
|
|
2024-11-08 10:44:50 +08:00
|
|
|
|
function showSingboxVersionSelector() {
|
|
|
|
|
$('#optionsModal').modal('hide');
|
|
|
|
|
$('#versionSelectionModal').modal('show');
|
|
|
|
|
}
|
|
|
|
|
|
2024-11-26 10:55:19 +08:00
|
|
|
|
function showSingboxVersionSelectorForChannelTwo() {
|
|
|
|
|
$('#optionsModal').modal('hide');
|
|
|
|
|
$('#singboxVersionModal').modal('show');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function confirmSingboxVersionForChannelTwo() {
|
|
|
|
|
selectedSingboxVersionForChannelTwo = document.getElementById('singboxVersionSelectForChannelTwo').value;
|
|
|
|
|
$('#singboxVersionModal').modal('hide');
|
|
|
|
|
selectOperation('sing-box');
|
|
|
|
|
}
|
|
|
|
|
|
2024-11-24 11:00:22 +08:00
|
|
|
|
function showMihomoVersionSelector() {
|
|
|
|
|
$('#mihomoVersionSelectionModal').modal('show');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function confirmMihomoVersion() {
|
|
|
|
|
selectedMihomoVersion = document.getElementById('mihomoVersionSelect').value;
|
|
|
|
|
$('#mihomoVersionSelectionModal').modal('hide');
|
|
|
|
|
selectOperation('mihomo');
|
|
|
|
|
}
|
|
|
|
|
|
2024-11-08 10:44:50 +08:00
|
|
|
|
function confirmSingboxVersion() {
|
|
|
|
|
selectedSingboxVersion = document.getElementById('singboxVersionSelect').value;
|
|
|
|
|
$('#versionSelectionModal').modal('hide');
|
|
|
|
|
|
|
|
|
|
selectOperation('singbox');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
document.getElementById('singboxOptionsButton').addEventListener('click', function() {
|
|
|
|
|
$('#optionsModal').modal('show');
|
2024-11-06 09:24:05 +08:00
|
|
|
|
});
|
2024-10-26 10:38:22 +08:00
|
|
|
|
|
2024-11-06 09:24:05 +08:00
|
|
|
|
function selectOperation(type) {
|
2024-11-08 10:44:50 +08:00
|
|
|
|
$('#optionsModal').modal('hide');
|
|
|
|
|
|
2024-11-06 09:24:05 +08:00
|
|
|
|
const operations = {
|
|
|
|
|
'singbox': {
|
2024-11-08 10:44:50 +08:00
|
|
|
|
url: 'update_singbox_core.php?version=' + selectedSingboxVersion,
|
2024-11-06 09:24:05 +08:00
|
|
|
|
message: '开始下载 Singbox 核心更新...',
|
|
|
|
|
description: '正在更新 Singbox 核心到最新版本'
|
|
|
|
|
},
|
|
|
|
|
'sing-box': {
|
2024-11-26 10:55:19 +08:00
|
|
|
|
url: selectedSingboxVersionForChannelTwo === 'stable'
|
|
|
|
|
? 'update_singbox_stable.php'
|
|
|
|
|
: 'update_singbox_preview.php',
|
2024-11-06 09:24:05 +08:00
|
|
|
|
message: '开始下载 Singbox 核心更新...',
|
2024-11-26 10:55:19 +08:00
|
|
|
|
description: '正在更新 Singbox 核心到 ' + selectedSingboxVersionForChannelTwo + ' 版本'
|
2024-11-06 09:24:05 +08:00
|
|
|
|
},
|
|
|
|
|
'puernya': {
|
|
|
|
|
url: 'puernya.php',
|
|
|
|
|
message: '开始切换 Puernya 核心...',
|
|
|
|
|
description: '正在切换到 Puernya 内核,此操作将替换当前的 Singbox 核心'
|
|
|
|
|
},
|
|
|
|
|
'rule': {
|
|
|
|
|
url: 'update_rule.php',
|
|
|
|
|
message: '开始下载 Singbox 规则集...',
|
|
|
|
|
description: '正在更新 Singbox 规则集,配合 Puernya 内核可以使用 Singbox 的配置文件和本地规则集'
|
|
|
|
|
},
|
|
|
|
|
'config': {
|
|
|
|
|
url: 'update_config.php',
|
|
|
|
|
message: '开始下载 Mihomo 配置文件...',
|
|
|
|
|
description: '正在更新 Mihomo 配置文件到最新版本'
|
2024-11-24 11:00:22 +08:00
|
|
|
|
},
|
|
|
|
|
'mihomo': {
|
|
|
|
|
url: selectedMihomoVersion === 'stable'
|
|
|
|
|
? 'update_mihomo_stable.php'
|
|
|
|
|
: 'update_mihomo_preview.php',
|
|
|
|
|
message: '开始下载 Mihomo 内核更新...',
|
|
|
|
|
description: '正在更新 Mihomo 内核到最新版本 (' + selectedMihomoVersion + ')'
|
2024-11-24 12:24:44 +08:00
|
|
|
|
},
|
|
|
|
|
'client': {
|
|
|
|
|
url: 'update_script.php?lang=' + selectedLanguage,
|
|
|
|
|
message: '开始下载客户端更新...',
|
|
|
|
|
description: '正在更新客户端到最新版本'
|
2024-12-03 16:28:37 +08:00
|
|
|
|
},
|
|
|
|
|
'panel': {
|
2024-12-04 09:43:01 +08:00
|
|
|
|
url: selectedPanel === 'zashboard'
|
|
|
|
|
? 'update_zashboard.php'
|
|
|
|
|
: 'update_metacubexd.php',
|
|
|
|
|
message: selectedPanel === 'zashboard'
|
|
|
|
|
? '开始下载 Zashboard 面板更新...'
|
|
|
|
|
: '开始下载 Metacubexd 面板更新...',
|
|
|
|
|
description: selectedPanel === 'zashboard'
|
|
|
|
|
? '正在更新 Zashboard 面板到最新版本'
|
|
|
|
|
: '正在更新 Metacubexd 面板到最新版本'
|
2024-11-06 09:24:05 +08:00
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
const operation = operations[type];
|
|
|
|
|
if (operation) {
|
|
|
|
|
setTimeout(function() {
|
|
|
|
|
initiateUpdate(operation.url, operation.message, operation.description);
|
|
|
|
|
}, 500);
|
2024-10-26 16:23:41 +08:00
|
|
|
|
}
|
2024-11-06 09:24:05 +08:00
|
|
|
|
}
|
2024-10-26 16:23:41 +08:00
|
|
|
|
|
2024-11-06 09:24:05 +08:00
|
|
|
|
function initiateUpdate(url, logMessage, description) {
|
|
|
|
|
const xhr = new XMLHttpRequest();
|
|
|
|
|
xhr.open('POST', url, true);
|
|
|
|
|
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
|
|
|
|
|
$('#updateModal').modal('show');
|
|
|
|
|
document.getElementById('updateDescription').textContent = description;
|
|
|
|
|
document.getElementById('logOutput').textContent = logMessage;
|
|
|
|
|
xhr.onload = function() {
|
|
|
|
|
if (xhr.status === 200) {
|
|
|
|
|
document.getElementById('logOutput').textContent += '\n更新完成!';
|
|
|
|
|
document.getElementById('logOutput').textContent += '\n' + xhr.responseText;
|
|
|
|
|
setTimeout(function() {
|
|
|
|
|
$('#updateModal').modal('hide');
|
|
|
|
|
setTimeout(function() {
|
|
|
|
|
location.reload();
|
|
|
|
|
}, 500);
|
|
|
|
|
}, 10000);
|
|
|
|
|
} else {
|
|
|
|
|
document.getElementById('logOutput').textContent += '\n发生错误:' + xhr.statusText;
|
2024-11-08 10:44:50 +08:00
|
|
|
|
}
|
2024-11-06 09:24:05 +08:00
|
|
|
|
};
|
2024-10-26 10:38:22 +08:00
|
|
|
|
|
2024-11-06 09:24:05 +08:00
|
|
|
|
xhr.onerror = function() {
|
|
|
|
|
document.getElementById('logOutput').textContent += '\n网络错误,请稍后再试。';
|
|
|
|
|
};
|
2024-10-27 12:23:17 +08:00
|
|
|
|
|
2024-11-06 09:24:05 +08:00
|
|
|
|
xhr.send();
|
|
|
|
|
}
|
2024-11-09 20:34:05 +08:00
|
|
|
|
|
|
|
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
|
|
|
document.getElementById('singboxOptionsButton').addEventListener('click', function() {
|
|
|
|
|
$('#optionsModal').modal('show');
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
document.getElementById('updateUiButton').addEventListener('click', function() {
|
2024-12-03 16:28:37 +08:00
|
|
|
|
showPanelSelector();
|
2024-11-09 20:34:05 +08:00
|
|
|
|
});
|
|
|
|
|
});
|
2024-10-26 10:38:22 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<script>
|
2024-12-04 13:29:55 +08:00
|
|
|
|
function checkVersion(outputId, updateFiles) {
|
|
|
|
|
const modalContent = document.getElementById('modalContent');
|
|
|
|
|
const versionModal = new bootstrap.Modal(document.getElementById('versionModal'));
|
|
|
|
|
modalContent.innerHTML = '<p>正在检查新版本...</p>';
|
2024-12-04 09:43:01 +08:00
|
|
|
|
let results = [];
|
|
|
|
|
|
2024-12-04 13:29:55 +08:00
|
|
|
|
const requests = updateFiles.map((file) => {
|
|
|
|
|
return fetch(file.url + '?check_version=true')
|
|
|
|
|
.then(response => {
|
|
|
|
|
if (!response.ok) {
|
|
|
|
|
throw new Error(`请求失败: ${file.name}`);
|
|
|
|
|
}
|
|
|
|
|
return response.text();
|
|
|
|
|
})
|
|
|
|
|
.then(responseText => {
|
|
|
|
|
const versionMatch = responseText.trim().match(/最新版本:\s*([^\s]+)/);
|
2024-12-04 09:43:01 +08:00
|
|
|
|
if (versionMatch && versionMatch[1]) {
|
|
|
|
|
const newVersion = versionMatch[1];
|
2024-12-04 13:29:55 +08:00
|
|
|
|
results.push(`
|
|
|
|
|
<tr class="table-success">
|
|
|
|
|
<td>${file.name}</td>
|
|
|
|
|
<td>${newVersion}</td>
|
|
|
|
|
</tr>
|
|
|
|
|
`);
|
2024-12-04 09:43:01 +08:00
|
|
|
|
|
|
|
|
|
if (file.url === 'update_singbox_preview.php') {
|
|
|
|
|
const select = document.getElementById('singboxVersionSelect');
|
|
|
|
|
let versionExists = Array.from(select.options).some(option => option.value === newVersion);
|
|
|
|
|
|
|
|
|
|
if (!versionExists) {
|
|
|
|
|
const newOption = document.createElement('option');
|
|
|
|
|
newOption.value = newVersion;
|
|
|
|
|
newOption.textContent = newVersion;
|
|
|
|
|
select.appendChild(newOption);
|
|
|
|
|
}
|
2024-11-13 00:25:36 +08:00
|
|
|
|
}
|
2024-12-04 09:43:01 +08:00
|
|
|
|
} else {
|
2024-12-04 13:29:55 +08:00
|
|
|
|
results.push(`
|
|
|
|
|
<tr class="table-warning">
|
|
|
|
|
<td>${file.name}</td>
|
|
|
|
|
<td>无法解析版本信息</td>
|
2024-12-04 09:43:01 +08:00
|
|
|
|
</tr>
|
2024-12-04 13:29:55 +08:00
|
|
|
|
`);
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch(error => {
|
|
|
|
|
results.push(`
|
|
|
|
|
<tr class="table-danger">
|
|
|
|
|
<td>${file.name}</td>
|
|
|
|
|
<td>网络错误</td>
|
|
|
|
|
</tr>
|
|
|
|
|
`);
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Promise.all(requests).then(() => {
|
|
|
|
|
modalContent.innerHTML = `
|
|
|
|
|
<table class="table table-striped table-bordered">
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
|
|
|
|
<th class="text-center">组件名称</th>
|
|
|
|
|
<th class="text-center">最新版本</th>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
${results.join('')}
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
`;
|
|
|
|
|
versionModal.show();
|
2024-12-04 09:43:01 +08:00
|
|
|
|
});
|
2024-11-13 00:25:36 +08:00
|
|
|
|
}
|
2024-10-26 16:23:41 +08:00
|
|
|
|
|
2024-12-04 09:43:01 +08:00
|
|
|
|
document.getElementById('checkSingboxButton').addEventListener('click', function () {
|
|
|
|
|
const updateFiles = [
|
|
|
|
|
{ name: 'Singbox 正式版', url: 'update_singbox_stable.php' },
|
|
|
|
|
{ name: 'Singbox 预览版', url: 'update_singbox_preview.php' },
|
|
|
|
|
{ name: 'Puernya 预览版', url: 'puernya.php' }
|
|
|
|
|
];
|
|
|
|
|
checkVersion('NewSingbox', updateFiles);
|
2024-11-13 00:25:36 +08:00
|
|
|
|
});
|
2024-10-26 10:38:22 +08:00
|
|
|
|
|
2024-12-04 09:43:01 +08:00
|
|
|
|
document.getElementById('checkMihomoButton').addEventListener('click', function () {
|
|
|
|
|
const updateFiles = [
|
|
|
|
|
{ name: 'Mihomo 正式版', url: 'update_mihomo_stable.php' },
|
|
|
|
|
{ name: 'Mihomo 预览版', url: 'update_mihomo_preview.php' }
|
|
|
|
|
];
|
|
|
|
|
checkVersion('NewMihomo', updateFiles);
|
2024-11-13 00:25:36 +08:00
|
|
|
|
});
|
2024-10-26 10:38:22 +08:00
|
|
|
|
|
2024-12-04 09:43:01 +08:00
|
|
|
|
document.getElementById('checkUiButton').addEventListener('click', function () {
|
|
|
|
|
const updateFiles = [
|
|
|
|
|
{ name: 'MetaCube', url: 'update_metacubexd.php' },
|
|
|
|
|
{ name: 'Zashboard', url: 'update_zashboard.php' }
|
|
|
|
|
];
|
|
|
|
|
checkVersion('NewUi', updateFiles);
|
2024-11-13 00:25:36 +08:00
|
|
|
|
});
|
2024-10-26 16:23:41 +08:00
|
|
|
|
|
2024-12-04 13:29:55 +08:00
|
|
|
|
document.getElementById('checkCliverButton').addEventListener('click', function () {
|
|
|
|
|
const updateFiles = [{ name: '客户端', url: 'update_script.php' }];
|
|
|
|
|
checkVersion('NewCliver', updateFiles);
|
2024-11-13 00:25:36 +08:00
|
|
|
|
});
|
2024-12-04 13:29:55 +08:00
|
|
|
|
|
2024-10-26 10:38:22 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<script>
|
2024-10-26 16:23:41 +08:00
|
|
|
|
function compareVersions(v1, v2) {
|
2024-11-06 09:24:05 +08:00
|
|
|
|
const v1parts = v1.split(/[-.]/).filter(x => !isNaN(x));
|
|
|
|
|
const v2parts = v2.split(/[-.]/).filter(x => !isNaN(x));
|
2024-10-26 16:23:41 +08:00
|
|
|
|
|
|
|
|
|
for (let i = 0; i < Math.max(v1parts.length, v2parts.length); ++i) {
|
2024-11-06 09:24:05 +08:00
|
|
|
|
const v1part = parseInt(v1parts[i]) || 0;
|
|
|
|
|
const v2part = parseInt(v2parts[i]) || 0;
|
2024-10-26 16:23:41 +08:00
|
|
|
|
|
|
|
|
|
if (v1part > v2part) return 1;
|
|
|
|
|
if (v1part < v2part) return -1;
|
|
|
|
|
}
|
2024-10-26 10:38:22 +08:00
|
|
|
|
|
2024-11-06 09:24:05 +08:00
|
|
|
|
return 0;
|
2024-10-26 10:38:22 +08:00
|
|
|
|
}
|
|
|
|
|
|
2024-10-26 16:23:41 +08:00
|
|
|
|
function checkSingboxVersion() {
|
|
|
|
|
var currentVersion = '<?php echo getSingboxVersion(); ?>';
|
2024-11-06 09:24:05 +08:00
|
|
|
|
var minVersion = '1.10.0';
|
2024-10-26 16:23:41 +08:00
|
|
|
|
|
|
|
|
|
if (compareVersions(currentVersion, minVersion) >= 0) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
2024-10-26 10:38:22 +08:00
|
|
|
|
|
2024-10-26 16:23:41 +08:00
|
|
|
|
var modalHtml = `
|
|
|
|
|
<div class="modal fade" id="versionWarningModal" tabindex="-1" aria-labelledby="versionWarningModalLabel" aria-hidden="true">
|
|
|
|
|
<div class="modal-dialog">
|
|
|
|
|
<div class="modal-content">
|
|
|
|
|
<div class="modal-header">
|
|
|
|
|
<h5 class="modal-title" id="versionWarningModalLabel">版本警告</h5>
|
|
|
|
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="modal-body">
|
|
|
|
|
<p>您的 Sing-box 版本 (${currentVersion}) 低于推荐的最低版本 (v1.10.0)。</p>
|
|
|
|
|
<p>请考虑升级到更高版本以获得最佳性能。</p>
|
|
|
|
|
</div>
|
2024-10-26 10:38:22 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2024-10-26 16:23:41 +08:00
|
|
|
|
`;
|
|
|
|
|
document.body.insertAdjacentHTML('beforeend', modalHtml);
|
|
|
|
|
var modal = new bootstrap.Modal(document.getElementById('versionWarningModal'));
|
|
|
|
|
modal.show();
|
|
|
|
|
|
|
|
|
|
setTimeout(function() {
|
|
|
|
|
modal.hide();
|
|
|
|
|
}, 5000);
|
|
|
|
|
}
|
2024-10-26 10:38:22 +08:00
|
|
|
|
|
2024-10-26 16:23:41 +08:00
|
|
|
|
document.addEventListener('DOMContentLoaded', checkSingboxVersion);
|
2024-10-26 10:38:22 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<html lang="zh">
|
|
|
|
|
<head>
|
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
|
<title>NekoBox</title>
|
|
|
|
|
<style>
|
|
|
|
|
body {
|
|
|
|
|
margin: 0;
|
|
|
|
|
padding: 0;
|
|
|
|
|
font-family: Arial, sans-serif;
|
|
|
|
|
}
|
|
|
|
|
.feature-box {
|
|
|
|
|
padding: 15px;
|
|
|
|
|
margin-bottom: 20px;
|
|
|
|
|
border: 1px solid #000000;
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
}
|
|
|
|
|
.feature-box h6 {
|
|
|
|
|
margin-bottom: 15px;
|
|
|
|
|
}
|
|
|
|
|
.table-container {
|
|
|
|
|
padding: 15px;
|
|
|
|
|
margin-bottom: 20px;
|
|
|
|
|
border: 1px solid #000000;
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
}
|
|
|
|
|
.table {
|
|
|
|
|
table-layout: fixed;
|
|
|
|
|
width: 100%;
|
|
|
|
|
}
|
|
|
|
|
.table td, .table th {
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
}
|
|
|
|
|
.table thead th {
|
|
|
|
|
background-color: transparent;
|
|
|
|
|
color: #000000;
|
|
|
|
|
}
|
|
|
|
|
.btn-outline-secondary {
|
|
|
|
|
border-color: transparent;
|
|
|
|
|
color: #000000;
|
|
|
|
|
}
|
|
|
|
|
.btn-outline-secondary:hover {
|
|
|
|
|
background-color: transparent;
|
|
|
|
|
color: #000000;
|
|
|
|
|
}
|
|
|
|
|
.footer {
|
|
|
|
|
padding: 15px 0;
|
|
|
|
|
background-color: transparent;
|
|
|
|
|
color: #000000;
|
|
|
|
|
}
|
|
|
|
|
.footer p {
|
|
|
|
|
margin: 0;
|
|
|
|
|
}
|
|
|
|
|
.link-box {
|
|
|
|
|
border: 1px solid #000000;
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
padding: 10px;
|
|
|
|
|
display: block;
|
|
|
|
|
text-align: center;
|
|
|
|
|
width: 100%;
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
transition: background-color 0.3s ease;
|
|
|
|
|
}
|
|
|
|
|
.link-box a {
|
|
|
|
|
display: block;
|
|
|
|
|
padding: 10px;
|
|
|
|
|
text-decoration: none;
|
|
|
|
|
color: #000000;
|
|
|
|
|
}
|
2024-11-06 09:24:05 +08:00
|
|
|
|
.container {
|
|
|
|
|
padding-left: 10px;
|
|
|
|
|
padding-right: 10px;
|
|
|
|
|
}
|
2024-10-26 10:38:22 +08:00
|
|
|
|
</style>
|
|
|
|
|
</head>
|
|
|
|
|
<body>
|
|
|
|
|
<div class="container mt-4">
|
|
|
|
|
<h2 class="text-center mb-4">关于 NekoBox</h2>
|
|
|
|
|
<div class="feature-box text-center">
|
|
|
|
|
<h5>NekoBox</h5>
|
|
|
|
|
<p>NekoBox是一款精心设计的 Sing-box 代理工具,专为家庭用户打造,旨在提供简洁而强大的代理解决方案。基于 PHP 和 BASH 技术,NekoBox 将复杂的代理配置简化为直观的操作体验,让每个用户都能轻松享受高效、安全的网络环境。</p>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<h5 class="text-center mb-4">核心特点</h5>
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-md-4 mb-4 d-flex">
|
|
|
|
|
<div class="feature-box text-center flex-fill">
|
|
|
|
|
<h6>简化配置</h6>
|
|
|
|
|
<p>采用用户友好的界面和智能配置功能,轻松实现 Sing-box 代理的设置与管理。</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-md-4 mb-4 d-flex">
|
|
|
|
|
<div class="feature-box text-center flex-fill">
|
|
|
|
|
<h6>优化性能</h6>
|
|
|
|
|
<p>通过高效的脚本和自动化处理,确保最佳的代理性能和稳定性。</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-md-4 mb-4 d-flex">
|
|
|
|
|
<div class="feature-box text-center flex-fill">
|
|
|
|
|
<h6>无缝体验</h6>
|
|
|
|
|
<p>专为家庭用户设计,兼顾易用性与功能性,确保每个家庭成员都能便捷地使用代理服务。</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<h5 class="text-center mb-4">工具信息</h5>
|
|
|
|
|
<div class="d-flex justify-content-center">
|
|
|
|
|
<div class="table-container">
|
|
|
|
|
<table class="table table-borderless mb-5">
|
|
|
|
|
<tbody>
|
|
|
|
|
<tr class="text-center">
|
|
|
|
|
<td>SagerNet</td>
|
|
|
|
|
<td>MetaCubeX</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr class="text-center">
|
|
|
|
|
<td>
|
|
|
|
|
<div class="link-box">
|
|
|
|
|
<a href="https://github.com/SagerNet/sing-box" target="_blank">Sing-box</a>
|
|
|
|
|
</div>
|
|
|
|
|
</td>
|
|
|
|
|
<td>
|
|
|
|
|
<div class="link-box">
|
|
|
|
|
<a href="https://github.com/MetaCubeX/mihomo" target="_blank">Mihomo</a>
|
|
|
|
|
</div>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<h5 class="text-center mb-4">外部链接</h5>
|
|
|
|
|
<div class="table-container">
|
|
|
|
|
<table class="table table-borderless mb-5">
|
|
|
|
|
<tbody>
|
|
|
|
|
<tr class="text-center">
|
|
|
|
|
<td>Github</td>
|
|
|
|
|
<td>Github</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr class="text-center">
|
|
|
|
|
<td>
|
|
|
|
|
<div class="link-box">
|
|
|
|
|
<a href="https://github.com/Thaolga/openwrt-nekobox/issues" target="_blank">Issues</a>
|
|
|
|
|
</div>
|
|
|
|
|
</td>
|
|
|
|
|
<td>
|
|
|
|
|
<div class="link-box">
|
|
|
|
|
<a href="https://github.com/Thaolga/openwrt-nekobox" target="_blank">Thaolga</a>
|
|
|
|
|
</div>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr class="text-center">
|
|
|
|
|
<td>Telegram</td>
|
|
|
|
|
<td>MetaCubeX</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr class="text-center">
|
|
|
|
|
<td>
|
|
|
|
|
<div class="link-box">
|
|
|
|
|
<a href="https://t.me/+J55MUupktxFmMDgx" target="_blank">Telegram</a>
|
|
|
|
|
</div>
|
|
|
|
|
</td>
|
|
|
|
|
<td>
|
|
|
|
|
<div class="link-box">
|
|
|
|
|
<a href="https://github.com/MetaCubeX" target="_blank">METACUBEX</a>
|
|
|
|
|
</div>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
<footer class="text-center">
|
|
|
|
|
<p><?php echo $footer ?></p>
|
|
|
|
|
</footer>
|
|
|
|
|
</div>
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|