From da1938b19fcf8704dbb7434dec769f274a57ed39 Mon Sep 17 00:00:00 2001 From: huangzhenpc Date: Tue, 3 Feb 2026 20:35:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E4=B8=8A=E6=B8=B8v0.1.66?= =?UTF-8?q?=E5=B9=B6=E9=87=8D=E6=96=B0=E5=BA=94=E7=94=A8=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 上游更新内容: - 邀请码注册功能 - 公告系统(Header铃铛通知) - Gemini 长上下文双倍计费 - Antigravity scope 级别限流 - Redis TLS 支持 - 大量 Claude OAuth 兼容性修复 自定义配置: - 品牌化:Sub2API → StarFireAPI - 移除所有 GitHub 链接,改为官网 anthropic.edu.pl - 移除版本更新日志的 GitHub 跳转 - docker-compose.yml: starfireapi镜像、端口6580、外部Redis - .env.example: 外部Redis配置 Co-Authored-By: Claude Opus 4.5 --- deploy/docker-compose.yml | 18 ++++--- frontend/index.html | 2 +- .../src/components/common/VersionBadge.vue | 51 ++----------------- frontend/src/components/layout/AppHeader.vue | 8 +-- frontend/src/components/layout/AuthLayout.vue | 4 +- frontend/src/i18n/locales/en.ts | 22 ++++---- frontend/src/i18n/locales/zh.ts | 22 ++++---- frontend/src/views/HomeView.vue | 8 +-- frontend/src/views/auth/RegisterView.vue | 4 +- 9 files changed, 48 insertions(+), 91 deletions(-) diff --git a/deploy/docker-compose.yml b/deploy/docker-compose.yml index 033731ac..c3c03fa6 100644 --- a/deploy/docker-compose.yml +++ b/deploy/docker-compose.yml @@ -16,7 +16,7 @@ services: # Sub2API Application # =========================================================================== sub2api: - image: weishaw/sub2api:latest + image: starfireapi:latest container_name: sub2api restart: unless-stopped ulimits: @@ -24,7 +24,7 @@ services: soft: 100000 hard: 100000 ports: - - "${BIND_HOST:-0.0.0.0}:${SERVER_PORT:-8080}:8080" + - "${BIND_HOST:-0.0.0.0}:${SERVER_PORT:-6580}:8080" volumes: # Data persistence (config.yaml will be auto-generated here) - sub2api_data:/app/data @@ -58,9 +58,9 @@ services: # ======================================================================= # Redis Configuration # ======================================================================= - - REDIS_HOST=redis - - REDIS_PORT=6379 - - REDIS_PASSWORD=${REDIS_PASSWORD:-} + - REDIS_HOST=${REDIS_HOST:-172.18.0.2} + - REDIS_PORT=${REDIS_PORT:-6379} + - REDIS_PASSWORD=${REDIS_PASSWORD:-redis_JCHeKT} - REDIS_DB=${REDIS_DB:-0} - REDIS_ENABLE_TLS=${REDIS_ENABLE_TLS:-false} @@ -130,8 +130,6 @@ services: depends_on: postgres: condition: service_healthy - redis: - condition: service_healthy networks: - sub2api-network healthcheck: @@ -171,9 +169,13 @@ services: # 如需调试,可临时添加:ports: ["127.0.0.1:5433:5432"] # =========================================================================== - # Redis Cache + # Redis Cache (DISABLED - Using external Redis at 172.18.0.2:6379) # =========================================================================== + # Built-in Redis is available but not used by default + # The application connects to external Redis at 172.18.0.2:6379 redis: + profiles: + - disabled image: redis:8-alpine container_name: sub2api-redis restart: unless-stopped diff --git a/frontend/index.html b/frontend/index.html index 3180a5fb..ce54c687 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -4,7 +4,7 @@ - Sub2API - AI API Gateway + StarFireAPI - AI API Gateway
diff --git a/frontend/src/components/common/VersionBadge.vue b/frontend/src/components/common/VersionBadge.vue index 57de9c6c..a1a83267 100644 --- a/frontend/src/components/common/VersionBadge.vue +++ b/frontend/src/components/common/VersionBadge.vue @@ -226,14 +226,10 @@ - +
{{ updating ? t('version.updating') : t('version.updateNow') }} - - - - {{ t('version.viewChangelog') }} - -
- - - - - - {{ t('version.viewRelease') }} - + diff --git a/frontend/src/components/layout/AppHeader.vue b/frontend/src/components/layout/AppHeader.vue index 6b5849c0..2cce9d9d 100644 --- a/frontend/src/components/layout/AppHeader.vue +++ b/frontend/src/components/layout/AppHeader.vue @@ -123,18 +123,14 @@ - + {{ t('nav.github') }} diff --git a/frontend/src/components/layout/AuthLayout.vue b/frontend/src/components/layout/AuthLayout.vue index 3cfc1d4d..9df64056 100644 --- a/frontend/src/components/layout/AuthLayout.vue +++ b/frontend/src/components/layout/AuthLayout.vue @@ -65,7 +65,7 @@ import { ref, computed, onMounted } from 'vue' import { getPublicSettings } from '@/api/auth' import { sanitizeUrl } from '@/utils/url' -const siteName = ref('Sub2API') +const siteName = ref('StarFireAPI') const siteLogo = ref('') const siteSubtitle = ref('Subscription to API Conversion Platform') @@ -74,7 +74,7 @@ const currentYear = computed(() => new Date().getFullYear()) onMounted(async () => { try { const settings = await getPublicSettings() - siteName.value = settings.site_name || 'Sub2API' + siteName.value = settings.site_name || 'StarFireAPI' siteLogo.value = sanitizeUrl(settings.site_logo || '', { allowRelative: true }) siteSubtitle.value = settings.site_subtitle || 'Subscription to API Conversion Platform' } catch (error) { diff --git a/frontend/src/i18n/locales/en.ts b/frontend/src/i18n/locales/en.ts index abe2ea52..e3651200 100644 --- a/frontend/src/i18n/locales/en.ts +++ b/frontend/src/i18n/locales/en.ts @@ -1,7 +1,7 @@ export default { // Home Page home: { - viewOnGithub: 'View on GitHub', + viewOnGithub: 'Official Site', viewDocs: 'View Documentation', docs: 'Docs', switchToLight: 'Switch to Light Mode', @@ -43,8 +43,8 @@ export default { // Setup Wizard setup: { - title: 'Sub2API Setup', - description: 'Configure your Sub2API instance', + title: 'StarFireAPI Setup', + description: 'Configure your StarFireAPI instance', database: { title: 'Database Configuration', description: 'Connect to your PostgreSQL database', @@ -2933,7 +2933,7 @@ export default { secretKeyConfiguredHint: 'Secret key configured. Leave empty to keep the current value.' }, linuxdo: { title: 'LinuxDo Connect Login', - description: 'Configure LinuxDo Connect OAuth for Sub2API end-user login', + description: 'Configure LinuxDo Connect OAuth for StarFireAPI end-user login', enable: 'Enable LinuxDo Login', enableHint: 'Show LinuxDo login on the login/register pages', clientId: 'Client ID', @@ -2963,7 +2963,7 @@ export default { title: 'Site Settings', description: 'Customize site branding', siteName: 'Site Name', - siteNamePlaceholder: 'Sub2API', + siteNamePlaceholder: 'StarFireAPI', siteNameHint: 'Displayed in emails and page titles', siteSubtitle: 'Site Subtitle', siteSubtitlePlaceholder: 'Subscription to API Conversion Platform', @@ -3022,7 +3022,7 @@ export default { fromEmail: 'From Email', fromEmailPlaceholder: "noreply{'@'}example.com", fromName: 'From Name', - fromNamePlaceholder: 'Sub2API', + fromNamePlaceholder: 'StarFireAPI', useTls: 'Use TLS', useTlsHint: 'Enable TLS encryption for SMTP connection' }, @@ -3227,14 +3227,14 @@ export default { // Admin tour steps admin: { welcome: { - title: '👋 Welcome to Sub2API', - description: '

Sub2API is a powerful AI service gateway platform that helps you easily manage and distribute AI services.

🎯 Core Features:

  • 📦 Group Management - Create service tiers (VIP, Free Trial, etc.)
  • 🔗 Account Pool - Connect multiple upstream AI service accounts
  • 🔑 Key Distribution - Generate independent API Keys for users
  • 💰 Billing Control - Flexible rate and quota management

Let\'s complete the initial setup in 3 minutes →

', + title: '👋 Welcome to StarFireAPI', + description: '

StarFireAPI is a powerful AI service gateway platform that helps you easily manage and distribute AI services.

🎯 Core Features:

  • 📦 Group Management - Create service tiers (VIP, Free Trial, etc.)
  • 🔗 Account Pool - Connect multiple upstream AI service accounts
  • 🔑 Key Distribution - Generate independent API Keys for users
  • 💰 Billing Control - Flexible rate and quota management

Let\'s complete the initial setup in 3 minutes →

', nextBtn: 'Start Setup 🚀', prevBtn: 'Skip' }, groupManage: { title: '📦 Step 1: Group Management', - description: '

What is a Group?

Groups are the core concept of Sub2API, like a "service package":

  • 🎯 Each group can contain multiple upstream accounts
  • 💰 Each group has independent billing multiplier
  • 👥 Can be set as public or exclusive

💡 Example: You can create "VIP Premium" (high rate) and "Free Trial" (low rate) groups

👉 Click "Group Management" on the left sidebar

' + description: '

What is a Group?

Groups are the core concept of StarFireAPI, like a "service package":

  • 🎯 Each group can contain multiple upstream accounts
  • 💰 Each group has independent billing multiplier
  • 👥 Can be set as public or exclusive

💡 Example: You can create "VIP Premium" (high rate) and "Free Trial" (low rate) groups

👉 Click "Group Management" on the left sidebar

' }, createGroup: { title: '➕ Create New Group', @@ -3327,8 +3327,8 @@ export default { // User tour steps user: { welcome: { - title: '👋 Welcome to Sub2API', - description: '

Hello! Welcome to the Sub2API AI service platform.

🎯 Quick Start:

  • 🔑 Create API Key
  • 📋 Copy key to your application
  • 🚀 Start using AI services

Just 1 minute, let\'s get started →

', + title: '👋 Welcome to StarFireAPI', + description: '

Hello! Welcome to the StarFireAPI AI service platform.

🎯 Quick Start:

  • 🔑 Create API Key
  • 📋 Copy key to your application
  • 🚀 Start using AI services

Just 1 minute, let\'s get started →

', nextBtn: 'Start 🚀', prevBtn: 'Skip' }, diff --git a/frontend/src/i18n/locales/zh.ts b/frontend/src/i18n/locales/zh.ts index dd0ae0fb..4f406aef 100644 --- a/frontend/src/i18n/locales/zh.ts +++ b/frontend/src/i18n/locales/zh.ts @@ -1,7 +1,7 @@ export default { // Home Page home: { - viewOnGithub: '在 GitHub 上查看', + viewOnGithub: '访问官网', viewDocs: '查看文档', docs: '文档', switchToLight: '切换到浅色模式', @@ -40,8 +40,8 @@ export default { // Setup Wizard setup: { - title: 'Sub2API 安装向导', - description: '配置您的 Sub2API 实例', + title: 'StarFireAPI 安装向导', + description: '配置您的 StarFireAPI 实例', database: { title: '数据库配置', description: '连接到您的 PostgreSQL 数据库', @@ -3086,7 +3086,7 @@ export default { secretKeyConfiguredHint: '密钥已配置,留空以保留当前值。' }, linuxdo: { title: 'LinuxDo Connect 登录', - description: '配置 LinuxDo Connect OAuth,用于 Sub2API 用户登录', + description: '配置 LinuxDo Connect OAuth,用于 StarFireAPI 用户登录', enable: '启用 LinuxDo 登录', enableHint: '在登录/注册页面显示 LinuxDo 登录入口', clientId: 'Client ID', @@ -3116,7 +3116,7 @@ export default { description: '自定义站点品牌', siteName: '站点名称', siteNameHint: '显示在邮件和页面标题中', - siteNamePlaceholder: 'Sub2API', + siteNamePlaceholder: 'StarFireAPI', siteSubtitle: '站点副标题', siteSubtitleHint: '显示在登录和注册页面', siteSubtitlePlaceholder: '订阅转 API 转换平台', @@ -3173,7 +3173,7 @@ export default { fromEmail: '发件人邮箱', fromEmailPlaceholder: "noreply{'@'}example.com", fromName: '发件人名称', - fromNamePlaceholder: 'Sub2API', + fromNamePlaceholder: 'StarFireAPI', useTls: '使用 TLS', useTlsHint: '为 SMTP 连接启用 TLS 加密' }, @@ -3375,14 +3375,14 @@ export default { // Admin tour steps admin: { welcome: { - title: '👋 欢迎使用 Sub2API', - description: '

Sub2API 是一个强大的 AI 服务中转平台,让您轻松管理和分发 AI 服务。

🎯 核心功能:

  • 📦 分组管理 - 创建不同的服务套餐(VIP、免费试用等)
  • 🔗 账号池 - 连接多个上游 AI 服务商账号
  • 🔑 密钥分发 - 为用户生成独立的 API Key
  • 💰 计费管理 - 灵活的费率和配额控制

接下来,我们将用 3 分钟带您完成首次配置 →

', + title: '👋 欢迎使用 StarFireAPI', + description: '

StarFireAPI 是一个强大的 AI 服务中转平台,让您轻松管理和分发 AI 服务。

🎯 核心功能:

  • 📦 分组管理 - 创建不同的服务套餐(VIP、免费试用等)
  • 🔗 账号池 - 连接多个上游 AI 服务商账号
  • 🔑 密钥分发 - 为用户生成独立的 API Key
  • 💰 计费管理 - 灵活的费率和配额控制

接下来,我们将用 3 分钟带您完成首次配置 →

', nextBtn: '开始配置 🚀', prevBtn: '跳过' }, groupManage: { title: '📦 第一步:分组管理', - description: '

什么是分组?

分组是 Sub2API 的核心概念,它就像一个"服务套餐":

  • 🎯 每个分组可以包含多个上游账号
  • 💰 每个分组有独立的计费倍率
  • 👥 可以设置为公开或专属分组

💡 示例:您可以创建"VIP专线"(高倍率)和"免费试用"(低倍率)两个分组

👉 点击左侧的"分组管理"开始

' + description: '

什么是分组?

分组是 StarFireAPI 的核心概念,它就像一个"服务套餐":

  • 🎯 每个分组可以包含多个上游账号
  • 💰 每个分组有独立的计费倍率
  • 👥 可以设置为公开或专属分组

💡 示例:您可以创建"VIP专线"(高倍率)和"免费试用"(低倍率)两个分组

👉 点击左侧的"分组管理"开始

' }, createGroup: { title: '➕ 创建新分组', @@ -3475,8 +3475,8 @@ export default { // User tour steps user: { welcome: { - title: '👋 欢迎使用 Sub2API', - description: '

您好!欢迎来到 Sub2API AI 服务平台。

🎯 快速开始:

  • 🔑 创建 API 密钥
  • 📋 复制密钥到您的应用
  • 🚀 开始使用 AI 服务

只需 1 分钟,让我们开始吧 →

', + title: '👋 欢迎使用 StarFireAPI', + description: '

您好!欢迎来到 StarFireAPI AI 服务平台。

🎯 快速开始:

  • 🔑 创建 API 密钥
  • 📋 复制密钥到您的应用
  • 🚀 开始使用 AI 服务

只需 1 分钟,让我们开始吧 →

', nextBtn: '开始 🚀', prevBtn: '跳过' }, diff --git a/frontend/src/views/HomeView.vue b/frontend/src/views/HomeView.vue index 6a3753f1..20c282e7 100644 --- a/frontend/src/views/HomeView.vue +++ b/frontend/src/views/HomeView.vue @@ -391,7 +391,7 @@ {{ t('home.docs') }} appStore.cachedPublicSettings?.site_name || appStore.siteName || 'Sub2API') +const siteName = computed(() => appStore.cachedPublicSettings?.site_name || appStore.siteName || 'StarFireAPI') const siteLogo = computed(() => appStore.cachedPublicSettings?.site_logo || appStore.siteLogo || '') const siteSubtitle = computed(() => appStore.cachedPublicSettings?.site_subtitle || 'AI API Gateway Platform') const docUrl = computed(() => appStore.cachedPublicSettings?.doc_url || appStore.docUrl || '') @@ -432,8 +432,8 @@ const isHomeContentUrl = computed(() => { // Theme const isDark = ref(document.documentElement.classList.contains('dark')) -// GitHub URL -const githubUrl = 'https://github.com/Wei-Shaw/sub2api' +// Official Site URL +const officialUrl = 'https://anthropic.edu.pl' // Auth state const isAuthenticated = computed(() => authStore.isAuthenticated) diff --git a/frontend/src/views/auth/RegisterView.vue b/frontend/src/views/auth/RegisterView.vue index 53cfe0d1..65b60835 100644 --- a/frontend/src/views/auth/RegisterView.vue +++ b/frontend/src/views/auth/RegisterView.vue @@ -317,7 +317,7 @@ const promoCodeEnabled = ref(true) const invitationCodeEnabled = ref(false) const turnstileEnabled = ref(false) const turnstileSiteKey = ref('') -const siteName = ref('Sub2API') +const siteName = ref('StarFireAPI') const linuxdoOAuthEnabled = ref(false) // Turnstile @@ -368,7 +368,7 @@ onMounted(async () => { invitationCodeEnabled.value = settings.invitation_code_enabled turnstileEnabled.value = settings.turnstile_enabled turnstileSiteKey.value = settings.turnstile_site_key || '' - siteName.value = settings.site_name || 'Sub2API' + siteName.value = settings.site_name || 'StarFireAPI' linuxdoOAuthEnabled.value = settings.linuxdo_oauth_enabled // Read promo code from URL parameter only if promo code is enabled