mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-09-24 16:05:44 +08:00
Squash-merge feat/fingerprint-mimic into release/custom-0.1.114. Functional changes: - TLS ClientHello mimicry: 17→52 cipher suites, ALPN http/1.1 only, X25519MLKEM768, JA3/JA4 aligned with official CLI baseline - HTTP layer: User-Agent 2.1.112 sdk-cli, 3 new anthropic-beta tokens, Stainless headers synced - Sidecar traffic: usage poll + count_tokens injection + startup probe (three fire-and-forget channels with jittered intervals) - Sticky session UUID: per-account metadata.user_id reuse via Redis, WithSessionHash propagation through gateway - 429 no-switch: short-circuit on rate-limit instead of cross-account fail-over - Admin UI: per-account "randomize fingerprint" button + ConfirmDialog + i18n (zh/en, 9 keys) Engineering hardening (fixes carried over from hai/snapshot): - safe.Go/Run package: panic-recovering goroutine helper with slog - redis.Nil treated as cache miss in identity cache - SOCKS5 dialer uses ContextDialer for ctx cancellation propagation - Token refresh selects on stopCh during retry backoff - Sidecar goroutines wrapped with safe.Go - .gitattributes forces LF for *.json (fixes baseline file CRLF drift) Refactoring (zero behavior change): - sidecar probe constants centralized - identity_service rewrite preflight extracted into helpers - capture_fingerprint tool split from 894 lines into 9 files - gofmt sweep on all hai-imported files Tests: - safe package: panic recovery + attrs propagation - tlsfingerprint: SOCKS5 dialer + capture parity - identity sticky-session preflight paths (early-return + cache-hit) - sidecar probe: jittered interval + dry-run - token refresh: graceful shutdown during backoff Beta-validated on 0.1.112.21 (commit 565da163 of feat/fingerprint-mimic). Bumps VERSION 0.1.112.20 -> 0.1.114.1.
26 lines
455 B
Plaintext
26 lines
455 B
Plaintext
# 确保所有 SQL 迁移文件使用 LF 换行符
|
||
backend/migrations/*.sql text eol=lf
|
||
|
||
# Go 源代码文件
|
||
*.go text eol=lf
|
||
|
||
# 前端 源代码文件
|
||
*.ts text eol=lf
|
||
*.tsx text eol=lf
|
||
*.js text eol=lf
|
||
*.jsx text eol=lf
|
||
*.vue text eol=lf
|
||
|
||
# Shell 脚本
|
||
*.sh text eol=lf
|
||
|
||
# YAML/YML 配置文件
|
||
*.yaml text eol=lf
|
||
*.yml text eol=lf
|
||
|
||
# JSON 配置/数据文件(含指纹基线 baseline JSON)
|
||
*.json text eol=lf
|
||
|
||
# Dockerfile
|
||
Dockerfile text eol=lf
|