Skip to content

Commit

Permalink
test cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Danny-Dasilva committed Oct 16, 2023
1 parent 5b405bd commit 009b00b
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
8 changes: 3 additions & 5 deletions cycletls/tests/integration/main_ja3_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ type CycleTLSOptions struct {
type Ja3erResp struct {
Ja3Hash string `json:"ja3_hash"`
Ja3 string `json:"ja3"`
UserAgent string `json:"User-Agent"`
AkamaiHash string `json:"akamai_hash"`
Akamai string `json:"akamai"`
}

var CycleTLSResults = []CycleTLSOptions{
Expand Down Expand Up @@ -85,7 +86,7 @@ func TestHTTP2(t *testing.T) {
client := cycletls.Init()
for _, options := range CycleTLSResults {

response, err := client.Do("https://ja3er.com/json", cycletls.Options{
response, err := client.Do("https://tls.peet.ws/api/clean", cycletls.Options{
Ja3: options.Ja3,
UserAgent: options.UserAgent,
}, "GET")
Expand All @@ -111,9 +112,6 @@ func TestHTTP2(t *testing.T) {
if ja3resp.Ja3 != options.Ja3 {
t.Fatal("Expected:", options.Ja3, "Got:", ja3resp.Ja3, "for Ja3")
}
if ja3resp.UserAgent != options.UserAgent {
t.Fatal("Expected:", options.UserAgent, "Got:", ja3resp.UserAgent, "for UserAgent")
}

}

Expand Down
6 changes: 4 additions & 2 deletions cycletls/tests/integration/proxy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@ func TestProxySuccess(t *testing.T) {
},
}, "GET")
if err != nil {
log.Print("Request Failed: " + err.Error())
t.Fatalf("Request Failed: " + err.Error())
}
if resp.Status != 200 {
t.Fatalf("Expected %d Got %d for Status", 200, resp.Status)
}
log.Print("Status: " + strconv.Itoa(resp.Status))
log.Print("Body: " + resp.Body)
}

Expand Down
4 changes: 2 additions & 2 deletions docs/WIP/WIP.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const initCycleTLS = require('cycletls');
(async () => {
const cycleTLS = await initCycleTLS();

const response = cycleTLS('https://ja3er.com/json', {
const response = cycleTLS('https://tls.peet.ws/api/clean', {
body: '',
ja3: '771,4865-4867-4866-49195-49199-52393-52392-49196-49200-49162-49161-49171-49172-51-57-47-53-10,0-23-65281-10-11-35-16-5-51-43-13-45-28-21,29-23-24-25-256-257,0',
userAgent: 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:87.0) Gecko/20100101 Firefox/87.0',
Expand Down Expand Up @@ -111,7 +111,7 @@ func main() {

client := cycletls.Init()

response, err := client.Do("https://ja3er.com/json", cycletls.Options{
response, err := client.Do("https://tls.peet.ws/api/clean", cycletls.Options{
Body : "",
Ja3: "771,4865-4867-4866-49195-49199-52393-52392-49196-49200-49162-49161-49171-49172-51-57-47-53-10,0-23-65281-10-11-35-16-5-51-43-13-45-28-21,29-23-24-25-256-257,0",
UserAgent: "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:87.0) Gecko/20100101 Firefox/87.0",
Expand Down
2 changes: 1 addition & 1 deletion tests/golang/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func main() {
log.Println("Execution Time: ", time.Since(start))
}()
client := cycletls.Init()
response, err := client.Do("https://ja3er.com/json", cycletls.Options{
response, err := client.Do("https://tls.peet.ws/api/clean", cycletls.Options{
Body: "",
Ja3: "771,4865-4867-4866-49195-49199-52393-52392-49196-49200-49162-49161-49171-49172-51-57-47-53-10,0-23-65281-10-11-35-16-5-51-43-13-45-28-21,29-23-24-25-256-257,0",
UserAgent: "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:87.0) Gecko/20100101 Firefox/87.0",
Expand Down
2 changes: 1 addition & 1 deletion tests/golang/test_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func main() {

go func() {
for i := 0; i < reqs; i++ {
client.Queue("https://ja3er.com/json", cycletls.Options{
client.Queue("https://tls.peet.ws/api/clean", cycletls.Options{
Body: "",
Ja3: "771,4865-4867-4866-49195-49199-52393-52392-49196-49200-49162-49161-49171-49172-156-157-47-53-10,0-23-65281-10-11-35-16-5-51-43-13-45-28-21,29-23-24-25-256-257,0",
UserAgent: "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:87.0) Gecko/20100101 Firefox/87.0",
Expand Down
2 changes: 1 addition & 1 deletion tests/multipleImports.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import initCycleTLS from "../dist/index.js";

test("Test Multiple Imports, should return 200", async () => {
const url = "https://ja3er.com/json";
const url = "https://tls.peet.ws/api/clean";
const options = {
body: "",
ja3: "771,4865-4867-4866-49195-49199-52393-52392-49196-49200-49162-49161-49171-49172-51-57-47-53-10,0-23-65281-10-11-35-16-5-51-43-13-45-28-21,29-23-24-25-256-257,0",
Expand Down
2 changes: 1 addition & 1 deletion tests/simple.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const initCycleTLS = require("../dist/index.js");
test("Should Return 200", async () => {
const cycleTLS = await initCycleTLS({ port: 9118 });

const response = cycleTLS.get("https://ja3er.com/json", {
const response = cycleTLS.get("https://tls.peet.ws/api/clean", {
body: "",
ja3: "771,4865-4867-4866-49195-49199-52393-52392-49196-49200-49162-49161-49171-49172-51-57-47-53-10,0-23-65281-10-11-35-16-5-51-43-13-45-28-21,29-23-24-25-256-257,0",
userAgent:
Expand Down

0 comments on commit 009b00b

Please sign in to comment.