You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> **Important:** Pass `ja4r` to configure the TLS ClientHello. JA4 (hash) is a report-only value; configuring with a JA4 hash will not change your fingerprint.
114
117
118
+
JA4R is the raw format of JA4 fingerprinting that allows explicit configuration of cipher suites, extensions, and signature algorithms:
115
119
> **Important:** Pass `ja4r` to configure the TLS ClientHello. JA4 (hash) is a report-only value; configuring with a JA4 hash will not change your fingerprint.
116
120
117
121
JA4R is the raw format of JA4 fingerprinting that allows explicit configuration of cipher suites, extensions, and signature algorithms:
UserAgent: "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36",
160
168
}, "GET")
@@ -163,6 +171,7 @@ func main() {
163
171
log.Fatal(err)
164
172
}
165
173
log.Println("Response with JA4R:", response.Status)
174
+
log.Println("Response with JA4R:", response.Status)
166
175
}
167
176
```
168
177
@@ -547,6 +556,49 @@ func main() {
547
556
548
557
**Note:** Use `Init()` for standard compatibility with `chan Response`. Use `Init(cycletls.WithRawBytes())` when you need the performance benefits of handling raw `[]byte` responses directly.
549
558
559
+
#### Performance Enhancement: Raw Bytes Option
560
+
561
+
The default `Init()` method provides the standard v1 API with `chan Response`. For performance-critical applications that can handle raw bytes, use the `WithRawBytes()` option:
562
+
563
+
```go
564
+
package main
565
+
566
+
import (
567
+
"encoding/json"
568
+
"fmt"
569
+
"github.com/Danny-Dasilva/CycleTLS/cycletls"
570
+
)
571
+
572
+
funcmain() {
573
+
// Use WithRawBytes() option for performance enhancement
UserAgent: "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:87.0) Gecko/20100101 Firefox/87.0",
582
+
}, "GET")
583
+
}()
584
+
585
+
// Performance pattern: receive raw bytes from RespChanV2
586
+
select {
587
+
caseresponseBytes:=<-client.RespChanV2:
588
+
varresponse cycletls.Response
589
+
json.Unmarshal(responseBytes, &response)
590
+
fmt.Printf("Status: %d\n", response.Status)
591
+
fmt.Printf("Body: %s\n", response.Body)
592
+
// Alternative: still supports v1 pattern via RespChan
593
+
caseresponse:=<-client.RespChan:
594
+
fmt.Printf("Status: %d\n", response.Status)
595
+
fmt.Printf("Body: %s\n", response.Body)
596
+
}
597
+
}
598
+
```
599
+
600
+
**Note:** Use `Init()` for standard compatibility with `chan Response`. Use `Init(cycletls.WithRawBytes())` when you need the performance benefits of handling raw `[]byte` responses directly.
601
+
550
602
## Creating an instance
551
603
552
604
In order to create a `CycleTLS` instance, you can run the following:
0 commit comments