75 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
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
wwqgtxx 0818aa54aa chore: provider a common entrance for YAML package 2026-01-16 11:05:13 +08:00
wwqgtxx b18a33552c chore: remove unused pointer in rules implements 2026-01-06 09:29:09 +08:00
joshua 498f81aad3 feat: add header support for rule provider (#2463) 2025-12-24 23:10:38 +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
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 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 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
H1JK ade4234615 chore: mrs use best compression 2024-09-07 20:22:21 +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 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
wwqgtxx 92ec5f2236 chore: cleanup dns policy match code 2024-08-15 20:08:14 +08:00
wwqgtxx 7fd0467aef feat: sniffer's force-domain and skip-domain support rule-set: and geosite: 2024-08-14 23:29:53 +08:00
xishang0128 5a73d99c6f fix: logic rules display error 2024-08-06 16:30:44 +08:00
wwqgtxx c830b8aaf7 feat: support convert mrs format back to text format 2024-07-28 11:00:27 +08:00
wwqgtxx 1db3e4583b chore: better converter 2024-07-27 23:54:28 +08:00
wwqgtxx 4f8a5a5f54 feat: add mrs format ipcidr ruleset 2024-07-27 10:36:11 +08:00
wwqgtxx 303f6e4567 feat: add mrs format domain ruleset 2024-07-26 22:30:42 +08:00
xishang0128 0e228765fc fix: Make the ruleset take effect in a single line 2024-06-28 14:14:36 +08:00
wwqgtxx 09be5cbc99 feat: tun support auto-redirect, route-address-set and route-exclude-address-set 2024-06-17 22:04:51 +08:00
xishang0128 fe88f0e437 chore: Ensure that some expressions take effect 2024-05-15 15:38:55 +08:00
xishang0128 f3e23b1128 feat: Allow providers to set individual proxy and headers 2024-04-08 01:27:17 +08:00
xishang0128 914bc8a3e9 fix: Fix DOMAIN-REGEX parsing 2024-03-29 13:43:11 +08:00
wwqgtxx 7c54775ddc chore: ipcidr direct using go4.org/netipx 2024-01-11 09:33:59 +08:00
Larvan2 425bc692ad chore: replace IpCidrTrie with binary search 2024-01-09 16:37:34 +08:00
H1JK 1479b449df chore: Cleanup code 2023-11-17 23:12:10 +08:00
Steve Johnson b5a8f0fce1 fix: improve feature check and add missing patches 2023-11-17 19:10:17 +08:00
Steve Johnson b73382f60a fix: fix android-arm64 build 2023-11-17 10:53:57 +08:00
Steve Johnson 9e96d70840 feat: share more code from android branch 2023-11-17 01:21:02 +08:00
wwqgtxx 17c9d507be chore: hello mihomo 2023-11-03 21:58:21 +08:00
Skyxim 96220aa8ea feat: cancel RULE-SET nested SUB-RULE restrictions 2023-10-31 11:10:38 +00:00
HolgerHuo 8ff476a3a1 fix: remote logic rules cannot be parsed (#837) 2023-10-31 19:07:01 +08:00