feat: Update CycleTLS to v1.0.30 and adapt API usage

This commit is contained in:
2025-11-19 05:10:58 +00:00
parent 65b46e1975
commit 5ae735ce8d
5 changed files with 26 additions and 42 deletions

View File

@@ -6,6 +6,7 @@ import (
"testing"
"git.nite07.com/nite/go-flaresolverr"
"github.com/Danny-Dasilva/CycleTLS/cycletls"
)
func TestGetV1(t *testing.T) {
@@ -44,6 +45,9 @@ func TestImitateGet(t *testing.T) {
cookies := resp.Solution.Cookies
resp1, err := f.SimulateGet("https://nopecha.com/demo/cloudflare", &flaresolverr.SimulateOptions{
HttpCookies: cookies,
Options: &cycletls.Options{
ForceHTTP3: true,
},
}) // ImitateGet uses cookies to simulate browser requests and also simulates the browser's ja3 fingerprint.
if err != nil {
t.Error(err)
@@ -51,6 +55,7 @@ func TestImitateGet(t *testing.T) {
}
if resp1.Status != 200 {
fmt.Printf("status is not 200: %v", resp1.Status)
fmt.Printf("%+v", resp1)
t.FailNow()
}
jsonBytes, _ := json.Marshal(resp1)