feat: Introduce advanced TLS client with browser fingerprinting and new backend modules for API processing, authentication, mail, and ChatGPT registration.
This commit is contained in:
@@ -281,8 +281,27 @@ func Run(email, password, realName, birthdate, proxy string) (*ChatGPTReg, error
|
||||
return APIRegister(email, password, realName, birthdate, proxy, "[RegTest]")
|
||||
}
|
||||
|
||||
// APIRegister 使用 API 完成注册 (集成 403 重试机制)
|
||||
// APIRegister 使用 API 完成注册 (集成 403 重试机制,全局 5 分钟超时)
|
||||
func APIRegister(email, password, realName, birthdate, proxy string, logPrefix string) (*ChatGPTReg, error) {
|
||||
type regResult struct {
|
||||
reg *ChatGPTReg
|
||||
err error
|
||||
}
|
||||
resultCh := make(chan regResult, 1)
|
||||
go func() {
|
||||
reg, err := apiRegisterInternal(email, password, realName, birthdate, proxy, logPrefix)
|
||||
resultCh <- regResult{reg, err}
|
||||
}()
|
||||
select {
|
||||
case r := <-resultCh:
|
||||
return r.reg, r.err
|
||||
case <-time.After(5 * time.Minute):
|
||||
return nil, fmt.Errorf("注册超时 (5分钟)")
|
||||
}
|
||||
}
|
||||
|
||||
// apiRegisterInternal APIRegister 的内部实现
|
||||
func apiRegisterInternal(email, password, realName, birthdate, proxy string, logPrefix string) (*ChatGPTReg, error) {
|
||||
var reg *ChatGPTReg
|
||||
var lastErr error
|
||||
|
||||
|
||||
Reference in New Issue
Block a user