Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 24 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,22 @@
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
[![Python](https://img.shields.io/badge/Python-3.10%2B-blue.svg)](https://www.python.org/)

- GitHub Repo: [https://github.com/dou-jiang/codex-console](https://github.com/dou-jiang/codex-console)

## QQ群

- 交流群: https://qm.qq.com/q/ZTCKxawxeo
- 交流群: [291638849(点击加群)](https://qm.qq.com/q/4TETC3mWco)
- Telegram 频道: [codex_console](https://t.me/codex_console)

## 致谢

首先感谢上游项目作者 [cnlimiter](https://github.com/cnlimiter) 提供的优秀基础工程。

本仓库是在原项目思路和结构之上进行兼容性修复、流程调整和体验优化,适合作为一个“当前可用的修复维护版”继续使用。

## 这个分支修了什么
## 版本更新

为适配当前注册链路,这个分支重点补了下面几个问题:
### v1.0

1. 新增 Sentinel POW 求解逻辑
OpenAI 现在会强制校验 Sentinel POW,原先直接传空值已经不行了,这里补上了实际求解流程。
Expand All @@ -38,6 +41,22 @@
5. 优化终端和 Web UI 提示文案
保留可读性的前提下,把一些提示改得更友好一点,出错时至少不至于像在挨骂。

### v1.1

1. 修复注册流程中的问题,解决 Outlook 和临时邮箱收不到邮件导致注册卡住、无法完成注册的问题。

2. 修复无法检查订阅状态的问题,提升订阅识别和状态检查的可用性。

3. 新增绑卡半自动模式,支持自动随机地址;3DS 无法跳过,需按实际流程完成验证。

4. 新增已订阅账号管理功能,支持查看和管理账号额度。

5. 新增后台日志功能,并补充数据导出与导入能力,方便排查问题和迁移数据。

6. 优化部分 UI 细节与交互体验,减少页面操作时的割裂感。

7. 补充细节稳定性处理,尽量减少注册、订阅检测和账号管理过程中出现卡住或误判的情况。

## 核心能力

- Web UI 管理注册任务和账号数据
Expand Down Expand Up @@ -218,3 +237,5 @@ dist/codex-console-windows-X64.exe
本项目仅供学习、研究和技术交流使用,请遵守相关平台和服务条款,不要用于违规、滥用或非法用途。

因使用本项目产生的任何风险和后果,由使用者自行承担。


2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "codex-console"
version = "1.0.4"
version = "1.1.0"
description = "OpenAI account management console"
requires-python = ">=3.10"
dependencies = [
Expand Down
2 changes: 1 addition & 1 deletion src/config/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class EmailServiceType(str, Enum):
# ============================================================================

APP_NAME = "OpenAI/Codex CLI 自动注册系统"
APP_VERSION = "2.0.0"
APP_VERSION = "1.1.0"
APP_DESCRIPTION = "自动注册 OpenAI/Codex CLI 账号的系统"

# ============================================================================
Expand Down
31 changes: 31 additions & 0 deletions src/config/project_notice.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
"""Shared project notice content for terminal and Web UI."""

PROJECT_NOTICE = {
"title": "项目声明",
"free_notice": "本项目永久免费开源,如果你是付费购买的,请立即找卖家退款。",
"disclaimer": (
"免责声明:本工具仅供学习和研究使用,使用本工具产生的一切后果由使用者自行承担。"
"请遵守相关服务的使用条款,不要用于任何违法或不当用途。"
"如有侵权,请及时联系,会及时删除。"
),
"github_repo_name": "dou-jiang/codex-console",
"github_repo_url": "https://github.com/dou-jiang/codex-console",
"qq_group_id": "291638849",
"qq_group_url": "https://qm.qq.com/q/4TETC3mWco",
"telegram_name": "codex_console",
"telegram_url": "https://t.me/codex_console",
}


def build_terminal_notice_lines() -> list[str]:
"""Build terminal-friendly notice lines."""
return [
"=" * 72,
"项目声明",
PROJECT_NOTICE["free_notice"],
f"GitHub 仓库 {PROJECT_NOTICE['github_repo_name']}:{PROJECT_NOTICE['github_repo_url']}",
f"QQ交流群 {PROJECT_NOTICE['qq_group_id']}:{PROJECT_NOTICE['qq_group_url']}",
f"Telegram频道 {PROJECT_NOTICE['telegram_name']}:{PROJECT_NOTICE['telegram_url']}",
PROJECT_NOTICE["disclaimer"],
"=" * 72,
]
4 changes: 2 additions & 2 deletions src/config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class SettingDefinition:
),
"app_version": SettingDefinition(
db_key="app.version",
default_value="2.0.0",
default_value="1.1.0",
category=SettingCategory.GENERAL,
description="应用版本"
),
Expand Down Expand Up @@ -592,7 +592,7 @@ class Settings(BaseModel):

# 应用信息
app_name: str = "OpenAI/Codex CLI 自动注册系统"
app_version: str = "2.0.0"
app_version: str = "1.1.0"
debug: bool = False

# 数据库配置
Expand Down
1 change: 1 addition & 0 deletions src/services/temp_mail.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ def _is_openai_otp_mail(self, sender: str, subject: str, body: str, raw: str) ->
return False

otp_keywords = (
"verification",
"verification code",
"verify",
"one-time code",
Expand Down
2 changes: 1 addition & 1 deletion src/services/tempmail.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,4 +397,4 @@ def wait_for_verification_code_with_callback(
"email": email,
"message": "等待验证码超时"
})
return None
return None
2 changes: 2 additions & 0 deletions src/web/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from fastapi.responses import HTMLResponse, RedirectResponse

from ..config.settings import get_settings
from ..config.project_notice import PROJECT_NOTICE
from .routes import api_router
from .routes.websocket import router as ws_router
from .task_manager import task_manager
Expand Down Expand Up @@ -91,6 +92,7 @@ def create_app() -> FastAPI:
# 模板引擎
templates = Jinja2Templates(directory=str(TEMPLATES_DIR))
templates.env.globals["static_version"] = _build_static_asset_version(STATIC_DIR)
templates.env.globals["project_notice"] = PROJECT_NOTICE

def _render_template(
request: Request,
Expand Down
74 changes: 74 additions & 0 deletions static/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,67 @@ body {
-moz-osx-font-smoothing: grayscale;
}

.site-notice-wrapper {
padding: var(--spacing-md) 0 0;
}

.site-notice {
display: flex;
flex-direction: column;
gap: var(--spacing-sm);
padding: 14px 18px;
border: 1px solid rgba(245, 158, 11, 0.28);
border-radius: var(--radius-lg);
background: linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(16, 163, 127, 0.08));
box-shadow: var(--shadow-sm);
}

.site-notice-heading {
display: flex;
flex-wrap: wrap;
gap: 10px;
align-items: center;
color: var(--text-primary);
font-size: 0.95rem;
}

.site-notice-heading strong {
color: #b45309;
}

.site-notice-text {
color: var(--text-secondary);
font-size: 0.875rem;
margin: 0;
}

.site-notice-links {
display: flex;
flex-wrap: wrap;
gap: 10px;
}

.site-notice-links a {
display: inline-flex;
align-items: center;
min-height: 36px;
padding: 0 14px;
border-radius: var(--radius-full);
background: var(--surface);
border: 1px solid var(--border);
color: var(--primary-color);
text-decoration: none;
font-size: 0.875rem;
font-weight: 600;
transition: all var(--transition);
}

.site-notice-links a:hover {
color: var(--primary-hover);
border-color: var(--primary-color);
transform: translateY(-1px);
}

/* ============================================
布局
============================================ */
Expand Down Expand Up @@ -1250,6 +1311,19 @@ body {
}

@media (max-width: 768px) {
.site-notice {
padding: 12px 14px;
}

.site-notice-heading {
font-size: 0.9rem;
}

.site-notice-links a {
width: 100%;
justify-content: center;
}

.container {
padding: 0 var(--spacing-md);
}
Expand Down
1 change: 1 addition & 0 deletions templates/accounts.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@
</style>
</head>
<body>
{% include "partials/site_notice.html" %}
<div class="container">
<!-- 导航栏 -->
<nav class="navbar">
Expand Down
1 change: 1 addition & 0 deletions templates/accounts_overview.html
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,7 @@
</style>
</head>
<body>
{% include "partials/site_notice.html" %}
<div class="container">
<nav class="navbar">
<div class="nav-brand">
Expand Down
1 change: 1 addition & 0 deletions templates/auto_team.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
</style>
</head>
<body>
{% include "partials/site_notice.html" %}
<div class="container">
<nav class="navbar">
<div class="nav-brand">
Expand Down
1 change: 1 addition & 0 deletions templates/card_pool.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
</style>
</head>
<body>
{% include "partials/site_notice.html" %}
<div class="container">
<nav class="navbar">
<div class="nav-brand">
Expand Down
1 change: 1 addition & 0 deletions templates/email_services.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>📧</text></svg>">
</head>
<body>
{% include "partials/site_notice.html" %}
<div class="container">
<!-- 导航栏 -->
<nav class="navbar">
Expand Down
1 change: 1 addition & 0 deletions templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@
</style>
</head>
<body>
{% include "partials/site_notice.html" %}
<div class="container">
<!-- 导航栏 -->
<nav class="navbar">
Expand Down
1 change: 1 addition & 0 deletions templates/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
</style>
</head>
<body>
{% include "partials/site_notice.html" %}
<div class="container">
<div class="login-wrap">
<div class="card login-card">
Expand Down
1 change: 1 addition & 0 deletions templates/logs.html
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
</style>
</head>
<body>
{% include "partials/site_notice.html" %}
<div class="container">
<nav class="navbar">
<div class="nav-brand">
Expand Down
33 changes: 33 additions & 0 deletions templates/partials/site_notice.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{% set notice = project_notice if project_notice is defined else {
"title": "项目声明",
"free_notice": "本项目永久免费开源,如果你是付费购买的,请立即找卖家退款。",
"disclaimer": "免责声明:本工具仅供学习和研究使用,使用本工具产生的一切后果由使用者自行承担。请遵守相关服务的使用条款,不要用于任何违法或不当用途。如有侵权,请及时联系,会及时删除。",
"github_repo_name": "dou-jiang/codex-console",
"github_repo_url": "https://github.com/dou-jiang/codex-console",
"qq_group_id": "291638849",
"qq_group_url": "https://qm.qq.com/q/4TETC3mWco",
"telegram_name": "codex_console",
"telegram_url": "https://t.me/codex_console"
} %}
<div class="site-notice-wrapper">
<div class="container">
<section class="site-notice" role="note" aria-label="{{ notice.title }}">
<div class="site-notice-heading">
<strong>{{ notice.title }}</strong>
<span>{{ notice.free_notice }}</span>
</div>
<p class="site-notice-text">{{ notice.disclaimer }}</p>
<div class="site-notice-links">
<a href="{{ notice.github_repo_url }}" target="_blank" rel="noopener noreferrer">
GitHub 仓库 {{ notice.github_repo_url }}
</a>
<a href="{{ notice.qq_group_url }}" target="_blank" rel="noopener noreferrer">
QQ交流群 {{ notice.qq_group_id }}(点击加群)
</a>
<a href="{{ notice.telegram_url }}" target="_blank" rel="noopener noreferrer">
Telegram频道 {{ notice.telegram_name }}
</a>
</div>
</section>
</div>
</div>
1 change: 1 addition & 0 deletions templates/payment.html
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@
</style>
</head>
<body>
{% include "partials/site_notice.html" %}
<div class="container">
<!-- 导航栏 -->
<nav class="navbar">
Expand Down
1 change: 1 addition & 0 deletions templates/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
</style>
</head>
<body>
{% include "partials/site_notice.html" %}
<div class="container">
<!-- 导航栏 -->
<nav class="navbar">
Expand Down
8 changes: 8 additions & 0 deletions webui.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@
from src.core.db_logs import install_database_log_handler
from src.database.init_db import initialize_database
from src.config.settings import get_settings
from src.config.project_notice import build_terminal_notice_lines


def _print_project_notice():
"""Print the project notice to the terminal on startup."""
for line in build_terminal_notice_lines():
print(line)


def _load_dotenv():
Expand Down Expand Up @@ -89,6 +96,7 @@ def setup_application():


def start_webui():
_print_project_notice()
"""启动 Web UI"""
# 设置应用程序
settings = setup_application()
Expand Down
Loading