mirror of
https://github.com/lukaszraczylo/mcp-captcharesolver.git
synced 2026-10-14 00:57:55 +00:00
feat(stealth): consistent header set with TLS/JA3 advisories
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
package stealth
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestHeadersFor(t *testing.T) {
|
||||
fp := GenerateFingerprint(FingerprintParams{OS: "macos", Browser: "chrome", Locale: "en-GB", Seed: 5})
|
||||
h := HeadersFor(fp)
|
||||
if h.Headers["User-Agent"] != fp.UserAgent {
|
||||
t.Fatalf("UA mismatch")
|
||||
}
|
||||
if h.Headers["Accept-Language"] == "" || h.Headers["Sec-CH-UA-Platform"] == "" {
|
||||
t.Fatalf("missing client hints: %+v", h.Headers)
|
||||
}
|
||||
if len(h.Advisories) == 0 {
|
||||
t.Fatal("expected TLS/JA3 advisory")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user