79 lines
2.7 KiB
Markdown
79 lines
2.7 KiB
Markdown
# confs
|
||
|
||
个人自用的代理规则集与配置片段库,供客户端通过 raw 链接直接订阅。当前以 Surge 为主,后续按需扩展 mihomo 配置片段。
|
||
|
||
## 目录结构
|
||
|
||
```text
|
||
.
|
||
├── LICENSE
|
||
├── README.md
|
||
├── mihomo/
|
||
│ └── ai/
|
||
│ └── claude.yaml # Claude / Anthropic 域名规则集(mihomo rule-provider)
|
||
└── surge/
|
||
└── ai/
|
||
└── claude.conf # Claude / Anthropic 相关域名规则集
|
||
```
|
||
|
||
- `surge/`:Surge 规则集、模块(`.sgmodule`)及配置片段
|
||
- `mihomo/`:mihomo 配置片段或规则集
|
||
|
||
## 订阅与使用
|
||
|
||
所有文件均通过本仓库 `main` 分支的 raw 链接直接订阅:
|
||
|
||
```text
|
||
https://git.bonitos.link/mes0/confs/raw/branch/main/<文件路径>
|
||
```
|
||
|
||
### 现有规则
|
||
|
||
| 文件 | 说明 | 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` |
|
||
| `mihomo/ai/claude.yaml` | 同上,mihomo rule-provider 格式(behavior: classical) | `https://git.bonitos.link/mes0/confs/raw/branch/main/mihomo/ai/claude.yaml` |
|
||
|
||
### Surge 引用示例
|
||
|
||
```ini
|
||
[Rule]
|
||
RULE-SET,https://git.bonitos.link/mes0/confs/raw/branch/main/surge/ai/claude.conf,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。
|
||
- **本地私有文件**:调试或带私人信息的本地配置使用 `*.local.*`、`*.private.*`、`*.secret.*` 命名,或放入 `local/` / `private/` 目录,`.gitignore` 已默认忽略。
|
||
- **许可**:见 [LICENSE](LICENSE)(MIT)。
|
||
- **文件格式**:统一 UTF-8 编码和 LF 换行(已通过 `.editorconfig` 与 `.gitattributes` 约束),避免客户端拉取 raw 规则时因换行符异常导致解析问题。
|