Skip to content

Commit

Permalink
Fix some ByteDance apps
Browse files Browse the repository at this point in the history
  • Loading branch information
xkww3n committed Dec 26, 2024
1 parent 4cf2a82 commit 18cdd4c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions source/patches/reject.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ REM:.bugly.qq.com
REM:.adsense.google.cn
REM:staticsns.cdn.bcebos.com
REM:.optimus-ads.amap.com
REM:.dig.bdurl.net

ADD:.mediav.com
ADD:.partwithner.com
Expand Down
6 changes: 3 additions & 3 deletions utils/ruleset.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,21 @@ def load(src: Path) -> RuleSet:
ruleset_type = RuleSetType.Domain
ruleset_loaded = RuleSet(ruleset_type, [])
match ruleset_type:
case "Domain":
case RuleSetType.Domain:
for line in src_toload:
if line.startswith("."):
ruleset_loaded.add(Rule(RuleType.DomainSuffix, line.strip(".")))
elif line and not line.startswith("#"):
ruleset_loaded.add(Rule(RuleType.DomainFull, line))
case "IPCIDR":
case RuleSetType.IPCIDR:
for line in src_toload:
if not line or line.startswith("#"):
continue
if ":" in line:
ruleset_loaded.add(Rule(RuleType.IPCIDR6, line))
else:
ruleset_loaded.add(Rule(RuleType.IPCIDR, line))
case "Combined":
case RuleSetType.Combined:
for line in src_toload:
if not line or line.startswith("#"):
continue
Expand Down

0 comments on commit 18cdd4c

Please sign in to comment.