Skip to content

Commit 876241a

Browse files
committed
Use clash.meta for subscription downloads
1 parent 998d7c8 commit 876241a

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

DESIGN.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2301,7 +2301,9 @@ Resin 支持通过 API (`PATCH /system/config`) 动态调整大部分全局运
23012301
以下所有配置项支持热更新。
23022302

23032303
#### 基础设置
2304-
资源下载(订阅/GeoIP)HTTP 请求固定使用中性 User-Agent:`Go-http-client/1.1`
2304+
资源下载(订阅/GeoIP)HTTP 请求固定携带 User-Agent。默认值为 `clash.meta`
2305+
2306+
不使用 `sing-box` 作为默认 User-Agent 的原因是:sing-box 版本更新较快,部分订阅源返回的 sing-box 专用订阅格式并不一定兼容最新版 sing-box,使用 `clash.meta` 作为默认值更稳定。
23052307

23062308
#### 请求日志设置
23072309
* `RequestLogEnabled`: 是否开启请求日志记录。此开关实时生效。默认 True。

cmd/resin/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ type topologyRuntime struct {
4343
singboxBuilder *outbound.SingboxBuilder // for Close on shutdown
4444
}
4545

46-
const downloadUserAgent = "Go-http-client/1.1"
46+
const downloadUserAgent = "clash.meta"
4747

4848
func main() {
4949
if err := run(); err != nil {

0 commit comments

Comments
 (0)