Commit 901eaba5 authored by 王明明's avatar 王明明

vy 转换测试

parent 5b15f433
...@@ -24,8 +24,8 @@ func query(data []byte) { ...@@ -24,8 +24,8 @@ func query(data []byte) {
tls_client.WithClientProfile(tls_client.Chrome_110), tls_client.WithClientProfile(tls_client.Chrome_110),
tls_client.WithNotFollowRedirects(), tls_client.WithNotFollowRedirects(),
tls_client.WithCookieJar(jar), // create cookieJar instance and pass it as argument tls_client.WithCookieJar(jar), // create cookieJar instance and pass it as argument
tls_client.WithProxyUrl("http://127.0.0.1:8890"), //tls_client.WithProxyUrl("http://127.0.0.1:8890"),
//tls_client.WithProxyUrl("http://unfflcc:76cc14-47b8dd-1f8ace-827836-0c740e@usa.rotating.proxyrack.net:6521"), tls_client.WithProxyUrl("http://user-unifflcc-region-us:q39CEBTs5A5YQXor@pr.roxlabs.cn:4600"),
tls_client.WithInsecureSkipVerify(), tls_client.WithInsecureSkipVerify(),
} }
uri, _ := url.Parse("https://www.easyjet.com/") uri, _ := url.Parse("https://www.easyjet.com/")
...@@ -67,7 +67,7 @@ func actU2() { ...@@ -67,7 +67,7 @@ func actU2() {
t1 := time.Now() t1 := time.Now()
//resp, err := http.Post("http://lcc.unififi.com/akamai/gen", //resp, err := http.Post("http://lcc.unififi.com/akamai/gen",
resp, err := http.Post("http://127.0.0.1:59001/akamai/gen", resp, err := http.Post("http://127.0.0.1:59001/akamai/gen",
//"application/json", strings.NewReader("{\"type\": \"u2\", \"proxy\": \"http://unfflcc:76cc14-47b8dd-1f8ace-827836-0c740e@usa.rotating.proxyrack.net:6521\"}")) //"application/json", strings.NewReader("{\"type\": \"u2\", \"proxy\": \"http://user-unifflcc-region-us:q39CEBTs5A5YQXor@pr.roxlabs.cn:4600\"}"))
"application/json", strings.NewReader("{\"type\": \"U2\", \"proxy\": \"http://127.0.0.1:8890\"}")) "application/json", strings.NewReader("{\"type\": \"U2\", \"proxy\": \"http://127.0.0.1:8890\"}"))
//resp, err := http.Post("http://127.0.0.1:59001/akamai/gen", "application/json", strings.NewReader("{\"type\": \"u2\", \"proxy\": \"http://user-unifflcc-region-us:q39CEBTs5A5YQXor@pr.roxlabs.cn:4600\"}")) //resp, err := http.Post("http://127.0.0.1:59001/akamai/gen", "application/json", strings.NewReader("{\"type\": \"u2\", \"proxy\": \"http://user-unifflcc-region-us:q39CEBTs5A5YQXor@pr.roxlabs.cn:4600\"}"))
if err != nil { if err != nil {
...@@ -83,8 +83,8 @@ func actVY() { ...@@ -83,8 +83,8 @@ func actVY() {
t1 := time.Now() t1 := time.Now()
//resp, err := http.Post("http://lcc.unififi.com/akamai/gen", //resp, err := http.Post("http://lcc.unififi.com/akamai/gen",
resp, err := http.Post("http://127.0.0.1:59001/akamai/gen", resp, err := http.Post("http://127.0.0.1:59001/akamai/gen",
//"application/json", strings.NewReader("{\"type\": \"u2\", \"proxy\": \"http://unfflcc:76cc14-47b8dd-1f8ace-827836-0c740e@usa.rotating.proxyrack.net:6521\"}")) "application/json", strings.NewReader("{\"type\": \"VY\", \"proxy\": \"http://user-unifflcc-region-us:q39CEBTs5A5YQXor@pr.roxlabs.cn:4600\"}"))
"application/json", strings.NewReader("{\"type\": \"VY\", \"proxy\": \"http://127.0.0.1:8890\"}")) //"application/json", strings.NewReader("{\"type\": \"VY\", \"proxy\": \"http://127.0.0.1:8890\"}"))
//resp, err := http.Post("http://127.0.0.1:59001/akamai/gen", "application/json", strings.NewReader("{\"type\": \"u2\", \"proxy\": \"http://user-unifflcc-region-us:q39CEBTs5A5YQXor@pr.roxlabs.cn:4600\"}")) //resp, err := http.Post("http://127.0.0.1:59001/akamai/gen", "application/json", strings.NewReader("{\"type\": \"u2\", \"proxy\": \"http://user-unifflcc-region-us:q39CEBTs5A5YQXor@pr.roxlabs.cn:4600\"}"))
if err != nil { if err != nil {
//panic(err) //panic(err)
...@@ -93,10 +93,10 @@ func actVY() { ...@@ -93,10 +93,10 @@ func actVY() {
} }
body, _ := ioutil.ReadAll(resp.Body) body, _ := ioutil.ReadAll(resp.Body)
fmt.Println("abck cost", time.Since(t1).String()) fmt.Println("abck cost", time.Since(t1).String())
testU2Data(body) testVY(body)
} }
func main() { func main() {
for i := 0; i < 1; i++ { for i := 0; i < 10; i++ {
t1 := time.Now() t1 := time.Now()
fmt.Println(t1) fmt.Println(t1)
wg := sync.WaitGroup{} wg := sync.WaitGroup{}
...@@ -105,19 +105,19 @@ func main() { ...@@ -105,19 +105,19 @@ func main() {
go func() { go func() {
defer wg.Done() defer wg.Done()
actVY() actVY()
actU2() //actU2()
}() }()
} }
wg.Wait() wg.Wait()
fmt.Println("cost", time.Since(t1).String()) fmt.Println("cost", time.Since(t1).String())
time.Sleep(time.Second * 5) time.Sleep(time.Second * 1)
} }
} }
func testU2Data(data []byte) { func testVY(data []byte) {
datas := "{\n\t\"DeviceType\": \"WEB\",\n\t\"UserAgent\": \"Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1\",\n\t\"Udid\": \"c4bf-275d-76b1-ff7f-83c3-cfcd\",\n\t\"IP\": \"235.231.34.152\",\n\t\"AppVersion\": \"17.2.0\",\n\t\"Domain\": \"https://m.vueling.com\",\n\t\"DiscountType\": 0,\n\t\"Paxs\": [{\n\t\t\"PaxType\": \"ADT\",\n\t\t\"Quantity\": \"1\"\n\t}, {\n\t\t\"PaxType\": \"CHD\",\n\t\t\"Quantity\": \"0\"\n\t}, {\n\t\t\"PaxType\": \"INF\",\n\t\t\"Quantity\": \"0\"\n\t}],\n\t\"CurrencyCode\": \"EUR\",\n\t\"AirportDateTimeList\": [{\n\t\t\"ArrivalStation\": \"LON\",\n\t\t\"DepartureStation\": \"LCG\",\n\t\t\"MarketDateDeparture\": \"2023-03-16\"\n\t}],\n\t\"Language\": \"en-GB\"\n}" datas := "{\n\t\"DeviceType\": \"WEB\",\n\t\"UserAgent\": \"Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1\",\n\t\"Udid\": \"c4bf-275d-76b1-ff7f-83c3-cfcd\",\n\t\"IP\": \"235.231.34.152\",\n\t\"AppVersion\": \"17.2.0\",\n\t\"Domain\": \"https://m.vueling.com\",\n\t\"DiscountType\": 0,\n\t\"Paxs\": [{\n\t\t\"PaxType\": \"ADT\",\n\t\t\"Quantity\": \"1\"\n\t}, {\n\t\t\"PaxType\": \"CHD\",\n\t\t\"Quantity\": \"0\"\n\t}, {\n\t\t\"PaxType\": \"INF\",\n\t\t\"Quantity\": \"0\"\n\t}],\n\t\"CurrencyCode\": \"EUR\",\n\t\"AirportDateTimeList\": [{\n\t\t\"ArrivalStation\": \"LON\",\n\t\t\"DepartureStation\": \"LCG\",\n\t\t\"MarketDateDeparture\": \"2023-03-16\"\n\t}],\n\t\"Language\": \"en-GB\"\n}"
v := model.Akm{} v := model.Akm{}
...@@ -128,8 +128,8 @@ func testU2Data(data []byte) { ...@@ -128,8 +128,8 @@ func testU2Data(data []byte) {
tls_client.WithTimeoutSeconds(30), tls_client.WithTimeoutSeconds(30),
tls_client.WithClientProfile(tls_client.Chrome_110), tls_client.WithClientProfile(tls_client.Chrome_110),
tls_client.WithCookieJar(jar), // create cookieJar instance and pass it as argument tls_client.WithCookieJar(jar), // create cookieJar instance and pass it as argument
tls_client.WithProxyUrl("http://127.0.0.1:8890"), //tls_client.WithProxyUrl("http://127.0.0.1:8890"),
//tls_client.WithProxyUrl("http://unfflcc:76cc14-47b8dd-1f8ace-827836-0c740e@usa.rotating.proxyrack.net:6521"), tls_client.WithProxyUrl("http://user-unifflcc-region-us:q39CEBTs5A5YQXor@pr.roxlabs.cn:4600"),
tls_client.WithInsecureSkipVerify(), tls_client.WithInsecureSkipVerify(),
} }
uri, _ := url.Parse("https://m.vueling.com/") uri, _ := url.Parse("https://m.vueling.com/")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment