$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");
?>
&1";
exec($command, $output, $returnVar);
if ($returnVar === 0) {
foreach ($output as $line) {
if (strpos($line, 'version') !== false) {
$parts = explode(' ', $line);
$version = end($parts);
if (strpos($version, 'alpha') !== false || strpos($version, 'beta') !== false) {
if (strpos($version, '1.10.0-alpha.29-067c81a7') !== false) {
return ['version' => $version, 'type' => 'Puernya 预览版'];
}
return ['version' => $version, 'type' => 'Singbox 预览版'];
} else {
if (strpos($version, 'v') !== false) {
return ['version' => $version, 'type' => 'Singbox 编译版'];
}
return ['version' => $version, 'type' => 'Singbox 正式版'];
}
}
}
}
return ['version' => '未安装', 'type' => '未知'];
}
function getMihomoVersion() {
$mihomoPath = '/usr/bin/mihomo';
$command = "$mihomoPath -v 2>&1";
exec($command, $output, $returnVar);
if ($returnVar === 0) {
foreach ($output as $line) {
if (strpos($line, 'Mihomo') !== false) {
preg_match('/alpha-[a-z0-9]+/', $line, $matches);
if (!empty($matches)) {
$version = $matches[0];
return ['version' => $version, 'type' => '预览版'];
}
preg_match('/([0-9]+(\.[0-9]+)+)/', $line, $matches);
if (!empty($matches)) {
$version = $matches[0];
if (preg_match('/^\d/', $version)) {
$version = 'v' . $version;
}
return ['version' => $version, 'type' => '正式版'];
}
}
}
}
return ['version' => '未安装', 'type' => '未知'];
}
function getUiVersion() {
$versionFile = '/etc/neko/ui/zashboard/version.txt';
if (file_exists($versionFile)) {
return trim(file_get_contents($versionFile));
} else {
return "未安装";
}
}
function getMetaCubexdVersion() {
$versionFile = '/etc/neko/ui/metacubexd/version.txt';
if (file_exists($versionFile)) {
return trim(file_get_contents($versionFile));
} else {
return "未安装";
}
}
function getMetaVersion() {
$versionFile = '/etc/neko/ui/meta/version.txt';
if (file_exists($versionFile)) {
return trim(file_get_contents($versionFile));
} else {
return "未安装";
}
}
function getRazordVersion() {
$versionFile = '/etc/neko/ui/dashboard/version.txt';
if (file_exists($versionFile)) {
return trim(file_get_contents($versionFile));
} else {
return "未安装";
}
}
function getCliverVersion() {
$versionFile = '/etc/neko/tmp/nekobox_version';
if (file_exists($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 ['version' => '未安装', 'type' => '未知'];
}
}
$cliverData = getCliverVersion();
$cliverVersion = $cliverData['version'];
$cliverType = $cliverData['type'];
$singBoxVersionInfo = getSingboxVersion();
$singBoxVersion = $singBoxVersionInfo['version'];
$singBoxType = $singBoxVersionInfo['type'];
$puernyaVersion = ($singBoxType === 'Puernya 预览版') ? $singBoxVersion : '未安装';
$singboxPreviewVersion = ($singBoxType === 'Singbox 预览版') ? $singBoxVersion : '未安装';
$singboxCompileVersion = ($singBoxType === 'Singbox 编译版') ? $singBoxVersion : '未安装';
$mihomoVersionInfo = getMihomoVersion();
$mihomoVersion = $mihomoVersionInfo['version'];
$mihomoType = $mihomoVersionInfo['type'];
$uiVersion = getUiVersion();
$metaCubexdVersion = getMetaCubexdVersion();
$metaVersion = getMetaVersion();
$razordVersion = getRazordVersion();
?>
Settings - Nekobox
首页
面板
订阅
设定
主题设定
自动重载防火墙
|
|
|
Sing-box 核心版本 |
|
|
|
Mihomo 核心版本 |
|
|
|
说明: 请优先选择通道一编译版本进行更新,以确保兼容性。系统会先检测并动态生成最新版本号供选择下载。 如果通道一更新不可用,可以尝试通道二版本。
说明: 请根据需求选择操作。
上传背景图片
上传的图片文件
文件名 |
文件大小 |
操作 |
$file |
" . formatSize($fileSize) . " |
删除 |
";
}
}
}
?>
window.location.href = "settings.php";';
exit;
}
}
function formatSize($size) {
if ($size >= 1073741824) {
return number_format($size / 1073741824, 2) . ' GB';
} elseif ($size >= 1048576) {
return number_format($size / 1048576, 2) . ' MB';
} elseif ($size >= 1024) {
return number_format($size / 1024, 2) . ' KB';
} else {
return $size . ' bytes';
}
}
?>
NekoBox
关于 NekoBox
NekoBox
NekoBox是一款精心设计的 Sing-box 代理工具,专为家庭用户打造,旨在提供简洁而强大的代理解决方案。基于 PHP 和 BASH 技术,NekoBox 将复杂的代理配置简化为直观的操作体验,让每个用户都能轻松享受高效、安全的网络环境。
核心特点
简化配置
采用用户友好的界面和智能配置功能,轻松实现 Sing-box 代理的设置与管理。
优化性能
通过高效的脚本和自动化处理,确保最佳的代理性能和稳定性。
无缝体验
专为家庭用户设计,兼顾易用性与功能性,确保每个家庭成员都能便捷地使用代理服务。
工具信息
外部链接
Github |
Thaolga |
|
|
Telegram |
Zephyruso |
|
|