C
This commit is contained in:
@@ -11,7 +11,7 @@ PUBLIC_PATH=change-me-random-hash-path
|
||||
# 例如:https://sub.example.com
|
||||
PUBLIC_BASE_URL=
|
||||
|
||||
# airport-a / airport-b 都会自动识别:
|
||||
# airport-a / airport-b / airport-c 都会自动识别:
|
||||
# 1. Clash/Mihomo YAML proxies 文件
|
||||
# 2. base64 编码 URI 订阅
|
||||
# 3. 直接明文 URI 订阅
|
||||
@@ -21,3 +21,5 @@ PUBLIC_BASE_URL=
|
||||
AIRPORT_A_URL=
|
||||
# 允许留空;留空时该机场会自动跳过,不参与默认查询
|
||||
AIRPORT_B_URL=
|
||||
# 允许留空;留空时该机场会自动跳过,不参与默认查询
|
||||
AIRPORT_C_URL=
|
||||
|
||||
34
README.md
34
README.md
@@ -7,7 +7,7 @@
|
||||
|
||||
这一版已经补上:
|
||||
|
||||
- 多机场源选择:`?sources=airport-a,airport-b`
|
||||
- 多机场源选择:`?sources=airport-a,airport-b,airport-c`
|
||||
- 单机场或多机场时,**始终取第一个源**的 `Subscription-Userinfo` 返回给客户端
|
||||
- `GET` 和 `HEAD` 都支持
|
||||
- provider 单源输出、merged provider 输出、thin client 输出、bundle 输出
|
||||
@@ -69,7 +69,7 @@ cp .env.example .env
|
||||
|
||||
- `PUBLIC_PATH` 改成足够长的随机字符串
|
||||
- `PUBLIC_BASE_URL` 建议填写你反代后的最终访问地址,例如 `https://sub.example.com`
|
||||
- `AIRPORT_A_URL` / `AIRPORT_B_URL` 都可以直接填订阅地址,项目会自动判断是 YAML 还是 URI 订阅
|
||||
- `AIRPORT_A_URL` / `AIRPORT_B_URL` / `AIRPORT_C_URL` 都可以直接填订阅地址,项目会自动判断是 YAML 还是 URI 订阅
|
||||
- 也可以直接填本地文件路径,例如 `/app/data/sources/airport-b.txt` 或 `file:///app/data/sources/airport-b.txt`
|
||||
- 允许把其中一个留空;留空时这个机场会自动跳过
|
||||
|
||||
@@ -85,15 +85,15 @@ docker compose up -d --build
|
||||
- 单 provider:
|
||||
`https://YOUR_DOMAIN/<PUBLIC_PATH>/providers/airport-a.yaml`
|
||||
- merged provider:
|
||||
`https://YOUR_DOMAIN/<PUBLIC_PATH>/providers/merged.yaml?sources=airport-a,airport-b`
|
||||
`https://YOUR_DOMAIN/<PUBLIC_PATH>/providers/merged.yaml?sources=airport-a,airport-b,airport-c`
|
||||
- Mihomo/OpenClash 薄壳入口:
|
||||
`https://YOUR_DOMAIN/<PUBLIC_PATH>/clients/mihomo.yaml?sources=airport-a,airport-b`
|
||||
`https://YOUR_DOMAIN/<PUBLIC_PATH>/clients/mihomo.yaml?sources=airport-a,airport-b,airport-c`
|
||||
- Stash 薄壳入口:
|
||||
`https://YOUR_DOMAIN/<PUBLIC_PATH>/clients/stash.yaml?sources=airport-a,airport-b`
|
||||
`https://YOUR_DOMAIN/<PUBLIC_PATH>/clients/stash.yaml?sources=airport-a,airport-b,airport-c`
|
||||
- Mihomo/OpenClash bundle:
|
||||
`https://YOUR_DOMAIN/<PUBLIC_PATH>/bundle/mihomo.yaml?sources=airport-a,airport-b`
|
||||
`https://YOUR_DOMAIN/<PUBLIC_PATH>/bundle/mihomo.yaml?sources=airport-a,airport-b,airport-c`
|
||||
- Stash bundle:
|
||||
`https://YOUR_DOMAIN/<PUBLIC_PATH>/bundle/stash.yaml?sources=airport-a,airport-b`
|
||||
`https://YOUR_DOMAIN/<PUBLIC_PATH>/bundle/stash.yaml?sources=airport-a,airport-b,airport-c`
|
||||
|
||||
---
|
||||
|
||||
@@ -111,8 +111,8 @@ HEAD /<PUBLIC_PATH>/providers/{name}.yaml
|
||||
### 2. merged provider
|
||||
|
||||
```text
|
||||
GET /<PUBLIC_PATH>/providers/merged.yaml?sources=airport-a,airport-b
|
||||
HEAD /<PUBLIC_PATH>/providers/merged.yaml?sources=airport-a,airport-b
|
||||
GET /<PUBLIC_PATH>/providers/merged.yaml?sources=airport-a,airport-b,airport-c
|
||||
HEAD /<PUBLIC_PATH>/providers/merged.yaml?sources=airport-a,airport-b,airport-c
|
||||
```
|
||||
|
||||
把多个 provider 合并成一个 `proxies:` 文件返回。响应头只取 `sources` 参数里**第一个源**的配额信息。
|
||||
@@ -120,10 +120,10 @@ HEAD /<PUBLIC_PATH>/providers/merged.yaml?sources=airport-a,airport-b
|
||||
### 3. 薄壳客户端配置
|
||||
|
||||
```text
|
||||
GET /<PUBLIC_PATH>/clients/mihomo.yaml?sources=airport-a,airport-b
|
||||
GET /<PUBLIC_PATH>/clients/stash.yaml?sources=airport-a,airport-b
|
||||
HEAD /<PUBLIC_PATH>/clients/mihomo.yaml?sources=airport-a,airport-b
|
||||
HEAD /<PUBLIC_PATH>/clients/stash.yaml?sources=airport-a,airport-b
|
||||
GET /<PUBLIC_PATH>/clients/mihomo.yaml?sources=airport-a,airport-b,airport-c
|
||||
GET /<PUBLIC_PATH>/clients/stash.yaml?sources=airport-a,airport-b,airport-c
|
||||
HEAD /<PUBLIC_PATH>/clients/mihomo.yaml?sources=airport-a,airport-b,airport-c
|
||||
HEAD /<PUBLIC_PATH>/clients/stash.yaml?sources=airport-a,airport-b,airport-c
|
||||
```
|
||||
|
||||
特点:
|
||||
@@ -136,10 +136,10 @@ HEAD /<PUBLIC_PATH>/clients/stash.yaml?sources=airport-a,airport-b
|
||||
### 4. bundle 单文件配置
|
||||
|
||||
```text
|
||||
GET /<PUBLIC_PATH>/bundle/mihomo.yaml?sources=airport-a,airport-b
|
||||
GET /<PUBLIC_PATH>/bundle/stash.yaml?sources=airport-a,airport-b
|
||||
HEAD /<PUBLIC_PATH>/bundle/mihomo.yaml?sources=airport-a,airport-b
|
||||
HEAD /<PUBLIC_PATH>/bundle/stash.yaml?sources=airport-a,airport-b
|
||||
GET /<PUBLIC_PATH>/bundle/mihomo.yaml?sources=airport-a,airport-b,airport-c
|
||||
GET /<PUBLIC_PATH>/bundle/stash.yaml?sources=airport-a,airport-b,airport-c
|
||||
HEAD /<PUBLIC_PATH>/bundle/mihomo.yaml?sources=airport-a,airport-b,airport-c
|
||||
HEAD /<PUBLIC_PATH>/bundle/stash.yaml?sources=airport-a,airport-b,airport-c
|
||||
```
|
||||
|
||||
特点:
|
||||
|
||||
@@ -21,6 +21,15 @@ sources:
|
||||
include_regex: ""
|
||||
exclude_regex: "流量|重置|到期|续费|官网|离线|套餐"
|
||||
|
||||
airport-c:
|
||||
enabled: true
|
||||
display_name: C
|
||||
kind: auto
|
||||
url: ${AIRPORT_C_URL}
|
||||
prefix: "[C] "
|
||||
include_regex: ""
|
||||
exclude_regex: "流量|重置|到期|续费|官网|离线|套餐"
|
||||
|
||||
regions:
|
||||
hk:
|
||||
name: "🇭🇰 香港节点"
|
||||
|
||||
Reference in New Issue
Block a user