MentoHUST 的 OpenWrt / ImmortalWrt 软件包,包含认证守护进程包和 LuCI 配置包。
本仓库按照常规 OpenWrt 风格将软件包拆分如下:
mentohust:守护进程、OpenWrt 包 Makefile、init 脚本以及默认 UCI 配置luci-app-mentohust:LuCI 页面、ACL、ucitrack 元数据以及中文翻译源文件
本仓库 fork / 维护自 MentoHUST 相关公开项目,并针对 OpenWrt / ImmortalWrt 打包和 LuCI 使用做整理:
- 原始项目:https://code.google.com/archive/p/mentohust/
- GitHub 镜像 / 延续:https://github.com/HustLion/mentohust
- OpenWrt 打包参考:https://github.com/sbwml/luci-app-mentohust
- LuCI 实现参考:https://github.com/Yozlyn/luci-app-mentohust
与常见的 OpenWrt MentoHUST 打包版本相比,本仓库:
- 修复了 GBK/UTF-8 输出处理,使中文认证消息在 OpenWrt 上不太容易出现乱码
- 在转换之前根据数据包长度限制了数据包消息字符串的解析范围
- 修复了在
char为有符号类型的平台上 GBK 规范化中的无符号字符处理 bug - 守护进程包仅依赖
libpcap - 提供 procd/UCI init 脚本,支持 LuCI 管理启动
- 保持网络接口由用户显式指定,而非猜测或硬编码特定于路由器的默认值
- 规范化
udhcpc -i以在运行时追加用户选择的接口 - 优先通过
mentohust -k停止守护进程,必要时再回退到普通的进程终止方式 - 添加 LuCI ACL 和 ucitrack 元数据,使配置更改可以通过常规的 LuCI/OpenWrt 机制重新加载服务
- 包含 LuCI 页面的中文翻译源文件
- 添加 GitHub Actions 工作流,用于为常见 OpenWrt 架构构建发布版 IPK
将本仓库克隆到 OpenWrt SDK 的包 feed 目录中,或将其用作 openwrt/gh-action-sdk 的 feed 目录。
手动 SDK 示例:
cp -r mentohust luci-app-mentohust /path/to/openwrt-sdk/package/
cd /path/to/openwrt-sdk
make package/mentohust/compile V=sc
make package/luci-app-mentohust/compile V=scLuCI 包依赖 mentohust,建议同时构建两个包:
make package/mentohust/compile package/luci-app-mentohust/compile V=sc先安装守护进程包,再安装 LuCI 包:
opkg install mentohust_*.ipk
opkg install luci-app-mentohust_*.ipk安装完成后,打开 LuCI,在以下位置配置 MentoHUST:
服务 -> MentoHUST
请显式设置认证接口。MentoHUST 无法在每台路由器上可靠地推断校园网 WAN 接口。
本项目旨在维护一个可用的 MentoHUST OpenWrt 软件包。各学校的校园网认证行为因网络部署而异,用户可能仍需根据本地环境调整组播模式、DHCP 模式、客户端版本或数据文件。