feat: 品牌重命名 Sub2API -> TianShuAPI (基于官方 v0.1.56)
Some checks failed
CI / test (push) Has been cancelled
CI / golangci-lint (push) Has been cancelled
Security Scan / backend-security (push) Has been cancelled
Security Scan / frontend-security (push) Has been cancelled

基于官方最新代码 upstream/main (dae0d53)

新功能:
- 添加 5小时窗口费用控制和会话数量限制
- Caddy 静态资源长期缓存配置
- 前端性能优化(路由预加载、移除 Google Fonts 改用系统字体)
- 修复 api_contract_test 缺少 SessionLimitCache 参数问题

品牌修改:
- 仅修改品牌显示名称为 TianShuAPI
- 保持所有功能完整
- 恢复 docker-compose.1panel.yml 配置文件

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
huangzhenpc
2026-01-17 01:52:16 +08:00
parent dae0d5321f
commit 868f75a792
28 changed files with 398 additions and 60 deletions

View File

@@ -272,14 +272,14 @@ func TestAPIContracts(t *testing.T) {
service.SettingKeySMTPUsername: "user",
service.SettingKeySMTPPassword: "secret",
service.SettingKeySMTPFrom: "no-reply@example.com",
service.SettingKeySMTPFromName: "Sub2API",
service.SettingKeySMTPFromName: "TianShuAPI",
service.SettingKeySMTPUseTLS: "true",
service.SettingKeyTurnstileEnabled: "true",
service.SettingKeyTurnstileSiteKey: "site-key",
service.SettingKeyTurnstileSecretKey: "secret-key",
service.SettingKeySiteName: "Sub2API",
service.SettingKeySiteName: "TianShuAPI",
service.SettingKeySiteLogo: "",
service.SettingKeySiteSubtitle: "Subtitle",
service.SettingKeyAPIBaseURL: "https://api.example.com",
@@ -309,7 +309,7 @@ func TestAPIContracts(t *testing.T) {
"smtp_username": "user",
"smtp_password_configured": true,
"smtp_from_email": "no-reply@example.com",
"smtp_from_name": "Sub2API",
"smtp_from_name": "TianShuAPI",
"smtp_use_tls": true,
"turnstile_enabled": true,
"turnstile_site_key": "site-key",
@@ -322,7 +322,7 @@ func TestAPIContracts(t *testing.T) {
"ops_realtime_monitoring_enabled": true,
"ops_query_mode_default": "auto",
"ops_metrics_interval_seconds": 60,
"site_name": "Sub2API",
"site_name": "TianShuAPI",
"site_logo": "",
"site_subtitle": "Subtitle",
"api_base_url": "https://api.example.com",