refactor(routing): 暴露 system_locked_domains + 服务端 follow-up 清理(FK/Validate/dedup/exclude单源/共用Store/Builtin保留)

This commit is contained in:
wangjia
2026-07-29 06:38:52 +08:00
parent 52912268d0
commit 3159dd75c1
11 changed files with 285 additions and 36 deletions
+30 -4
View File
@@ -244,10 +244,18 @@ components:
description: 国内域名/IP 直连
lan_direct:
type: boolean
description: 局域网直连
readOnly: true
description: >-
reserved/always-on:局域网直连由系统层恒渲染(route_exclude_address +
固定 LAN 直连规则),渲染器不读此开关,当前始终生效;字段保留供未来扩展
per-user 关闭,目前无实际效果。
private_via_tunnel:
type: boolean
description: 私有服务域名强制走隧道(家庭内网穿透场景)
readOnly: true
description: >-
reserved/always-on:配置了 PANGOLIN_PRIVATE_SPLIT_DOMAINS 时,这些私有
服务域名恒强制走隧道,渲染器不读此开关,当前始终生效;字段保留供未来扩展
per-user 关闭,目前无实际效果。
RoutingProfile:
type: object
@@ -267,6 +275,24 @@ components:
type: string
enum: [proxy, direct]
RoutingProfileResponse:
description: GET /me/routing 响应体:档案字段 + 只读的系统强制域名清单
allOf:
- $ref: '#/components/schemas/RoutingProfile'
- type: object
required: [system_locked_domains]
properties:
system_locked_domains:
type: array
readOnly: true
items:
type: string
description: >-
系统强制走隧道的私有服务域名(PANGOLIN_PRIVATE_SPLIT_DOMAINS)。
用户对这些域名的自定义规则会静默失效;仅供客户端提示用户,不可写入
(POST 请求体中出现该字段会被忽略,不会持久化)。
example: [nas.example.com]
RoutingValidationError:
type: object
required: [code, message_zh, message_en, errors]
@@ -500,11 +526,11 @@ paths:
summary: 获取当前用户的分流配置(可配置分流;未自定义时返回默认档案)
responses:
'200':
description: 分流档案
description: 分流档案(含只读 system_locked_domains
content:
application/json:
schema:
$ref: '#/components/schemas/RoutingProfile'
$ref: '#/components/schemas/RoutingProfileResponse'
'401':
description: 未认证
content: