refactor(claude-code): 移除 TLS 指纹模拟配置,简化上下文构建逻辑

移除 enable_tls_fingerprint 配置项、TLS_PROFILE_CLAUDE_CODE 常量及
resolve_claude_code_tls_profile 函数,TLS profile 改为仅由 fingerprint
的 impersonate 字段决定,简化 build_and_set_claude_code_request_context
返回值为单一 context 对象。
This commit is contained in:
fawney19
2026-03-15 00:23:19 +08:00
parent 693e37d2df
commit 920a383136
6 changed files with 12 additions and 39 deletions

View File

@@ -308,9 +308,6 @@ class ClaudeCodeAdvancedConfig(BaseModel):
session_idle_timeout_minutes: int | None = Field(
None, ge=1, le=1440, description="会话空闲超时(分钟)"
)
enable_tls_fingerprint: bool = Field(
False, description="是否启用 TLS 指纹模拟(模拟 Node.js/Claude Code 客户端)"
)
session_id_masking_enabled: bool = Field(
False, description="是否启用会话 ID 伪装(固定 metadata.user_id 中 session 片段)"
)