fix(admin): 渠道代理 - 校验代理地址并拒绝无效出口

PR: #717
PR 标题: feat(admin): 渠道管理 - 模型供应商支持渠道级 SOCKS5/HTTP 代理

校验渠道级代理地址并在历史无效配置下拒绝出站请求,保留空代理回退全局代理的行为,同时补充管理端和出站层回归测试。

Co-authored-by: ddcat666 <26564566+ddcat666@users.noreply.github.com>
This commit is contained in:
dxiaomandddcat666 authored and ddcat666 committed 2026-10-10 05:44:48 +08:00
1 parent 524d2910ca
commit d13e1dcaa3
9 files changed
+88 -9

No files matched your search

+3 -3
View File
@@ -20,10 +20,10 @@ type ModelChannel struct {
SecretKey string `json:"-"`
APIFormat string `json:"apiFormat" gorm:"size:24"`
ConcurrencyLimit int `json:"concurrencyLimit"`
// ProxyURL 是渠道级出站代理地址,支持 socks5://、http://、https://。
// ProxyURL 是渠道级出站代理地址,支持 socks5://、socks5h://、http://、https://。
// 留空时使用全局环境变量代理。
ProxyURL string `json:"proxyUrl" gorm:"size:512"`
ModelsJSON string `json:"modelsJson" gorm:"type:text"`
ProxyURL string `json:"proxyUrl" gorm:"size:512"`
ModelsJSON string `json:"modelsJson" gorm:"type:text"`
// RetiredModelsJSON 记录已被一个模型家族吸收的上游 SKU,防止目录拉取时重新创建重复记录。
RetiredModelsJSON string `json:"-" gorm:"type:text"`
HeadersJSON string `json:"-" gorm:"type:text"`