$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(); ?>
自动重载防火墙 |
|
客户端版本 |
UI 控制面板 |
Sing-box 核心版本 |
Mihomo 核心版本 |
NekoBox是一款精心设计的 Sing-box 代理工具,专为家庭用户打造,旨在提供简洁而强大的代理解决方案。基于 PHP 和 BASH 技术,NekoBox 将复杂的代理配置简化为直观的操作体验,让每个用户都能轻松享受高效、安全的网络环境。
采用用户友好的界面和智能配置功能,轻松实现 Sing-box 代理的设置与管理。
通过高效的脚本和自动化处理,确保最佳的代理性能和稳定性。
专为家庭用户设计,兼顾易用性与功能性,确保每个家庭成员都能便捷地使用代理服务。