增加了代理平台和日志
This commit is contained in:
+29
-2
@@ -167,12 +167,39 @@ class ProxyConfigOut(BaseModel):
|
||||
http: str = ""
|
||||
https: str = ""
|
||||
whitelist_enabled: bool = False
|
||||
whitelist_platform: str = "xiequ"
|
||||
whitelist_credentials: Optional[dict] = None
|
||||
# 旧字段保留(向后兼容)
|
||||
whitelist_uid: str = ""
|
||||
whitelist_ukey: str = ""
|
||||
|
||||
|
||||
class ProxyConfigUpdate(ProxyConfigOut):
|
||||
pass
|
||||
class ProxyConfigUpdate(BaseModel):
|
||||
enabled: Optional[bool] = None
|
||||
api_url: Optional[str] = None
|
||||
http: Optional[str] = None
|
||||
https: Optional[str] = None
|
||||
whitelist_enabled: Optional[bool] = None
|
||||
whitelist_platform: Optional[str] = "xiequ"
|
||||
whitelist_credentials: Optional[dict] = None
|
||||
# 旧字段保留(向后兼容)
|
||||
whitelist_uid: Optional[str] = None
|
||||
whitelist_ukey: Optional[str] = None
|
||||
|
||||
|
||||
# ---- 代理平台元信息 ----
|
||||
class PlatformFieldDef(BaseModel):
|
||||
"""平台凭据字段定义。"""
|
||||
key: str
|
||||
label: str
|
||||
placeholder: str = ""
|
||||
|
||||
|
||||
class PlatformInfo(BaseModel):
|
||||
"""平台元信息。"""
|
||||
name: str
|
||||
label: str
|
||||
credential_fields: list[PlatformFieldDef]
|
||||
|
||||
|
||||
# ---- 通用 ----
|
||||
|
||||
Reference in New Issue
Block a user