mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-11-02 08:31:35 +00:00
feat: 抹除 Anthropic OAuth 请求中客户端 dateline 隐写指纹
对 /v1/messages 转发到 Anthropic OAuth/setup-token 账号的请求做 dateline 归一化,将 system prompt 与 <system-reminder> 块中 "Today's date is …" 语句里的 4 种撇号变体与 "/" 日期分隔符还原为 ASCII 撇号 + "-",抹除某些 客户端在检测到非官方 base URL 时注入的 3 bit 隐写指纹。API Key 账号不受 影响。新增系统设置开关 enable_client_dateline_normalization,默认开启。
This commit is contained in:
1 parent
c1335bae12
commit
59e9356c51
15 files changed
+782
-2
No files matched your search
@@ -561,6 +561,7 @@ export interface SystemSettings {
|
||||
claude_oauth_system_prompt_blocks: string;
|
||||
enable_anthropic_cache_ttl_1h_injection: boolean;
|
||||
rewrite_message_cache_control: boolean;
|
||||
enable_client_dateline_normalization: boolean;
|
||||
antigravity_user_agent_version: string;
|
||||
openai_codex_user_agent: string;
|
||||
// codex_cli_only 加固
|
||||
@@ -811,6 +812,7 @@ export interface UpdateSettingsRequest {
|
||||
claude_oauth_system_prompt_blocks?: string;
|
||||
enable_anthropic_cache_ttl_1h_injection?: boolean;
|
||||
rewrite_message_cache_control?: boolean;
|
||||
enable_client_dateline_normalization?: boolean;
|
||||
antigravity_user_agent_version?: string;
|
||||
openai_codex_user_agent?: string;
|
||||
// codex_cli_only 加固
|
||||
|
||||
Reference in new issue
Block a user