diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..b173581 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,14 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true + +[*.{yml,yaml}] +indent_style = space +indent_size = 2 + +[*.md] +trim_trailing_whitespace = false diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..b70359f --- /dev/null +++ b/.gitattributes @@ -0,0 +1,7 @@ +* text=auto eol=lf +*.conf text eol=lf +*.list text eol=lf +*.sgmodule text eol=lf +*.yaml text eol=lf +*.yml text eol=lf +*.md text eol=lf diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..087225d --- /dev/null +++ b/.gitignore @@ -0,0 +1,32 @@ +# macOS +.DS_Store +._* +.AppleDouble +.LSOverride + +# Editors +.vscode/ +.idea/ +*.swp +*.swo +*~ + +# Local / private configs (never commit nodes, tokens, or subscription URLs) +*.local +*.local.* +*.private +*.private.* +*.secret +*.secret.* +.env +.env.* +local/ +private/ +secrets/ + +# Proxy runtime, cache, and backup artifacts +*.mmdb +*.dat +*.log +*.bak +cache.db diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..01654fa --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 qlin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index e69de29..16bcc6a 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,48 @@ +# confs + +个人自用的代理规则集与配置片段库,供客户端通过 raw 链接直接订阅。当前以 Surge 为主,后续按需扩展 mihomo 配置片段。 + +## 目录结构 + +```text +. +├── LICENSE +├── README.md +├── mihomo/ # mihomo 配置片段与规则集(暂为空) +└── surge/ + └── ai/ + └── claude.conf # Claude / Anthropic 相关域名规则集 +``` + +- `surge/`:Surge 规则集、模块(`.sgmodule`)及配置片段 +- `mihomo/`:mihomo 配置片段或规则集,目前为空目录(`.gitkeep` 占位) + +## 订阅与使用 + +所有文件均通过本仓库 `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` | + +### Surge 引用示例 + +```ini +[Rule] +RULE-SET,https://git.bonitos.link/mes0/confs/raw/branch/main/surge/ai/claude.conf,PROXY +``` + +> 将末尾的 `PROXY` 替换为你的策略组名称即可。 + +## 维护约定 + +- **不提交敏感信息**:本仓库只存放可公开订阅的规则和通用片段,不放节点信息、机场订阅链接、密钥或 Token。 +- **本地私有文件**:调试或带私人信息的本地配置使用 `*.local.*`、`*.private.*`、`*.secret.*` 命名,或放入 `local/` / `private/` 目录,`.gitignore` 已默认忽略。 +- **许可**:见 [LICENSE](LICENSE)(MIT)。 +- **文件格式**:统一 UTF-8 编码和 LF 换行(已通过 `.editorconfig` 与 `.gitattributes` 约束),避免客户端拉取 raw 规则时因换行符异常导致解析问题。 diff --git a/mihomo/.gitkeep b/mihomo/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/ai/claude.conf b/surge/ai/claude.conf similarity index 100% rename from ai/claude.conf rename to surge/ai/claude.conf