Scope of this historical document
This document preserves historical instructions for original Clash / Clash Premium to help interpret older configurations. References to “Premium only”, unsupported features, or platform limits do not describe current Mihomo capabilities. Do not use them to overwrite your current client configuration or run permission-related commands.
For Mihomo, consult current Mihomo configuration documentation. For the graphical interface, installation, and permissions, follow the documentation for your specific client.
Rule Providers work much like Proxy Providers. They let users load rules from external sources, keeping the configuration concise. This feature is currently available only in the Clash Premium core.
To define Rule Providers, add the rule-providers field to the main configuration:
rule-providers:
apple:
behavior: "domain" # domain, ipcidr or classical (仅限 Clash Premium 内核)
type: http
url: "url"
# format: 'yaml' # or 'text'
interval: 3600
path: ./apple.yaml
microsoft:
behavior: "domain"
type: file
path: /microsoft.yaml
rules:
- RULE-SET,apple,REJECT
- RULE-SET,microsoft,policyThree behavior types are available:
domain
yaml:
payload:
- '.blogger.com'
- '*.*.microsoft.com'
- 'books.itunes.apple.com'text:
# comment
.blogger.com
*.*.microsoft.com
books.itunes.apple.comipcidr
yaml
payload:
- '192.168.1.0/24'
- '10.0.0.0.1/32'text:
# comment
192.168.1.0/24
10.0.0.0.1/32classical
yaml:
payload:
- DOMAIN-SUFFIX,google.com
- DOMAIN-KEYWORD,google
- DOMAIN,ad.com
- SRC-IP-CIDR,192.168.1.201/32
- IP-CIDR,127.0.0.0/8
- GEOIP,CN
- DST-PORT,80
- SRC-PORT,7777
# MATCH 在这里并不是必须的text:
# comment
DOMAIN-SUFFIX,google.com
DOMAIN-KEYWORD,google
DOMAIN,ad.com
SRC-IP-CIDR,192.168.1.201/32
IP-CIDR,127.0.0.0/8
GEOIP,CN
DST-PORT,80
SRC-PORT,7777