mirror of
https://github.com/kenzok8/small-package
synced 2025-01-07 07:06:58 +08:00
update 2024-12-19 09:38:38
This commit is contained in:
parent
36b0595d4d
commit
464f01e91e
@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_MAINTAINER:=Thaolga <https://github.com/Thaolga/luci-app-nekobox>
|
||||
PKG_NAME:=luci-app-nekobox
|
||||
PKG_VERSION:=1.5.9
|
||||
PKG_VERSION:=1.6.0
|
||||
PKG_RELEASE:=cn
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
|
||||
|
@ -1,5 +1,5 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="186" height="20" role="img" aria-label="Current Version: v1.5.9">
|
||||
<title>Current Version: v1.5.9</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="186" height="20" role="img" aria-label="Current Version: v1.6.0">
|
||||
<title>Current Version: v1.6.0</title>
|
||||
<linearGradient id="s" x2="0" y2="100%">
|
||||
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
|
||||
<stop offset="1" stop-opacity=".1"/>
|
||||
@ -15,7 +15,7 @@
|
||||
<g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110">
|
||||
<text aria-hidden="true" x="495" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="700" style="letter-spacing: -5;">Current Version</text>
|
||||
<text x="495" y="140" transform="scale(.1)" fill="#fff" textLength="700" style="letter-spacing: -5;">Current Version</text>
|
||||
<text aria-hidden="true" x="1405" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="600" style="letter-spacing: -3;">v1.5.9</text>
|
||||
<text x="1405" y="140" transform="scale(.1)" fill="#fff" textLength="600" style="letter-spacing: -3;">v1.5.9</text>
|
||||
<text aria-hidden="true" x="1405" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="600" style="letter-spacing: -3;">v1.6.0</text>
|
||||
<text x="1405" y="140" transform="scale(.1)" fill="#fff" textLength="600" style="letter-spacing: -3;">v1.6.0</text>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
@ -10,15 +10,6 @@ $selected_config = trim(file_get_contents($tmpPath));
|
||||
|
||||
if (empty($selected_config) || !file_exists($selected_config)) {
|
||||
$selected_config = "$dirPath/default_config.yaml";
|
||||
if (!file_exists($selected_config)) {
|
||||
$default_config_content = "external-controller: 0.0.0.0:9090\n";
|
||||
$default_config_content .= "secret: Akun\n";
|
||||
$default_config_content .= "external-ui: ui\n";
|
||||
$default_config_content .= "# 请根据需要编辑此文件\n";
|
||||
file_put_contents($selected_config, $default_config_content);
|
||||
$logMessage = "配置文件丢失,已创建默认配置文件。";
|
||||
}
|
||||
|
||||
file_put_contents($tmpPath, $selected_config);
|
||||
}
|
||||
|
||||
|
@ -17,8 +17,6 @@ $yacd_link = $neko_cfg['ctrl_host'] . ':' . $neko_cfg['ctrl_port'] . '/ui/meta?h
|
||||
$zash_link = $neko_cfg['ctrl_host'] . ':' . $neko_cfg['ctrl_port'] . '/ui/zashboard?hostname=' . $neko_cfg['ctrl_host'] . '&port=' . $neko_cfg['ctrl_port'] . '&secret=' . $neko_cfg['secret'];
|
||||
$meta_link = $neko_cfg['ctrl_host'] . ':' . $neko_cfg['ctrl_port'] . '/ui/metacubexd?hostname=' . $neko_cfg['ctrl_host'] . '&port=' . $neko_cfg['ctrl_port'] . '&secret=' . $neko_cfg['secret'];
|
||||
$dash_link = $neko_cfg['ctrl_host'] . ':' . $neko_cfg['ctrl_port'] . '/ui/dashboard?hostname=' . $neko_cfg['ctrl_host'] . '&port=' . $neko_cfg['ctrl_port'] . '&secret=' . $neko_cfg['secret'];
|
||||
|
||||
|
||||
?>
|
||||
<!doctype html>
|
||||
<html lang="en" data-bs-theme="<?php echo substr($neko_theme,0,-4) ?>">
|
||||
@ -34,8 +32,44 @@ $dash_link = $neko_cfg['ctrl_host'] . ':' . $neko_cfg['ctrl_port'] . '/ui/dashbo
|
||||
<script type="text/javascript" src="./assets/js/jquery-2.1.3.min.js"></script>
|
||||
<script type="text/javascript" src="./assets/js/bootstrap.min.js"></script>
|
||||
<?php include './ping.php'; ?>
|
||||
<style>
|
||||
#fullscreenToggle {
|
||||
position: fixed;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
z-index: 1000;
|
||||
padding: 5px 15px;
|
||||
background-color: #007bff;
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.3s ease;
|
||||
}
|
||||
|
||||
#fullscreenToggle:hover {
|
||||
background-color: #0056b3;
|
||||
}
|
||||
|
||||
#iframeMeta {
|
||||
transition: height 0.3s ease;
|
||||
height: 70vh;
|
||||
}
|
||||
|
||||
body.fullscreen #iframeMeta {
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
#fullscreenToggle {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<button id="fullscreenToggle" class="btn btn-primary mb-2">全屏</button>
|
||||
<head>
|
||||
<div class="container-sm container-bg text-center callout border border-3 rounded-4 col-11">
|
||||
<div class="row">
|
||||
@ -47,10 +81,9 @@ $dash_link = $neko_cfg['ctrl_host'] . ':' . $neko_cfg['ctrl_port'] . '/ui/dashbo
|
||||
</div>
|
||||
<div class="container text-left p-3">
|
||||
<div class="container h-100 mb-5">
|
||||
<iframe id="iframeMeta" class="border border-3 rounded-4 w-100" style="height: 75vh;" src="http://<?php echo $zash_link; ?>" title="zash" allowfullscreen></iframe>
|
||||
<iframe id="iframeMeta" class="border border-3 rounded-4 w-100" style="height: 70vh;" src="http://<?php echo $zash_link; ?>" title="zash" allowfullscreen></iframe>
|
||||
<table class="table table-borderless callout mb-2">
|
||||
<tbody>
|
||||
<button id="fullscreenToggle" class="btn btn-primary mb-2">全屏</button>
|
||||
<tr class="text-center d-flex flex-wrap justify-content-center">
|
||||
<td><a class="btn btn-info btn-sm text-white" target="_blank" href="http://<?php echo $yacd_link; ?>">YACD-META 面板</a></td>
|
||||
<td><a class="btn btn-info btn-sm text-white" target="_blank" href="http://<?php echo $dash_link; ?>">DASHBOARD 面板</a></td>
|
||||
@ -98,6 +131,14 @@ $dash_link = $neko_cfg['ctrl_host'] . ':' . $neko_cfg['ctrl_port'] . '/ui/dashbo
|
||||
isFullscreen = false;
|
||||
}
|
||||
});
|
||||
|
||||
document.addEventListener('fullscreenchange', function() {
|
||||
if (document.fullscreenElement) {
|
||||
iframeMeta.style.height = '100vh';
|
||||
} else {
|
||||
iframeMeta.style.height = '70vh';
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
@ -594,6 +594,62 @@ if (isset($_GET['ajax'])) {
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
$default_config = '/etc/neko/config/mihomo.yaml';
|
||||
|
||||
$current_config = file_exists('/www/nekobox/lib/selected_config.txt')
|
||||
? file_get_contents('/www/nekobox/lib/selected_config.txt')
|
||||
: $default_config;
|
||||
|
||||
if (!file_exists($current_config)) {
|
||||
$default_config_content = "external-controller: 0.0.0.0:9090\n";
|
||||
$default_config_content .= "secret: Akun\n";
|
||||
$default_config_content .= "external-ui: ui\n";
|
||||
$default_config_content .= "# 请根据需要编辑此文件\n";
|
||||
|
||||
file_put_contents($current_config, $default_config_content);
|
||||
file_put_contents('/www/nekobox/lib/selected_config.txt', $current_config);
|
||||
$logMessage = "配置文件丢失,已创建默认配置文件。";
|
||||
} else {
|
||||
$config_content = file_get_contents($current_config);
|
||||
|
||||
$missing_config = false;
|
||||
$default_config_content = [
|
||||
"external-controller" => "0.0.0.0:9090",
|
||||
"secret" => "Akun",
|
||||
"external-ui" => "ui"
|
||||
];
|
||||
|
||||
foreach ($default_config_content as $key => $value) {
|
||||
if (strpos($config_content, "$key:") === false) {
|
||||
$config_content .= "$key: $value\n";
|
||||
$missing_config = true;
|
||||
}
|
||||
}
|
||||
|
||||
if ($missing_config) {
|
||||
file_put_contents($current_config, $config_content);
|
||||
$logMessage = "配置文件缺少某些选项,已自动添加缺失的配置项。";
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($logMessage)) {
|
||||
echo "<script>alert('$logMessage');</script>";
|
||||
}
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['selected_config'])) {
|
||||
$selected_file = $_POST['selected_config'];
|
||||
|
||||
$config_dir = '/etc/neko/config';
|
||||
$selected_file_path = $config_dir . '/' . $selected_file;
|
||||
|
||||
if (file_exists($selected_file_path) && pathinfo($selected_file, PATHINFO_EXTENSION) == 'yaml') {
|
||||
file_put_contents('/www/nekobox/lib/selected_config.txt', $selected_file_path);
|
||||
} else {
|
||||
echo "<script>alert('无效的配置文件');</script>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
<!doctype html>
|
||||
<html lang="en" data-bs-theme="<?php echo substr($neko_theme,0,-4) ?>">
|
||||
<head>
|
||||
@ -719,7 +775,7 @@ $(document).ready(function() {
|
||||
<table class="table table-borderless mb-2">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="width:150px">状态</td>
|
||||
<td style="width:150px">运行状态</td>
|
||||
<td class="d-grid">
|
||||
<div class="btn-group w-100" role="group" aria-label="ctrl">
|
||||
<?php
|
||||
@ -738,10 +794,27 @@ $(document).ready(function() {
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:150px">控制</td>
|
||||
<tr>
|
||||
<td style="width:150px">Mihomo 控制</td>
|
||||
<td class="d-grid">
|
||||
<form action="index.php" method="post">
|
||||
<form action="index.php" method="post" style="display: inline-block; width: 100%; margin-bottom: 10px;">
|
||||
<div class="form-group">
|
||||
<select id="configSelect" class="form-select" name="selected_config" onchange="saveConfigToLocalStorage(); this.form.submit()">
|
||||
<option value="">请选择配置文件</option>
|
||||
<?php
|
||||
$config_dir = '/etc/neko/config';
|
||||
$files = array_diff(scandir($config_dir), array('..', '.'));
|
||||
foreach ($files as $file) {
|
||||
if (pathinfo($file, PATHINFO_EXTENSION) == 'yaml') {
|
||||
$selected = (realpath($config_dir . '/' . $file) == realpath($current_config)) ? 'selected' : '';
|
||||
echo "<option value='$file' $selected>$file</option>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
<form action="index.php" method="post" style="display: inline-block; width: 100%;">
|
||||
<div class="btn-group w-100">
|
||||
<button type="submit" name="neko" value="start" class="btn btn<?php if ($neko_status == 1) echo "-outline" ?>-success <?php if ($neko_status == 1) echo "disabled" ?>">启用 Mihomo</button>
|
||||
<button type="submit" name="neko" value="disable" class="btn btn<?php if ($neko_status == 0) echo "-outline" ?>-danger <?php if ($neko_status == 0) echo "disabled" ?>">停用 Mihomo</button>
|
||||
@ -751,7 +824,7 @@ $(document).ready(function() {
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:150px"></td>
|
||||
<td style="width:150px">Sing-box 控制</td>
|
||||
<td class="d-grid">
|
||||
<form action="index.php" method="post">
|
||||
<div class="input-group mb-2">
|
||||
@ -801,6 +874,23 @@ $(document).ready(function() {
|
||||
localStorage.setItem("configSelection", selectedConfig);
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
function saveConfigToLocalStorage() {
|
||||
const selectedConfig = document.getElementById('configSelect').value;
|
||||
if (selectedConfig) {
|
||||
localStorage.setItem('selected_config', selectedConfig);
|
||||
}
|
||||
}
|
||||
|
||||
window.onload = function() {
|
||||
const savedConfig = localStorage.getItem('selected_config');
|
||||
if (savedConfig) {
|
||||
const configSelect = document.getElementById('configSelect');
|
||||
configSelect.value = savedConfig;
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<h2 class="text-center">系统状态</h2>
|
||||
<table class="table table-borderless rounded-4 mb-2">
|
||||
<tbody>
|
||||
@ -886,43 +976,10 @@ $(document).ready(function() {
|
||||
<label class="form-check-label" for="autoRefresh">自动刷新</label>
|
||||
</div>
|
||||
<button type="submit" name="clear_singbox_log" class="btn btn-danger">🗑️ 清空日志</button>
|
||||
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#helpModal">🔄 更正时区</button>
|
||||
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#cronModal">⏰ 定时重启</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="helpModal" tabindex="-1" role="dialog" aria-labelledby="helpModalLabel" aria-hidden="true" data-backdrop="static" data-keyboard="false">
|
||||
<div class="modal-dialog modal-dialog-centered modal-lg" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="helpModalLabel">时区错误的解决方案</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>以下是解决时区错误的具体步骤:</p>
|
||||
<pre>
|
||||
# 确保系统时区正确。检查时区文件是否存在:
|
||||
ls /usr/share/zoneinfo/Asia/Shanghai
|
||||
|
||||
# 如果不存在,需要安装:
|
||||
opkg update
|
||||
opkg install zoneinfo-asia
|
||||
|
||||
# 然后设置时区:
|
||||
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
|
||||
|
||||
# 确认系统时区是否已正确应用:
|
||||
date
|
||||
</pre>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="cronModal" tabindex="-1" role="dialog" aria-labelledby="cronModalLabel" aria-hidden="true" data-backdrop="static" data-keyboard="false">
|
||||
<div class="modal-dialog modal-dialog-centered modal-lg" role="document">
|
||||
|
@ -613,10 +613,11 @@ function getSubscriptionUrlFromFile($file) {
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Personal - Neko</title>
|
||||
<title>Mihomo - Nekobox</title>
|
||||
<link rel="icon" href="./assets/img/nekobox.png">
|
||||
<link href="./assets/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="./assets/css/custom.css" rel="stylesheet">
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons/font/bootstrap-icons.css" rel="stylesheet">
|
||||
<link href="./assets/theme/<?php echo $neko_theme ?>" rel="stylesheet">
|
||||
<script type="text/javascript" src="./assets/js/bootstrap.min.js"></script>
|
||||
<script type="text/javascript" src="./assets/js/feather.min.js"></script>
|
||||
@ -872,7 +873,7 @@ function getSubscriptionUrlFromFile($file) {
|
||||
value="<?php echo htmlspecialchars(isset($_POST['rename']) ? $_POST['rename'] : ''); ?>"
|
||||
placeholder="输入重命名内容(举例:`a@b``1@2`,|符可用\转义)">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary" name="action" value="generate_subscription">生成配置文件</button>
|
||||
<button type="submit" class="btn btn-primary" name="action" value="generate_subscription"><i class="bi bi-file-earmark-text"></i> 生成配置文件</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@ -885,14 +886,14 @@ function getSubscriptionUrlFromFile($file) {
|
||||
value="<?php echo htmlspecialchars(isset($_POST['cron_time']) ? $_POST['cron_time'] : '0 3 * * *'); ?>"
|
||||
placeholder="0 3 * * *">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary" name="action" value="update_cron">更新 Cron 作业</button>
|
||||
<button type="submit" class="btn btn-primary" name="action" value="update_cron"><i class="bi bi-clock"></i> 设置定时任务</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="help mt-4">
|
||||
<p style="color: red;">注意:在线订阅转换存在隐私泄露风险</p>
|
||||
<p>订阅转换由肥羊提供</p>
|
||||
<a href="https://github.com/youshandefeiyang/sub-web-modify" target="_blank" class="btn btn-primary">
|
||||
<a href="https://github.com/youshandefeiyang/sub-web-modify" target="_blank" class="btn btn-primary" style="color: white;">
|
||||
点击访问
|
||||
</a>
|
||||
</div>
|
||||
|
@ -109,11 +109,23 @@ function getCliverVersion() {
|
||||
$versionFile = '/etc/neko/tmp/nekobox_version';
|
||||
|
||||
if (file_exists($versionFile)) {
|
||||
return trim(file_get_contents($versionFile));
|
||||
$version = trim(file_get_contents($versionFile));
|
||||
|
||||
if (preg_match('/-cn$|en$/', $version)) {
|
||||
return ['version' => $version, 'type' => '正式版'];
|
||||
} elseif (preg_match('/-preview$|beta$/', $version)) {
|
||||
return ['version' => $version, 'type' => '预览版'];
|
||||
} else {
|
||||
return ['version' => $version, 'type' => '未知'];
|
||||
}
|
||||
} else {
|
||||
return "未安装";
|
||||
return ['version' => '未安装', 'type' => '未知'];
|
||||
}
|
||||
}
|
||||
|
||||
$cliverData = getCliverVersion();
|
||||
$cliverVersion = $cliverData['version'];
|
||||
$cliverType = $cliverData['type'];
|
||||
$singBoxVersionInfo = getSingboxVersion();
|
||||
$singBoxVersion = $singBoxVersionInfo['version'];
|
||||
$singBoxType = $singBoxVersionInfo['type'];
|
||||
@ -123,7 +135,6 @@ $mihomoVersionInfo = getMihomoVersion();
|
||||
$mihomoVersion = $mihomoVersionInfo['version'];
|
||||
$mihomoType = $mihomoVersionInfo['type'];
|
||||
$uiVersion = getUiVersion();
|
||||
$cliverVersion = getCliverVersion();
|
||||
$metaCubexdVersion = getMetaCubexdVersion();
|
||||
$metaVersion = getMetaVersion();
|
||||
$razordVersion = getRazordVersion();
|
||||
@ -300,7 +311,7 @@ $razordVersion = getRazordVersion();
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<select id="mihomoVersionSelect" class="form-select">
|
||||
<option value="stable">稳定版</option>
|
||||
<option value="stable">正式版</option>
|
||||
<option value="preview">预览版</option>
|
||||
</select>
|
||||
</div>
|
||||
@ -376,7 +387,7 @@ $razordVersion = getRazordVersion();
|
||||
<label for="singboxVersionSelectForChannelTwo">选择版本</label>
|
||||
<select id="singboxVersionSelectForChannelTwo" class="form-control">
|
||||
<option value="preview" selected>预览版</option>
|
||||
<option value="stable">稳定版</option>
|
||||
<option value="stable">正式版</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@ -810,14 +821,14 @@ document.getElementById('checkSingboxButton').addEventListener('click', function
|
||||
const puernyaVersion = "<?php echo htmlspecialchars($puernyaVersion); ?>";
|
||||
const singboxPreviewVersion = "<?php echo htmlspecialchars($singboxPreviewVersion); ?>";
|
||||
const currentVersions = {
|
||||
'Singbox 正式版': singBoxType === 'Singbox 正式版' ? singBoxVersion : '未安装',
|
||||
'Singbox 预览版': singboxPreviewVersion,
|
||||
'Puernya 预览版': puernyaVersion
|
||||
'Singbox [ 正式版 ]': singBoxType === 'Singbox 正式版' ? singBoxVersion : '未安装',
|
||||
'Singbox [ 预览版 ]': singboxPreviewVersion,
|
||||
'Puernya [ 预览版 ]': puernyaVersion
|
||||
};
|
||||
const updateFiles = [
|
||||
{ name: 'Singbox 正式版', url: 'update_singbox_stable.php' },
|
||||
{ name: 'Singbox 预览版', url: 'update_singbox_preview.php' },
|
||||
{ name: 'Puernya 预览版', url: 'puernya.php' }
|
||||
{ name: 'Singbox [ 正式版 ]', url: 'update_singbox_stable.php' },
|
||||
{ name: 'Singbox [ 预览版 ]', url: 'update_singbox_preview.php' },
|
||||
{ name: 'Puernya [ 预览版 ]', url: 'puernya.php' }
|
||||
];
|
||||
checkVersion('NewSingbox', updateFiles, currentVersions);
|
||||
});
|
||||
@ -827,13 +838,13 @@ document.getElementById('checkMihomoButton').addEventListener('click', function
|
||||
const mihomoType = "<?php echo htmlspecialchars($mihomoType); ?>";
|
||||
|
||||
const currentVersions = {
|
||||
'Mihomo 正式版': mihomoType === '正式版' ? mihomoVersion : '未安装',
|
||||
'Mihomo 预览版': mihomoType === '预览版' ? mihomoVersion : '未安装',
|
||||
'Mihomo [ 正式版 ]': mihomoType === '正式版' ? mihomoVersion : '未安装',
|
||||
'Mihomo [ 预览版 ]': mihomoType === '预览版' ? mihomoVersion : '未安装',
|
||||
};
|
||||
|
||||
const updateFiles = [
|
||||
{ name: 'Mihomo 正式版', url: 'update_mihomo_stable.php' },
|
||||
{ name: 'Mihomo 预览版', url: 'update_mihomo_preview.php' }
|
||||
{ name: 'Mihomo [ 正式版 ]', url: 'update_mihomo_stable.php' },
|
||||
{ name: 'Mihomo [ 预览版 ]', url: 'update_mihomo_preview.php' }
|
||||
];
|
||||
|
||||
checkVersion('NewMihomo', updateFiles, currentVersions);
|
||||
@ -856,10 +867,19 @@ document.getElementById('checkUiButton').addEventListener('click', function () {
|
||||
});
|
||||
|
||||
document.getElementById('checkCliverButton').addEventListener('click', function () {
|
||||
const cliverVersion = "<?php echo htmlspecialchars($cliverVersion); ?>";
|
||||
const cliverType = "<?php echo htmlspecialchars($cliverType); ?>";
|
||||
|
||||
const currentVersions = {
|
||||
'客户端': '<?php echo htmlspecialchars($cliverVersion); ?>',
|
||||
'客户端 [ 正式版 ]': cliverType === '正式版' ? cliverVersion : '未安装',
|
||||
'客户端 [ 预览版 ]': cliverType === '预览版' ? cliverVersion : '未安装',
|
||||
};
|
||||
const updateFiles = [{ name: '客户端', url: 'update_script.php' }];
|
||||
|
||||
const updateFiles = [
|
||||
{ name: '客户端 [ 正式版 ]', url: 'update_script.php' },
|
||||
{ name: '客户端 [ 预览版 ]', url: 'update_preview.php' }
|
||||
];
|
||||
|
||||
checkVersion('NewCliver', updateFiles, currentVersions);
|
||||
});
|
||||
|
||||
|
@ -765,7 +765,7 @@ EOL;
|
||||
<strong>1. 对于首次使用 Sing-box 的用户,必须将核心更新至版本 v1.10.0 或更高版本。确保将出站和入站/转发防火墙规则都设置为“接受”并启用它们。<p>
|
||||
<p style="color: red;">注意:在线订阅转换存在隐私泄露风险,请确保使用 Sing-box 的通道一版本,通道二版本不支持此功能。同时,需要下载并配置 geoip 和 geosite 文件以确保正常使用。</p>
|
||||
<p>订阅转换由肥羊提供</p>
|
||||
<a href="https://github.com/youshandefeiyang/sub-web-modify" target="_blank" class="btn btn-primary">
|
||||
<a href="https://github.com/youshandefeiyang/sub-web-modify" target="_blank" class="btn btn-primary" style="color: white;">
|
||||
点击访问
|
||||
</a>
|
||||
</div>
|
||||
|
@ -31,9 +31,18 @@ if (empty($new_version)) {
|
||||
die("未找到最新版本或版本信息为空。");
|
||||
}
|
||||
|
||||
$preview_suffix = "-preview";
|
||||
$installed_lang = isset($_GET['lang']) ? $_GET['lang'] : 'cn';
|
||||
|
||||
$download_url = "https://github.com/$repo_owner/$repo_name/releases/download/$new_version/{$package_name}_{$new_version}{$preview_suffix}_all.ipk";
|
||||
if ($installed_lang !== 'cn' && $installed_lang !== 'en') {
|
||||
die("无效的语言选择。请选择 'cn' 或 'en'。");
|
||||
}
|
||||
|
||||
if (isset($_GET['check_version'])) {
|
||||
echo "最新版本: V" . $new_version . "-beta";
|
||||
exit;
|
||||
}
|
||||
|
||||
$download_url = "https://github.com/$repo_owner/$repo_name/releases/download/$new_version/{$package_name}_{$new_version}-{$installed_lang}_all.ipk";
|
||||
|
||||
echo "<pre>最新版本: $new_version</pre>";
|
||||
echo "<pre>下载URL: $download_url</pre>";
|
||||
@ -47,7 +56,7 @@ echo "<script>
|
||||
|
||||
echo "<script>appendLog('开始下载更新...');</script>";
|
||||
|
||||
$local_file = "/tmp/{$package_name}_{$new_version}{$preview_suffix}_all.ipk";
|
||||
$local_file = "/tmp/{$package_name}_{$new_version}-{$installed_lang}_all.ipk";
|
||||
|
||||
$curl_command = "curl -sL " . escapeshellarg($download_url) . " -o " . escapeshellarg($local_file);
|
||||
exec($curl_command . " 2>&1", $output, $return_var);
|
||||
|
@ -1 +1 @@
|
||||
V1.5.9-cn
|
||||
V1.6.0-cn
|
||||
|
File diff suppressed because one or more lines are too long
@ -48,7 +48,7 @@
|
||||
onload="this.media='all'"
|
||||
href="https://unpkg.com/subsetted-fonts@latest/PingFangSC-Regular\PingFangSC-Regular.css"
|
||||
/>
|
||||
<script type="module" crossorigin src="./assets/index-BYS07YVA.js"></script>
|
||||
<script type="module" crossorigin src="./assets/index-C_rJi48D.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="./assets/index-BxIFQ89r.css">
|
||||
<link rel="manifest" href="./manifest.webmanifest"><script id="vite-plugin-pwa:register-sw" src="./registerSW.js"></script></head>
|
||||
<body>
|
||||
|
@ -1 +1 @@
|
||||
if(!self.define){let e,i={};const s=(s,n)=>(s=new URL(s+".js",n).href,i[s]||new Promise((i=>{if("document"in self){const e=document.createElement("script");e.src=s,e.onload=i,document.head.appendChild(e)}else e=s,importScripts(s),i()})).then((()=>{let e=i[s];if(!e)throw new Error(`Module ${s} didn’t register its module`);return e})));self.define=(n,r)=>{const f=e||("document"in self?document.currentScript.src:"")||location.href;if(i[f])return;let c={};const o=e=>s(e,f),t={module:{uri:f},exports:c,require:o};i[f]=Promise.all(n.map((e=>t[e]||o(e)))).then((e=>(r(...e),c)))}}define(["./workbox-3e8df8c8"],(function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"assets/index-BxIFQ89r.css",revision:null},{url:"assets/index-BYS07YVA.js",revision:null},{url:"index.html",revision:"b23b3aa969e6cf15ccc448aea2f17294"},{url:"registerSW.js",revision:"402b66900e731ca748771b6fc5e7a068"},{url:"favicon.svg",revision:"7f1c4521acc10694fefef8f72dd2ea5f"},{url:"pwa-192x192.png",revision:"021df52501f4357c03eebd808f40dc6a"},{url:"pwa-512x512.png",revision:"d2f759aaabcb2c44ff52b27fde3de6e0"},{url:"pwa-maskable-192x192.png",revision:"7cd11dc5f0490b349d23eef5591d10e5"},{url:"pwa-maskable-512x512.png",revision:"8c97dc367a85a5a1eba523b24f79d03b"},{url:"manifest.webmanifest",revision:"c452912633990899ffe790f985ad0db9"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html")))}));
|
||||
if(!self.define){let e,i={};const s=(s,n)=>(s=new URL(s+".js",n).href,i[s]||new Promise((i=>{if("document"in self){const e=document.createElement("script");e.src=s,e.onload=i,document.head.appendChild(e)}else e=s,importScripts(s),i()})).then((()=>{let e=i[s];if(!e)throw new Error(`Module ${s} didn’t register its module`);return e})));self.define=(n,r)=>{const f=e||("document"in self?document.currentScript.src:"")||location.href;if(i[f])return;let d={};const o=e=>s(e,f),t={module:{uri:f},exports:d,require:o};i[f]=Promise.all(n.map((e=>t[e]||o(e)))).then((e=>(r(...e),d)))}}define(["./workbox-3e8df8c8"],(function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"assets/index-BxIFQ89r.css",revision:null},{url:"assets/index-C_rJi48D.js",revision:null},{url:"index.html",revision:"d5b9ddeff79b3ee3c75b1df1edfb133d"},{url:"registerSW.js",revision:"402b66900e731ca748771b6fc5e7a068"},{url:"favicon.svg",revision:"7f1c4521acc10694fefef8f72dd2ea5f"},{url:"pwa-192x192.png",revision:"021df52501f4357c03eebd808f40dc6a"},{url:"pwa-512x512.png",revision:"d2f759aaabcb2c44ff52b27fde3de6e0"},{url:"pwa-maskable-192x192.png",revision:"7cd11dc5f0490b349d23eef5591d10e5"},{url:"pwa-maskable-512x512.png",revision:"8c97dc367a85a5a1eba523b24f79d03b"},{url:"manifest.webmanifest",revision:"c452912633990899ffe790f985ad0db9"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html")))}));
|
||||
|
@ -1 +1 @@
|
||||
v1.29.3
|
||||
v1.29.4
|
@ -1,12 +1,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=xray-core
|
||||
PKG_VERSION:=24.11.30
|
||||
PKG_VERSION:=24.12.18
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/XTLS/Xray-core/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=1ed728cf32cf9227c73e1b3651465eb089c6d2f42367cf40df62c4ba0edfc765
|
||||
PKG_HASH:=3d8b4a161a263e7af7bb1a2690961da075d13f980acd806f5cd4e5c8338d7534
|
||||
|
||||
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
||||
PKG_LICENSE:=MPL-2.0
|
||||
|
Loading…
Reference in New Issue
Block a user