@@ -17,43 +17,40 @@ func TestProxySuccess(t *testing.T) {
1717 return
1818 }
1919 client := cycletls .Init ()
20- resp , err := client .Do ("https://ipinfo.io/json " , cycletls.Options {
20+ resp , err := client .Do ("https://httpbin.org/ip " , cycletls.Options {
2121 Body : "" ,
22- 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" ,
23- UserAgent : "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:87.0) Gecko/20100101 Firefox/87.0" ,
24- Proxy :
"socks5://abc:[email protected] :1087" ,
25- Headers : map [string ]string {
26- "Accept" : "Application/json, text/plain, */*" ,
27- },
22+ Ja3 : "771,4865-4866-4867-49195-49199-49196-49200-52393-52392-49171-49172-156-157-47-53,0-23-65281-10-11-35-16-5-13-18-51-45-43-27-17513,29-23-24,0" ,
23+ UserAgent : "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36" ,
24+ Proxy : "socks5://127.0.0.1:9050" ,
2825 }, "GET" )
2926 if err != nil {
3027 t .Fatalf ("Request Failed: " + err .Error ())
3128 }
3229 if resp .Status != 200 {
3330 t .Fatalf ("Expected %d Got %d for Status" , 200 , resp .Status )
3431 }
32+ log .Print ("Body: " + resp .Body )
3533}
3634func TestSocks4Proxy (t * testing.T ) {
3735 if runtime .GOOS != "linux" {
3836 t .Skip ("Skipping this test on non-linux platforms" )
3937 return
4038 }
4139 client := cycletls .Init ()
42- resp , err := client .Do ("https://ipinfo.io/json " , cycletls.Options {
40+ resp , err := client .Do ("https://httpbin.org/ip " , cycletls.Options {
4341 Body : "" ,
44- 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" ,
45- UserAgent : "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:87.0) Gecko/20100101 Firefox/87.0" ,
46- Proxy :
"socks4://abc:[email protected] :9050" ,
47- Headers : map [string ]string {
48- "Accept" : "Application/json, text/plain, */*" ,
49- },
42+ Ja3 : "771,4865-4866-4867-49195-49199-49196-49200-52393-52392-49171-49172-156-157-47-53,0-23-65281-10-11-35-16-5-13-18-51-45-43-27-17513,29-23-24,0" ,
43+ UserAgent : "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36" ,
44+ Proxy : "socks4://127.0.0.1:9050" ,
5045 }, "GET" )
5146 if err != nil {
5247 t .Fatalf ("Request Failed: " + err .Error ())
5348 }
5449 if resp .Status != 200 {
5550 t .Fatalf ("Expected %d Got %d for Status" , 200 , resp .Status )
5651 }
52+ log .Print ("Body: " + resp .Body )
53+
5754}
5855
5956func TestSocks5hProxy (t * testing.T ) {
@@ -64,12 +61,9 @@ func TestSocks5hProxy(t *testing.T) {
6461 client := cycletls .Init ()
6562 resp , err := client .Do ("https://httpbin.org/ip" , cycletls.Options {
6663 Body : "" ,
67- 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" ,
68- UserAgent : "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:87.0) Gecko/20100101 Firefox/87.0 " ,
64+ Ja3 : "771,4865-4866-4867- 49195-49199-49196-49200-52393-52392 -49171-49172-156-157 -47-53,0-23-65281-10-11-35-16-5-13-18-51 -45-43-27-17513 ,29-23-24,0" ,
65+ UserAgent : "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36 " ,
6966 Proxy : "socks5h://127.0.0.1:9050" ,
70- Headers : map [string ]string {
71- "Accept" : "Application/json, text/plain, */*" ,
72- },
7367 }, "GET" )
7468 if err != nil {
7569 t .Fatalf ("Request Failed: " + err .Error ())
0 commit comments