Repository navigation
lanstat: add new package - #31466
lanstat: add new package#31466wbpluto wants to merge 1 commit into
Conversation
| $(INSTALL_DIR) $(1)/usr/share/luci/menu.d | ||
| $(INSTALL_DATA) $(PKG_BUILD_DIR)/openwrt/usr/share/luci/menu.d/lanstat.json $(1)/usr/share/luci/menu.d/lanstat.json | ||
| $(INSTALL_DIR) $(1)/usr/share/rpcd/acl.d | ||
| $(INSTALL_DATA) $(PKG_BUILD_DIR)/openwrt/usr/share/rpcd/acl.d/lanstat.json $(1)/usr/share/rpcd/acl.d/lanstat.json | ||
| $(INSTALL_DIR) $(1)/www/luci-static/resources/view | ||
| $(INSTALL_DATA) $(PKG_BUILD_DIR)/openwrt/www/luci-static/resources/view/lanstat.js $(1)/www/luci-static/resources/view/lanstat.js | ||
| $(INSTALL_DIR) $(1)/usr/lib/lua/luci/i18n | ||
| $(INSTALL_DATA) $(PKG_BUILD_DIR)/openwrt/usr/lib/lua/luci/i18n/lanstat.zh-cn.lmo $(1)/usr/lib/lua/luci/i18n/lanstat.zh-cn.lmo | ||
| $(INSTALL_DATA) $(PKG_BUILD_DIR)/openwrt/usr/lib/lua/luci/i18n/lanstat.zh-tw.lmo $(1)/usr/lib/lua/luci/i18n/lanstat.zh-tw.lmo |
There was a problem hiding this comment.
These lines install the LuCI menu, ACL and view, plus prebuilt .lmo binaries, directly from the upstream archive's openwrt/ directory. LuCI integration usually goes to openwrt/luci as a separate luci-app-lanstat, where the translations are built from .po sources by LuciTranslation in luci.mk:371-399. If you drop these lines here, the LuCI cache and rpcd handling in postinst/postrm can go too.
Generated by Claude Code
There was a problem hiding this comment.
| @@ -0,0 +1,9 @@ | |||
| config lanstat 'main' | |||
| option enabled '1' | |||
| option interface 'br-lan' | |||
There was a problem hiding this comment.
network_get_device in the init script expects a logical interface name, so with br-lan the lookup always fails and the init script falls back to the raw device name. On boards whose LAN is not a bridge called br-lan, that fallback picks the wrong device. Default to the logical lan here, and also change the "br-lan" fallback at lanstat.init line 17.
| option interface 'br-lan' | |
| option interface 'lan' |
Generated by Claude Code
There was a problem hiding this comment.
905a470 to
2129405
Compare
openwrt-ai
left a comment
There was a problem hiding this comment.
Commit checks
- 2129405 "lanstat: remove LuCI integration and default interface to lan": this only undoes and fixes parts of 26b7816, which still says it adds an "optional LuCI menu entry". Squash both into one "lanstat: add new package" commit and drop the LuCI wording from its message.
Generated by Claude Code
| $(INSTALL_CONF) ./files/lanstat.config $(1)/etc/config/lanstat | ||
| $(INSTALL_DIR) $(1)/etc/init.d | ||
| $(INSTALL_BIN) ./files/lanstat.init $(1)/etc/init.d/lanstat | ||
| endef |
There was a problem hiding this comment.
nit: The PR body still lists "optional static LuCI menu entry (Status -> Bandwidth Monitor)", but this package no longer ships one. Please update the description to point to the separate luci-app-lanstat PR.
Generated by Claude Code
There was a problem hiding this comment.
Add LuCI web interface for lanstat real-time LAN client bandwidth monitoring. Provides a LuCI status view and ubus/rpcd ACL integration for the lanstat daemon (openwrt/packages#31466). Signed-off-by: Junwei Huang <hjw@live.cn>
|
Packaging and device-test update for this PR: the upstream v1.0.1 GitHub Release workflow merged six SDK artifacts with the same APK filename, leaving only one APK on the release page. On a WR30U (mediatek/filogic), a locally installed I fixed the upstream release workflow to include the SDK architecture in each APK asset name for future releases: wbpluto/lanstat@0f4877b. The existing v1.0.1 release asset predates this change. The collision occurred when publishing standalone GitHub assets, outside the OpenWrt feed build. On the WR30U running ImmortalWrt, I redeployed v1.0.1 using the Cortex-A53 SDK binary in a locally indexed, signed feed and installed by package name. The existing LuCI package and configuration were preserved. The dashboard returned HTTP 200, packet capture was active on |
Add lanstat 1.0.1 to monitor per-host LAN bandwidth and display live traffic in its embedded web dashboard. Signed-off-by: Junwei Huang <hjw@live.cn>
📦 Package Details
Maintainer: @wbpluto
Description:
Add
lanstat1.0.1, a lightweight, single-binary C11 LAN bandwidth monitor for OpenWrt with zero external runtime dependencies.AF_PACKET+TPACKET_V2zero-copy ring buffer (~1.8 MB RSS).6670) with multi-window history (60s / 60m / 24h / 31d), offline IEEE OUI vendor lookup, privacy masking mode, and bilingual CN/EN support..ipk) and 25.12 (.apk) SDKs forx86_64,aarch64_cortex-a53,aarch64_generic,mipsel_24kc,arm_cortex-a7_neon-vfpv4, andmips_24kc.🔬 Run Testing Details
aarch64_cortex-a53)✅ Formalities
messages, and the description says what it was used for.
AI assistance was used for packaging, commit messages and the PR description.