MetaCubeX / mihomo

A simple Python Pydantic model for Honkai: Star Rail parsed data from the Mihomo API.

Home Page:https://wiki.metacubex.one

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Feature] Parental control feature, I wrote two new rule type for Parental control, could you please add them?

parentalclash opened this issue · comments

Verify steps

Description

I wrote two new rule types for Parental control, could you please add them?
one for Mac address match, the other one for time duration match.
in addition, I found a issue for subrule match. the recursion is not working well since it missed a 'return'.

I could send the source code to you. I hope it will contribute to others rather than I fork another one.

Thanks!

$ git status
On branch parental_control_test
Changes to be committed:
(use "git restore --staged ..." to unstage)
new file: rules/common/mac.go
new file: rules/common/schedule.go

Changes not staged for commit:
(use "git add ..." to update what will be committed)
(use "git restore ..." to discard changes in working directory)
modified: constant/rule.go
modified: go.mod
modified: go.sum
modified: rules/logic/logic.go
modified: rules/parser.go

Possible Solution

No response