fix(worker): 香港站点直连 Gemini 官方平台

官方 Gemini 平台配置的共享 HTTP Proxy 会拒绝香港出口的 CONNECT 请求,导致香港 Worker 的真实 VEO 与图片任务进入 upstream_submission_unknown。

新增仅按平台 UUID 生效的代理直连白名单,并只在香港 Worker 为官方 Gemini 平台启用;宁波与其他平台继续使用原代理策略。

验证:API 全量 go test、代理路由单测、bash -n、ShellCheck、cluster release helper、manual release 与差异检查均通过。
This commit is contained in:
2026-08-04 21:40:32 +08:00
parent 60d16b11ba
commit 4b639df30a
5 changed files with 61 additions and 0 deletions
+2
View File
@@ -55,6 +55,7 @@ type Config struct {
CORSAllowedOrigin string
GlobalHTTPProxy string
GlobalHTTPProxySource string
PlatformProxyBypassIDs string
LogLevel slog.Level
BillingEngineMode string
ProcessRole string
@@ -155,6 +156,7 @@ func Load() Config {
CORSAllowedOrigin: env("CORS_ALLOWED_ORIGIN", "http://localhost:5178,http://127.0.0.1:5178"),
GlobalHTTPProxy: globalProxy.HTTPProxy,
GlobalHTTPProxySource: globalProxy.Source,
PlatformProxyBypassIDs: env("AI_GATEWAY_PLATFORM_PROXY_BYPASS_IDS", ""),
LogLevel: logLevel(env("LOG_LEVEL", "info")),
BillingEngineMode: strings.ToLower(env("BILLING_ENGINE_MODE", "observe")),
ProcessRole: strings.ToLower(strings.TrimSpace(env("AI_GATEWAY_PROCESS_ROLE", "all"))),