1
0
mirror of https://github.com/MetaCubeX/mihomo.git synced 2026-10-10 12:13:10 +08:00

174 Commits

Author SHA1 Message Date
wwqgtxx 6087521e60 chore: avoid a separate rule slice in DumpMrs
DomainSet emits at most one exact entry and one suffix-only entry for each domain. Sorting without the leading dot makes matching pairs adjacent, so they can be combined in place.

Replace per-entry binary searches and the separate rule slice with an adjacent pairing pass. Merge pairs into +.domain, remove consumed entries from the original slice, and sort the resulting rules by their full text.

Add regression coverage for multiple pairs and wildcard ordering. Output semantics and early termination remain unchanged.
2026-09-10 22:28:36 +08:00
wwqgtxx 77b9393c32 fix: preserve domain rules across Foreach round trips
The +.domain syntax includes both the domain itself and its subdomains. Using it for a suffix-only terminal adds an unintended exact match when the output is reinserted and can overwrite a separately stored exact value.

Emit .domain for suffix-only entries in DomainTrie and DomainSet Foreach, keeping exact entries separate. Preserve the internal '+' marker when converting Trie to Set, and combine MRS entries into +.domain only when both exact and suffix entries exist.

Add regression coverage for matching behavior and distinct values after reinsertion, as well as MRS deduplication and compact output. Query logic and binary layouts remain unchanged.
2026-09-10 18:52:49 +08:00
wwqgtxx bbb8cb924b chore: add standalone DomainSetBuilder 2026-09-08 10:27:49 +08:00
wwqgtxx 2f7eae5a26 chore: report detailed errors for invalid Clash-style domain patterns 2026-08-17 09:35:10 +08:00
AaronChen0 c079b0cc12 fix: panic on full-width IP-SUFFIX rules (#2975) 2026-07-15 21:51:32 +08:00
AaronChen0 c5834396c4 fix: DOMAIN-WILDCARD ignores sniffed hostname (#2956) 2026-07-10 19:29:08 +08:00
wwqgtxx 76bf840121 chore: code cleanup 2026-06-22 10:23:43 +08:00
Peter Solomon ea19cda0c9 feat: add rematch outbound type and REMATCH-NAME rule type (#2862) 2026-06-12 22:13:32 +08:00
wwqgtxx 01edf45ce0 chore: improve internal api 2026-06-05 17:25:40 +08:00
wwqgtxx e928ef59c1 feat: add path-in-bundle to rule-providers to support extract from BundleMRS.7z when the local file does not exist 2026-06-05 12:13:12 +08:00
ECHSFXY fd2112ecbe feat: add built-in proxy PASS-RULE (#2873)
when a PASS-RULE is hit in a sub-rule, the sub-rule will not be skipped; instead, the currently hit rule branch will be skipped, and the matching of rules will continue in the sub-rule.
2026-06-04 21:23:39 +08:00
wwqgtxx 707fe8b207 chore: remove auto IDNA conversion in domain rules
The original upstream does not support it, and there are many places in the current code that do not support it either. Removing it will help maintain consistency in behavior across different parts.
2026-01-23 09:36:13 +08:00
wwqgtxx 0818aa54aa chore: provider a common entrance for YAML package 2026-01-16 11:05:13 +08:00
wwqgtxx 0cf37de1a8 chore: better time storage in rule wrapper 2026-01-12 00:50:55 +08:00
wwqgtxx c8e33a4347 chore: decrease rule wrapper memory usage 2026-01-11 20:57:28 +08:00
potoo0 19a6b5d6f7 feat: support rule disabling and hit/miss count/at tracking in restful api (#2502) 2026-01-11 19:37:08 +08:00
wwqgtxx 94c8d60f72 chore: simplified logic rule parsing 2026-01-08 23:42:01 +08:00
wwqgtxx b18a33552c chore: remove unused pointer in rules implements 2026-01-06 09:29:09 +08:00
wwqgtxx 487de9b548 feat: add PROCESS-NAME-WILDCARD and PROCESS-PATH-WILDCARD 2026-01-06 08:52:06 +08:00
joshua 498f81aad3 feat: add header support for rule provider (#2463) 2025-12-24 23:10:38 +08:00
wwqgtxx 9168bee6b7 chore: align internal logic 2025-12-24 18:26:55 +08:00
HolgerHuo e6c0e3b19c fix: handle geoip:lan when GetRecodeSize() (#2460) 2025-12-24 08:34:19 +08:00
wwqgtxx 85c56e7446 chore: revert ade42346 for convert speed 2025-10-27 11:37:49 +08:00
白日梦主义 b06ec5bef8 fix: add path safety check in file type providers (#2177) 2025-07-22 21:37:54 +08:00
wwqgtxx 300eb8b12a chore: rebuild rule parsing code 2025-07-14 10:35:33 +08:00
wwqgtxx 2b84dd3618 fix: regex in logic rules
https://github.com/MetaCubeX/mihomo/issues/2150
2025-07-07 16:16:16 +08:00
ayanamist 241ae92bce feat: support DOMAIN-WILDCARD rule (#2124)
only support asterisk(*) and question mark(?)
2025-06-27 16:35:55 +08:00
wwqgtxx 5b975275f5 fix: incorrect checking of strings.Split return value
strings.Split will never return a slice of length 0 if sep is not empty, so any code that checks if the return value is of length 0 is incorrect and useless.
2025-06-25 16:20:37 +08:00
wwqgtxx ae7967f662 chore: the resolve and findProcess behaviors of Logic and SubRules follow the order and needs of the internal rules 2025-06-10 20:11:50 +08:00
wwqgtxx 2116640886 chore: the updateConfigs api also adds a check for SAFE_PATHS 2025-05-12 11:28:15 +08:00
wwqgtxx f328203bc1 feat: not inline proxy-provider can also set payload as fallback proxies when file/http parsing fails 2025-04-30 16:03:02 +08:00
wwqgtxx 5c40a6340c feat: not inline rule-provider can also set payload as fallback rules when file/http parsing fails 2025-04-30 14:09:15 +08:00
ForestL ef29e4501e chore: complete classical rule parse error log (#1839) 2025-02-13 17:25:45 +08:00
wwqgtxx 20739f5db7 chore: code cleanup 2024-12-25 10:34:16 +08:00
wwqgtxx 5a9ad0ed3c chore: code cleanup
Trigger CMFA Update / trigger-CMFA-update (push) Waiting to run
2024-12-19 09:29:17 +08:00
qianlongzt bb803249fa feat: support inline rule provider (#1731) 2024-12-19 09:16:45 +08:00
wwqgtxx fbead56ec9 feat: add size-limit for provider
https://github.com/MetaCubeX/mihomo/issues/1645
2024-11-27 09:28:38 +08:00
wwqgtxx 80e4eaad14 fix: process IPv6 Link-Local address (#1657)
Trigger CMFA Update / trigger-CMFA-update (push) Failing after 8s
2024-11-18 10:34:43 +08:00
xishang0128 a86c562852 chore: Increase support for other format of ASN
Trigger CMFA Update / trigger-CMFA-update (push) Failing after 30s
2024-11-04 19:31:43 +08:00
wwqgtxx b7cb6774bf chore: support ETag for update geo 2024-09-22 13:57:57 +08:00
wwqgtxx 5d242510c8 chore: support ETag for providers 2024-09-22 11:42:29 +08:00
wwqgtxx e33d4a4769 chore: cleanup the patch code 2024-09-12 11:19:54 +08:00
wwqgtxx 0a2f606e1b chore: cleanup the patch code 2024-09-11 16:10:49 +08:00
wwqgtxx 7c8f451892 chore: cleanup geo internal code 2024-09-09 16:08:48 +08:00
H1JK ade4234615 chore: mrs use best compression 2024-09-07 20:22:21 +08:00
wwqgtxx 38fd37108b feat: GEOIP,IP-ASN,IP-CIDR,IP-CIDR6 and IP-SUFFIX in rules support ,src option
keep the same writing style as `RULE-SET`
2024-08-30 00:04:59 +08:00
wwqgtxx 763a127287 feat: RULE-SET in rules support ,src option
should only be used with `ipcidr` behavior
2024-08-29 23:49:16 +08:00
wwqgtxx a96f72ade4 fix: geoip wrong matching logic in fallback-filter
https://github.com/MetaCubeX/mihomo/issues/1478
2024-08-29 22:00:55 +08:00
wwqgtxx 4fecf68b8b chore: add sourceGeoIP and sourceIPASN to metadata 2024-08-28 12:25:45 +08:00
wwqgtxx 3e2c9ce821 chore: cleanup patch code 2024-08-27 11:04:42 +08:00