Skip to content
This repository has been archived by the owner on Sep 13, 2023. It is now read-only.

Commit

Permalink
set new client every 10 minutes acheong08/ChatGPT#1431
Browse files Browse the repository at this point in the history
  • Loading branch information
Antonio committed Jun 30, 2023
1 parent 6230891 commit 6630f96
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,24 @@ func init() {
}()
}
arkose.SetTLSClient(&client)
go func() {
var newclient tls_client.HttpClient
for {
options := []tls_client.HttpClientOption{
tls_client.WithTimeoutSeconds(360),
tls_client.WithClientProfile(tls_client.Firefox_110),
tls_client.WithNotFollowRedirects(),
tls_client.WithCookieJar(tls_client.NewCookieJar()), // create cookieJar instance and pass it as argument
}
newclient, _ = tls_client.NewHttpClient(tls_client.NewNoopLogger(), options...)
if http_proxy != "" {
newclient.SetProxy(http_proxy)
}
arkose.SetTLSClient(&newclient)
//
time.Sleep(10 * time.Minute)
}
}()
}

func main() {
Expand Down

0 comments on commit 6630f96

Please sign in to comment.