Repository navigation
v1.22.1
v1.22.1 — 快照与回滚 + 持久变更审计
优先级 3 安全网:所有配置变更可退,变更历史重启不丢。
快照与回滚(netsteer-snapshot)
- 档位(mode)/ 总开关与设备加速(qos)/ 向导(wizard)/ 不抢网设备列表(bulk)四类写操作变更前自动快照
- 快照内容:netsteer + sqm 全量 uci、firewall offloading 字段、当时档位;存
/etc/netsteer/snapshots/,保留 20 份,同标签 5 分钟去重(防连点/自愈刷屏) restore <id|latest>:uci 恢复 → sqm restart → fw4 reload → netsteer-apply 重对齐运行态 → 重放 nft 规则层(P2P 直通按恢复档位重建、游戏通道 qos reapply)——规则不在 uci 里,纯 uci 恢复会漏这一层(真机实测发现并补上)- 回滚前自动另存 pre-restore 快照:回滚本身可回滚;
/etc/config/*.pre-restore兜底防 import 失败 - 不整包恢复 firewall(只还原 offloading 单字段)——整包恢复防火墙风险过高
持久变更审计
/etc/netsteer/history.log:save/auto/restore 全记录 + check 的状态变化双写;重启不丢(v1.22.1 前 /tmp 版重启即失是盲区);2000 行滚动留 800- 仅 state 变化时写 /etc,不伤 flash
UI
- 专家调教页新「快照与回滚」卡:快照计数 + 最近一份 + 最近 6 条变更时间线 + 带确认弹窗的回滚按钮
真机验证(R5C)
- mode 切换触发自动快照(快照内 mode 字段=变更前状态)✅
- restore latest:standard→p2p 档位恢复、cake 在位 ✅
- 连续回滚:pre-restore 链(回滚可回滚)✅
- 指定恢复 p2p 态快照:nft 直通规则 3 条重放重建 ✅;standard 态 0 条(不误建)✅
- snapshot 单测 27 项(CI 新增步骤)+ e2e 19 项全绿 + doctor VERDICT OK
Full Changelog: v1.22.0...v1.22.1
v1.22.1 — Snapshots & rollback + persistent change audit
Priority-3 safety net: every config change is reversible, and the change timeline survives reboots.
Snapshots & rollback (netsteer-snapshot)
- Auto-snapshot before write operations across four channels: mode switches, master toggle / device boost (qos), wizard apply, bulk device list
- Snapshot contents: full netsteer + sqm uci, firewall offloading field, mode at the time; stored at
/etc/netsteer/snapshots/, 20 kept, 5-min same-label dedup (anti double-tap / self-heal spam) restore <id|latest>: uci restore → sqm restart → fw4 reload → netsteer-apply runtime re-align → replays the nft rules layer (p2p passthrough rebuilt per restored mode, game lane via qos reapply) — rules don't live in uci, a uci-only restore would miss them (found in device testing and fixed)- Auto pre-restore snapshot before every rollback: rollbacks themselves are rollback-able;
/etc/config/*.pre-restorefallback guards against import failure - firewall is never wholesale restored (only the offloading field) — restoring the whole firewall package is too risky
Persistent change audit
/etc/netsteer/history.log: all save/auto/restore events + check's state-change lines; survives reboots (before v1.22.1 the /tmp copy vanished on reboot); rolls at 2000 lines keeping 800- /etc is written only on actual state changes — no flash wear
UI
- New "Snapshots & rollback" card on the expert page: snapshot count, latest id, last 6 timeline entries, and a rollback button behind a confirmation modal
Device verification (R5C)
- Mode switch triggers auto-snapshot (snapshot's mode field = pre-change state) ✅
- restore latest: standard→p2p mode restored, cake in place ✅
- Chained rollback: pre-restore chain (rollback the rollback) ✅
- Restoring an explicit p2p snapshot: 3 nft passthrough rules rebuilt ✅; standard state stays at 0 (no false rebuild) ✅
- 27 snapshot unit tests (new CI step) + 19 e2e checks green + doctor VERDICT OK
Full Changelog: v1.22.0...v1.22.1
Download the .apk matching your device architecture (check /etc/apk/arch on the router).
Install (OpenWrt 24.10+/25.12):
apk add --allow-untrusted /tmp/luci-app-netsteer-*.apk
Built automatically by CI from this tag — unit tests + 4-arch build matrix.
Every package is verified with apk verify before it is attached.