luci-app-timecontrol: fix IPv6 bypass, midnight weekday shift, flow o… - #415
Merged
Merged
Conversation
…ffloading and auto-reload - Add ip6tables mirror rules: every iptables rule is now duplicated into ip6tables so that IPv6 forwarded traffic is controlled on fw3 systems. - Fix midnight-spanning weekday shift: when a time range crosses midnight (e.g. 22:00-08:00), the after-midnight segment now correctly uses weekdays+1 (Fri 22:00 -> Sat 08:00 instead of blocking Fri 00:00-08:00). - Flush nft flowtable on start: on fw4 systems with flow offloading, existing offloaded connections are forced back to the slow path where the DROP rules can reach them. - Register EXTRA_COMMANDS status: the status() function is now callable via /etc/init.d/timecontrol status. - Guard ucitrack registration: check /etc/config/ucitrack exists before adding entries, matching the pattern used by openclash/passwall/mosdns. - Add CBI on_after_apply callback: with apply_on_parse=true, LuCI Save & Apply now triggers an automatic service reload (same approach as openvpn/passwall/lucky). - Bump PKG_RELEASE to 3. Signed-off-by: sunj <sun82kg@qq.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
修复 luci-app-timecontrol 存在的多个缺陷:
1. IPv6 流量完全未控制(iptables/fw3 后端)
2. 跨午夜拆分时星期集合错位
22:00→08:00时两段共用同一组星期,导致错封当天凌晨、漏放次日凌晨3. nft/fw4 下 flow offloading 导致规则失效
4. LuCI 保存与应用后服务不自动重启
[ -f "/etc/config/ucitrack" ]保护(与 openclash/passwall/mosdns 一致)apply_on_parse=true+on_after_apply回调,保存后自动 reload5. 其他
status命令,/etc/init.d/timecontrol status可正常调用Tested on
之前在fw3环境下ipv6流量无法拦截。现在测试已ok。fw4应该本来就好的