feat: Implement account pool monitoring and management dashboard with S2A integration and add a new upload page.
This commit is contained in:
@@ -32,6 +32,20 @@ func HandleCodexProxies(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
}
|
||||
|
||||
// HandleCodexProxyStats 获取代理池统计
|
||||
func HandleCodexProxyStats(w http.ResponseWriter, r *http.Request) {
|
||||
if r.Method != http.MethodGet {
|
||||
Error(w, http.StatusMethodNotAllowed, "仅支持 GET")
|
||||
return
|
||||
}
|
||||
if database.Instance == nil {
|
||||
Error(w, http.StatusInternalServerError, "数据库未初始化")
|
||||
return
|
||||
}
|
||||
stats := database.Instance.GetCodexProxyStats()
|
||||
Success(w, stats)
|
||||
}
|
||||
|
||||
// listCodexProxies 获取代理列表
|
||||
func listCodexProxies(w http.ResponseWriter, r *http.Request) {
|
||||
proxies, err := database.Instance.GetCodexProxies()
|
||||
|
||||
@@ -855,8 +855,14 @@ func processSingleTeam(idx int, req TeamProcessRequest) (result TeamProcessResul
|
||||
return false
|
||||
}
|
||||
|
||||
// 注册
|
||||
_, err := register.APIRegister(currentEmail, currentPassword, name, birthdate, req.Proxy, memberLogPrefix)
|
||||
// 注册 - 从代理池获取随机代理
|
||||
regProxy := req.Proxy
|
||||
if database.Instance != nil {
|
||||
if poolProxy, poolErr := database.Instance.GetRandomCodexProxy(); poolErr == nil && poolProxy != "" {
|
||||
regProxy = poolProxy
|
||||
}
|
||||
}
|
||||
_, err := register.APIRegister(currentEmail, currentPassword, name, birthdate, regProxy, memberLogPrefix)
|
||||
if err != nil {
|
||||
logger.Error(fmt.Sprintf("%s [注册失败] %v", memberLogPrefix, err), currentEmail, "team")
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user