Commit Graph

151 Commits

Author SHA1 Message Date
ae37a7165d feat: add new API endpoint for owner ban checks 2026-02-08 14:21:04 +08:00
2eb4a57639 feat(mail): Add support for multiple domains per mail service
- Add `Domains` field to MailServiceConfig for managing additional domains under single API
- Implement `matchDomain` helper function for precise and subdomain matching logic
- Update `GetServiceByDomain` to check both primary domain and additional domains list
- Enhance EmailConfig UI to display domain count and allow comma-separated domain input
- Add domains field to mail service request/response structures in API handlers
- Update frontend types to include domains array in MailService interface
- Improve documentation with clarification on primary vs additional domains usage
- Allows single mail service API to manage multiple email domains for verification and operations
2026-02-08 02:57:19 +08:00
847574e89e feat(auth): Optimize retry logic and add circuit breaker for team processing
- Reduce authorization retry attempts from 3 to 2 and optimize retry delays from exponential (3s, 5s, 8s, 12s) to fixed 3s backoff
- Implement team-level circuit breaker: skip member processing when 3+ consecutive 500 errors detected in same team
- Add consecutive 500 error tracking with atomic counter and reset on successful authorization
- Reduce ObtainAuthorizationCode timeout from 3 minutes to 90 seconds with updated error messages
- Optimize Codex API workspace selection retry: reduce max attempts from 5 to 3 with shorter backoff (2s, 4s instead of 3s, 5s, 8s, 12s)
- Reduce S2A OAuth submission retry delays from (4s, 6s) to (2s, 3s) for faster failure detection
- Optimize member stagger timing: reduce from 3s + idx*2s to 1s + idx*1s with reduced jitter (0-1s instead of 0-2s)
- Add early exit for exhausted retries in CompleteWithCodexAPI to prevent unnecessary outer retry attempts
- These changes improve responsiveness and reduce cascading failures during bulk team processing
2026-02-07 23:19:06 +08:00
d6cd7660eb feat(config): Enhance S2A configuration switch logging with detailed output
- Update success message to specifically indicate S2A configuration switch
- Add detailed logging output showing switched API endpoint
- Display concurrency, priority, and group IDs in configuration log
- Add conditional proxy information logging when proxy is enabled
- Improve user visibility into active configuration after switching profiles
2026-02-07 22:47:37 +08:00
b7622070e6 feat: implement S2A authentication flow, Codex token management, and related utilities. 2026-02-07 21:53:12 +08:00
eaf6073cb2 feat(auth): Add retry logic with exponential backoff for S2A and Codex API
- Add exponential backoff with jitter to S2A OAuth submission (3 attempts)
- Implement 5xx error retry mechanism in Codex API workspace selection (5 attempts)
- Add 429 rate limit handling with retry support in Codex API
- Improve team member processing with staggered delays to avoid concurrent conflicts
- Add per-attempt proxy rotation to avoid reusing failed proxies
- Enhance retry delay calculation with random jitter to prevent thundering herd
- Update logging to display retry attempts and delay durations
- Improve error messages with HTTP status codes and response body snippets
- Refactor retry loops to use consistent exponential backoff pattern across modules
2026-02-07 21:37:50 +08:00
231611af84 feat(s2a): Add expandable group list with truncation in ProfileCard
- Add expanded state to ProfileCard component for toggling group visibility
- Implement MAX_VISIBLE constant to limit initial group display to 4 items
- Add toggle button to show/hide remaining groups with count indicator
- Display "收起" (collapse) when expanded, "+N 个分组" (N groups) when collapsed
- Wrap group grid in container div to accommodate expand/collapse button
- Improve UX for profiles with many groups by preventing excessive card height
2026-02-07 20:43:44 +08:00
f74c421fd8 feat(s2a): Improve ProfileCard layout with flexbox for consistent height
- Add flex flex-col and h-full to Card component for full height layout
- Update CardContent with flex flex-col flex-1 for proper content distribution
- Move action buttons to bottom with mt-auto pt-4 spacing
- Ensures profile cards maintain consistent heights in grid layout and action buttons align to bottom
2026-02-07 20:31:53 +08:00
7aa708be22 refactor(s2a): Remove unused getGroupLabel helper function
- Delete getGroupLabel function that was no longer being used in the component
- Simplify group display logic by removing redundant label formatting utility
- Clean up code to improve maintainability and reduce unused function definitions
2026-02-07 20:21:30 +08:00
b07200faec feat(s2a): Improve group display layout with grid-based cards
- Replace badge-style group display with grid-based card layout for better readability
- Add group name and ID display in selected groups section with truncation handling
- Reorganize profile card group summary to use dedicated grid section below parameters
- Remove inline group information from parameter summary badge
- Improve visual hierarchy and spacing in group display components
- Enhance dark mode styling for group cards with better contrast and borders
2026-02-07 19:46:30 +08:00
eb129a4f85 feat(s2a): Improve group name caching and display with api_base isolation
- Refactor groupNameCache structure to isolate caches by api_base: { [apiBase]: { [groupId]: groupName } }
- Add normalizeBase() utility to remove trailing slashes and prevent cache key mismatches
- Update group fetching logic to deduplicate requests by api_base and admin_key combination
- Auto-fetch available groups when entering edit mode for a profile with valid credentials
- Enhance group label display to show "name #id" format instead of just name or #id
- Sort profiles in list view to display active profile first
- Update ProfileCard to use normalized api_base for groupNameCache lookup
- Simplify group label rendering by removing conditional groupsFetched check
2026-02-07 19:12:48 +08:00
6eb156c555 feat(s2a): Add dynamic group fetching with credentials validation
- Add backend endpoint `/api/s2a/fetch-groups` to fetch S2A groups using arbitrary credentials without depending on global config
- Implement `handleFetchGroups` handler with proper error handling and multiple auth header support (Bearer token, X-API-Key, X-Admin-Key)
- Add frontend API function `fetchGroupsWithCredentials` to call the new endpoint and parse S2A standard response format
- Add group fetching UI in S2AConfig edit mode with refresh button and loading state
- Implement batch group name caching in list view to display human-readable group names instead of IDs
- Deduplicate API requests by grouping profiles with identical credentials to avoid redundant calls
- Add fallback to display group ID when name is unavailable
2026-02-07 18:36:09 +08:00
0ad5881259 feat(header): Display active S2A profile information in header
- Add Server icon import from lucide-react for profile display
- Import useConfig hook and S2AProfile type for configuration access
- Implement activeProfile state to track currently selected S2A profile
- Add useEffect hook to fetch and match S2A profiles against current API base configuration
- Replace spacer div with active profile information display component
- Show profile name and API base URL when profile is matched
- Display API base URL directly when configured but profile not found
- Add responsive styling with dark mode support for profile info badge
- Use truncation and flex-shrink to prevent layout overflow on smaller screens
- Provides users with clear visibility of which S2A profile is currently active
2026-02-07 14:29:55 +08:00
060d21eb4f feat(s2a): Refactor S2A configuration UI with profile management and edit mode
- Restructure component to support list and edit view modes for better UX
- Replace single global config state with profile-based management system
- Add ability to create, edit, and delete S2A configuration profiles
- Implement profile activation to set active configuration
- Refactor form state management with dedicated form variables (formName, formApiBase, etc.)
- Add profile name field to distinguish between multiple configurations
- Improve icon usage by removing unused Bookmark and Download icons
- Consolidate message handling with auto-dismiss after 4 seconds
- Add resetForm utility function to clear form state between operations
- Separate fetchActiveConfig from fetchProfiles for cleaner data flow
- Enhance error handling with graceful fallbacks for API failures
- Improve code organization by grouping related state and functions
2026-02-07 13:46:48 +08:00
3af01abc76 feat(s2a): Add S2A configuration profiles management system
- Add new `/api/s2a/profiles` endpoint supporting GET, POST, DELETE operations
- Create `s2a_profiles` database table with fields for API configuration, concurrency, priority, group IDs, and proxy settings
- Implement database methods: `GetS2AProfiles()`, `AddS2AProfile()`, `DeleteS2AProfile()`
- Add S2AProfile struct to database models with JSON serialization support
- Implement profile management UI in S2AConfig page with save, load, and delete functionality
- Add profile list display with ability to apply saved configurations
- Add S2AProfile type definition to frontend types
- Enable users to save and reuse S2A configurations as presets for faster setup
2026-02-07 13:31:51 +08:00
02ddb48f21 fix(database): Recalculate batch run metrics from team results on cleanup
- Aggregate total_registered and total_added_to_s2a from batch_team_results table
- Calculate success_rate based on actual S2A additions vs total owners
- Compute duration_seconds from started_at and finished_at timestamps
- Improve stuck batch run recovery by restoring accurate metrics instead of zeroing them out
2026-02-07 02:52:06 +08:00
40a9da0809 fix(team_process): Clean up stuck processing owners on startup and batch completion
- Add CleanupStuckProcessingOwners database method to reset owners stuck in processing status back to valid state
- Call cleanup routine on application startup to recover from previous abnormal exits
- Call cleanup routine after batch processing completes to ensure no orphaned processing states remain
- Add markOwnerResult calls in processSingleTeam when team invitations are full to properly track owner status
- Prevents owners from being permanently stuck in processing state due to unexpected shutdowns or errors
2026-02-07 02:20:50 +08:00
60f57ab6a6 feat(upload): Persist team process configuration to localStorage
- Add localStorage persistence for team process configuration settings
- Initialize state values from saved configuration on component mount
- Implement useEffect hook to automatically save configuration changes to localStorage
- Preserve user preferences for membersPerTeam, concurrentTeams, concurrentS2A, useProxy, includeOwner, and processCount across sessions
- Improve user experience by restoring previous settings when returning to Upload page
2026-02-07 02:09:56 +08:00
fee422b408 feat(team_process): Add pause mechanism for consecutive zero S2A entries
- Implement pause/resume mechanism using sync.Cond to halt worker goroutines
- Add consecutive zero S2A counter to detect when no accounts are added for 2+ teams
- Trigger automatic 1-minute pause when consecutive zero entries detected
- Log warning messages with team details when pause is triggered
- Reset counter on successful S2A entries or when pause completes
- Allow stop signal to interrupt pause period for graceful shutdown
- Broadcast resume signal to all waiting workers after pause completes
- Prevents resource exhaustion and provides recovery time during low-activity periods
2026-02-07 01:53:20 +08:00
a74d3ac121 feat: Implement a new Upload page for batch processing team owners, featuring a file dropzone and a new layout. 2026-02-07 01:43:38 +08:00
2fc0dcaba4 feat: Introduce a new design system with dark mode and animations, add a reusable Tabs component, implement an Upload page, and create a backend API for team processes. 2026-02-07 00:10:29 +08:00
070ba6a31e feat: add new API endpoints for team processes 2026-02-06 22:04:48 +08:00
f97a9beb4b feat: Implement account pool monitoring and management dashboard with S2A integration and add a new upload page. 2026-02-06 21:54:37 +08:00
1458b8b3e2 feat: add team process API. 2026-02-06 21:18:53 +08:00
6c8a036018 feat: Establish core backend services including SQLite database, structured logging, and initial owner management capabilities. 2026-02-06 20:53:05 +08:00
98ac10987c feat: Introduce advanced TLS client with browser fingerprinting and new backend modules for API processing, authentication, mail, and ChatGPT registration. 2026-02-06 18:49:55 +08:00
4ac7290e1f feat: add a new TLS client with browser fingerprinting and implement Codex API authentication. 2026-02-06 17:44:29 +08:00
1c1bdc3152 1 2026-02-05 22:03:04 +08:00
dd24c813ab feat: Implement Dashboard page displaying pool status, statistics, and recent batch runs. 2026-02-05 09:05:36 +08:00
6e6dfded7b feat: add batch processing history and real-time status monitoring for team uploads 2026-02-05 08:51:53 +08:00
1718920250 feat: Add team process API. 2026-02-05 07:58:21 +08:00
db00d44a71 feat: Implement initial backend API server with various endpoints and background services, including an error account cleaner. 2026-02-05 07:51:03 +08:00
ad1270b88d feat: implement ChatGPT owner demotion service with a FastAPI backend and a basic frontend, alongside updated project metadata. 2026-02-05 07:18:22 +08:00
8895d508c0 feat: Implement Max RPM tracking API, Codex API authentication, and a new dashboard pool status component. 2026-02-05 06:30:47 +08:00
2bccb06359 feat: Implement the ChatGPT Owner Demotion Console with new frontend and backend components. 2026-02-05 03:13:30 +08:00
61712cf4fb feat: Implement browserless Codex API authentication with PoW solving and a new mail service, and update gitignore to exclude get_code.go. 2026-02-04 09:43:22 +08:00
381cbd41fa feat: add backend team registration module 2026-02-04 04:27:44 +08:00
1bd3d120c1 feat: implement mail service client for email generation, mailbox creation, and verification code retrieval. 2026-02-03 08:59:49 +08:00
d92c64f2c2 feat: add mail service for managing email configurations, generating accounts, and fetching emails with verification code support. 2026-02-03 08:49:40 +08:00
f8c3cd9a5b build: update GOPROXY to proxy.golang.org in Dockerfile and docker-compose build arguments. 2026-02-03 08:15:41 +08:00
fcbdd8de39 feat: implement team process API endpoints 2026-02-03 08:00:18 +08:00
33289b633d feat: add Codex API authentication module with TLS fingerprinting and PoW solving, and introduce team processing API. 2026-02-03 07:48:06 +08:00
a4aed8890f feat: add API for team processes 2026-02-03 07:40:30 +08:00
0813737f1b fix(auth): remove username from password verification payload and fix proxy refresh handler
- Remove redundant username field from password verification payload in CodexAPIAuth
- Update proxy refresh button to use arrow function for proper event handling
- Simplify authentication flow by eliminating unnecessary email parameter in password verification request
2026-02-03 07:32:52 +08:00
87b9b72a0e feat: add Codex API headless authentication and proxy configuration UI. 2026-02-03 07:01:22 +08:00
f2757cf313 feat: Implement SQLite database for team owner management, configuration, batch processing, and proxies, introducing new auto-add API and Accounts UI. 2026-02-03 06:54:40 +08:00
b20399a00a feat: Introduce core application structure, configuration, monitoring, and team management features. 2026-02-03 06:45:54 +08:00
637753ddaa feat: Implement Codex proxy configuration page with CRUD and testing capabilities, supported by new backend API and services for error handling, team processing, mail, and ChatGPT registration. 2026-02-03 04:33:37 +08:00
f867e20c0e feat: Implement CodexAuth proxy pool backend and a new sidebar component with navigation. 2026-02-03 03:35:43 +08:00
9b4838b604 feat: add Codex proxy configuration page with full CRUD, toggle, and testing functionalities. 2026-02-03 03:30:01 +08:00