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

- ModelChannel 新增 proxy_url 字段,v48 迁移自动加列
- outbound 新增 OutboundHTTPClientWithProxy,socks5/socks5h/http/https 均支持;
  目标主机名不做本地解析,直接交给代理服务器远端解析,本地开启 TUN/VPN 时仍可用
- 系统代理、Provider 出站、管理员模型测试路径均使用渠道级代理
- 渠道管理表单新增"代理地址"输入框,留空回退全局代理
This commit is contained in:
dxiaom
2026-10-10 00:59:37 +08:00
parent 09f9b8e902
commit 8b0a8054e1
13 changed files with 119 additions and 8 deletions

View File

@@ -11,7 +11,7 @@ import (
"gorm.io/gorm"
)
const CurrentSchemaVersion int64 = 47
const CurrentSchemaVersion int64 = 48
const baselineSchemaChecksum = "sha256:open-ai-canvas-schema-v1-20260830"
const schemaMigrationAppliedAtIndexChecksum = "sha256:schema-migrations-applied-at-index-v2-20260830"
@@ -151,6 +151,12 @@ var schemaMigrations = []migration{
}},
{version: 46, name: "skill_curation", checksum: "sha256:skill-curation-v46-20261005", apply: migrateSkillCuration},
{version: 47, name: "skill_curation_roots", checksum: "sha256:skill-curation-roots-v47-20261005", apply: migrateSkillCurationRoots},
{version: 48, name: "channel_proxy_url", checksum: "sha256:channel-proxy-url-v48-20261009", apply: func(tx *gorm.DB) error {
if !tx.Migrator().HasColumn(&model.ModelChannel{}, "ProxyURL") {
return tx.Migrator().AddColumn(&model.ModelChannel{}, "ProxyURL")
}
return nil
}},
}
func migratePrefixedIDSequenceReconcile(tx *gorm.DB) error {