Skip to content

[upstream-port][evaluate] 渠道级「跳过上游 TLS 校验」开关 #821

Closed as not planned

Description

@LIghtJUNction

开发主线交接(2026-10-12)

开发默认主线现为 wip/rust-core-go-extensions;旧单体 main 与 traditional 冻结于 3948a0a1ee1cefdd016a7aa45a11851545bb4b85。分支交接不是发布、部署或验收通过。原问题、源码基线、测试与未完成项保留;旧单体路径仅作历史证据,后续先在微服务源码重新确认并按职责移植,不回灌旧数据库/权限/资金实现。

主线/S11 跟踪:#895。Extore 商品同步:#894,未验收,禁止部署,尤其禁止合并/推送 Extore main。

需要 owner 决策:安全敏感,并且包含前端(前端部分必须由 Claude Opus 5.5 完成)。

上游提交

  • c6741c36 feat(channel): add a per-channel switch to skip upstream TLS verification(16 个后端文件、13 个前端文件)

改了什么,对 LMM 的意义

上游原来只有全局的 insecure TLS 开关,现在改为可以按渠道跳过证书校验(自签名的私有上游)。fork 已通过 #617 移植 feefe09f(隔离 TLS config),在此基础上做渠道级开关的冲突较小。

fork 中的位置

  • apps/api-go/relaykit/dto/channel_settings.go、apps/api-go/service/http_client.go、service/http_transport_policy.go、relay/channel/api_request.go、controller/channel-billing.go、controller/channel_upstream_update.go、controller/video_proxy.go、service/task_polling.go、relay/channel/gemini/relay-gemini.go、relay/channel/vertex/service_account.go、relay/mjproxy_handler.go
  • 前端:apps/web/src/features/channels/(drawer、lib/channel-form.ts、types.ts)
  • 上游的 relay/channel/task/jsplugin/adaptor.go 部分不移植(ADR)

冲突与风险

  • 会降低安全性:建议只允许 root 开启,记录审计日志,默认关闭,UI 明确警示;protected_fetch_client 的 SSRF 防护不能被绕过。
  • Rust 侧需要同一字段的 parity,或者明确拒绝。

测试

按 FORK.md 需要跑:

  • cd apps/api-go && go test ./... && go vet ./...
  • cd apps/api-go/relaykit && go test ./... && go vet ./...
  • cd apps/api-go && CGO_ENABLED=0 go build ./...(生产构建)
  • 钱包/计费 race 测试:go test -race ./model/... ./service/... ./controller/...(至少覆盖改动包)
  • 迁移 dry-run/rollback(本 issue 若不涉及 schema 则注明跳过原因)
  • provider-path 检查:对涉及的 Claude / Gemini / OpenAI Chat / Responses 路径各跑一次转换 golden 测试或实际请求
  • cd apps/web 跑 typecheck、lint、单测和生产构建(just lint / just test / just build 或 apps/web 的 package scripts)
  • 桌面和移动宽度各做一次视觉检查;保留 NOTICE 归属和上游/LIghtJUNction 文件头规则
  • 前端工作必须由 Claude Opus 5.5 完成。

工作量

中:后端约 1 天,前端约 0.5 天。


由 bot 根据 upstream 两个月审查生成(完整表:/workspace/apilmm/upstream_review_2mo.md,fork main b4600b4c,upstream head 42e694eb)。只是 issue,未写代码、未开 PR。

Activity

  1. added
    botOpened by the maintenance bot
    upstream-portQuantumNous/new-api upstream commit port candidate
    on Oct 11, 2026
  2. LIghtJUNction commented on Nov 14, 2026

    @LIghtJUNction
    MemberAuthor

    本 Issue 已合并到 #989 统一跟踪:#989

    本次关闭仅用于合并去重,不代表问题已修复、已验收或放弃处理。原始正文和讨论仍保留在这里,后续实现与验收请使用新 Issue。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    botOpened by the maintenance botupstream-portQuantumNous/new-api upstream commit port candidate

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions