1
0
This commit is contained in:
oldweipro 2023-08-07 11:31:03 +08:00
parent 74f765382b
commit 5071278c65
2 changed files with 3 additions and 4 deletions

View File

@ -26,7 +26,7 @@ var (
jar = tls_client.NewCookieJar() jar = tls_client.NewCookieJar()
options = []tls_client.HttpClientOption{ options = []tls_client.HttpClientOption{
tls_client.WithTimeoutSeconds(360), tls_client.WithTimeoutSeconds(360),
tls_client.WithClientProfile(tls_client.Safari_Ipad_15_6), tls_client.WithClientProfile(tls_client.Okhttp4Android13),
tls_client.WithNotFollowRedirects(), tls_client.WithNotFollowRedirects(),
tls_client.WithCookieJar(jar), // create cookieJar instance and pass it as argument tls_client.WithCookieJar(jar), // create cookieJar instance and pass it as argument
// Disable SSL verification // Disable SSL verification

View File

@ -53,12 +53,12 @@ func NewAuthenticator(emailAddress, password, proxy string) *Authenticator {
EmailAddress: emailAddress, EmailAddress: emailAddress,
Password: password, Password: password,
Proxy: proxy, Proxy: proxy,
UserAgent: "ChatGPT/1.2023.187 (iOS 16.5.1; iPhone12,1; build 1744)", UserAgent: "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36",
} }
jar := tls_client.NewCookieJar() jar := tls_client.NewCookieJar()
options := []tls_client.HttpClientOption{ options := []tls_client.HttpClientOption{
tls_client.WithTimeoutSeconds(20), tls_client.WithTimeoutSeconds(20),
tls_client.WithClientProfile(tls_client.Safari_IOS_16_0), tls_client.WithClientProfile(tls_client.Okhttp4Android13),
tls_client.WithNotFollowRedirects(), tls_client.WithNotFollowRedirects(),
tls_client.WithCookieJar(jar), // create cookieJar instance and pass it as argument tls_client.WithCookieJar(jar), // create cookieJar instance and pass it as argument
// Proxy // Proxy
@ -185,7 +185,6 @@ func (auth *Authenticator) partTwo(url string) *Error {
"Connection": "keep-alive", "Connection": "keep-alive",
"User-Agent": auth.UserAgent, "User-Agent": auth.UserAgent,
"Accept-Language": "en-US,en;q=0.9", "Accept-Language": "en-US,en;q=0.9",
"Referer": "https://ios.chat.openai.com/",
} }
req, _ := http.NewRequest("GET", url, nil) req, _ := http.NewRequest("GET", url, nil)