feat: add Team Auto Registration page for batch creation and management of ChatGPT Team accounts.
This commit is contained in:
@@ -164,14 +164,37 @@ func checkAndAutoAdd() {
|
||||
}
|
||||
}
|
||||
|
||||
// 读取代理配置
|
||||
proxyURL := ""
|
||||
replenishUseProxy := false
|
||||
if val, _ := database.Instance.GetConfig("monitor_replenish_use_proxy"); val == "true" {
|
||||
replenishUseProxy = true
|
||||
}
|
||||
if replenishUseProxy {
|
||||
proxyURL = config.Global.DefaultProxy
|
||||
}
|
||||
|
||||
// 读取浏览器类型配置
|
||||
browserType := "rod"
|
||||
if val, _ := database.Instance.GetConfig("monitor_browser_type"); val != "" {
|
||||
browserType = val
|
||||
}
|
||||
|
||||
req := TeamProcessRequest{
|
||||
Owners: reqOwners,
|
||||
MembersPerTeam: 4,
|
||||
ConcurrentTeams: 2,
|
||||
IncludeOwner: false,
|
||||
Headless: true,
|
||||
BrowserType: "rod", // 默认使用 rod
|
||||
Proxy: "", // 不使用代理
|
||||
BrowserType: browserType,
|
||||
Proxy: proxyURL,
|
||||
}
|
||||
|
||||
// 输出代理使用状态日志
|
||||
if proxyURL != "" {
|
||||
logger.Info(fmt.Sprintf("自动补号: 使用代理 %s", proxyURL), "", "auto-add")
|
||||
} else {
|
||||
logger.Info("自动补号: 未使用代理", "", "auto-add")
|
||||
}
|
||||
|
||||
// 初始化状态
|
||||
@@ -186,7 +209,7 @@ func checkAndAutoAdd() {
|
||||
// 异步执行
|
||||
go runTeamProcess(req)
|
||||
|
||||
logger.Success(fmt.Sprintf("自动补号任务已启动: %d 个 Team", actualTeams), "", "auto-add")
|
||||
logger.Success(fmt.Sprintf("自动补号任务已启动: %d 个 Team (浏览器: %s)", actualTeams, browserType), "", "auto-add")
|
||||
}
|
||||
|
||||
// getS2AAccountCount 获取 S2A 当前账号数量
|
||||
|
||||
Reference in New Issue
Block a user