feat: evolve rate-filter to a more generic filter
This commit is contained in:
@ -24,7 +24,7 @@ scientific-surfing (`ssm`) CLI and their roles. The CLI is a single Go binary
|
||||
- **Key Methods:** `ImportConfig`, `ExportConfig`, `EditConfig`, `ResetConfig`, `ShowConfig`, `Apply`
|
||||
|
||||
### 4. Automation Engine (`internal/automation`)
|
||||
- **Purpose:** Implements the `ssm:` automation block that can be added to core-config.yaml: building a new proxy-group from proxies matching a subscription/keyword filter (`proxy-groups`), building one from proxies whose name encodes a rate/multiplier extracted via regexp and compared with an operator (`rate-filters`), and generic append/prepend/replace patches at an arbitrary dot/bracket path in the generated config (`patches`). The `ssm:` key itself is always stripped from the generated config before it's written — mihomo never sees it.
|
||||
- **Purpose:** Implements the `ssm:` automation block that can be added to core-config.yaml: building a new proxy-group from proxies/proxy-groups matching a subscription/name-pattern filter (`proxy-groups`), stripping unwanted proxies/proxy-groups — scoped by subscription/name-pattern and, optionally, one or more values encoded in the name extracted via regexp and compared with an operator (ANDed together) — out of every proxy-group's `proxies` list, subscription-provided or freshly built (`filters`), and generic append/prepend/replace patches at an arbitrary dot/bracket path in the generated config (`patches`). Matching (`match.name-pattern`/`match.subscriptions`) considers both raw proxies and each subscription's own proxy-groups (e.g. its default selector) — never builtins like DIRECT/REJECT, which aren't sourced from any subscription. The `ssm:` key itself is always stripped from the generated config before it's written — mihomo never sees it.
|
||||
- **Key Functions:** `ParseConfig`, `Apply`, `PrefixProxyNames`
|
||||
|
||||
### 5. Core Manager (`internal/core`)
|
||||
|
||||
Reference in New Issue
Block a user