Add mihomo support

This commit is contained in:
qlin 2026-11-23 14:06:55 +08:00
commit 1d946ea8fd
No known key found for this signature in database
3 changed files with 56 additions and 2 deletions

View file

@ -8,14 +8,16 @@
. .
├── LICENSE ├── LICENSE
├── README.md ├── README.md
├── mihomo/ # mihomo 配置片段与规则集(暂为空) ├── mihomo/
│ └── ai/
│ └── claude.yaml # Claude / Anthropic 域名规则集(mihomo rule-provider)
└── surge/ └── surge/
└── ai/ └── ai/
└── claude.conf # Claude / Anthropic 相关域名规则集 └── claude.conf # Claude / Anthropic 相关域名规则集
``` ```
- `surge/`:Surge 规则集、模块(`.sgmodule`)及配置片段 - `surge/`:Surge 规则集、模块(`.sgmodule`)及配置片段
- `mihomo/`:mihomo 配置片段或规则集,目前为空目录(`.gitkeep` 占位) - `mihomo/`:mihomo 配置片段或规则集
## 订阅与使用 ## 订阅与使用
@ -30,6 +32,7 @@ https://git.bonitos.link/mes0/confs/raw/branch/main/<文件路径>
| 文件 | 说明 | Raw 链接 | | 文件 | 说明 | Raw 链接 |
| --- | --- | --- | | --- | --- | --- |
| `surge/ai/claude.conf` | Claude / Anthropic 域名规则(参考 [ip.net.coffee](https://ip.net.coffee/claude/site.html)) | `https://git.bonitos.link/mes0/confs/raw/branch/main/surge/ai/claude.conf` | | `surge/ai/claude.conf` | Claude / Anthropic 域名规则(参考 [ip.net.coffee](https://ip.net.coffee/claude/site.html)) | `https://git.bonitos.link/mes0/confs/raw/branch/main/surge/ai/claude.conf` |
| `mihomo/ai/claude.yaml` | 同上,mihomo rule-provider 格式(behavior: classical) | `https://git.bonitos.link/mes0/confs/raw/branch/main/mihomo/ai/claude.yaml` |
### Surge 引用示例 ### Surge 引用示例
@ -40,6 +43,33 @@ RULE-SET,https://git.bonitos.link/mes0/confs/raw/branch/main/surge/ai/claude.con
> 将末尾的 `PROXY` 替换为你的策略组名称即可。 > 将末尾的 `PROXY` 替换为你的策略组名称即可。
### mihomo 引用示例
```yaml
rule-providers:
claude:
type: http
behavior: classical
format: yaml
url: 'https://git.bonitos.link/mes0/confs/raw/branch/main/mihomo/ai/claude.yaml'
path: ./ruleset/claude.yaml
interval: 86400
rules:
- RULE-SET,claude,PROXY
```
> 将末尾的 `PROXY` 替换为你的策略组名称即可。
紧凑写法(YAML flow style,与上面等价):
```yaml
rule-providers:
claude: {type: http, behavior: classical, format: yaml, interval: 86400, url: "https://git.bonitos.link/mes0/confs/raw/branch/main/mihomo/ai/claude.yaml", path: ./ruleset/claude.yaml}
```
如需让 mihomo 直连下载该规则集,可在对象中追加 `proxy: DIRECT`。
## 维护约定 ## 维护约定
- **不提交敏感信息**:本仓库只存放可公开订阅的规则和通用片段,不放节点信息、机场订阅链接、密钥或 Token。 - **不提交敏感信息**:本仓库只存放可公开订阅的规则和通用片段,不放节点信息、机场订阅链接、密钥或 Token。

View file

24
mihomo/ai/claude.yaml Normal file
View file

@ -0,0 +1,24 @@
# SEE: https://ip.net.coffee/claude/site.html
# mihomo rule-provider,引用时 behavior 需设为 classical
payload:
- 'DOMAIN-SUFFIX,anthropic.com'
- 'DOMAIN-SUFFIX,claude.ai'
- 'DOMAIN-SUFFIX,claude.com'
- 'DOMAIN-SUFFIX,clau.de'
- 'DOMAIN-SUFFIX,claudeusercontent.com'
- 'DOMAIN-SUFFIX,claudemcpclient.com'
- 'DOMAIN-SUFFIX,claudemcpcontent.com'
- 'DOMAIN,anthropic.auth0.com'
- 'DOMAIN-SUFFIX,statsigapi.net'
- 'DOMAIN,anthropic.com.cdn.cloudflare.net'
- 'DOMAIN,servd-anthropic-website.b-cdn.net'
- 'DOMAIN,anthropic-com.ghost.io'
- 'DOMAIN,cdn.usefathom.com'
- 'DOMAIN-SUFFIX,withpersona.com'
- 'DOMAIN-SUFFIX,frompersona.com'
- 'DOMAIN-SUFFIX,sentry.io'
- 'DOMAIN-SUFFIX,intercom.io'
- 'DOMAIN-SUFFIX,intercomcdn.com'
- 'DOMAIN,maps.googleapis.com'
- 'DOMAIN,browser-intake-us5-datadoghq.com'
- 'DOMAIN-KEYWORD,sift'