Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
L
lcc-akm
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangmingming
lcc-akm
Commits
901eaba5
Commit
901eaba5
authored
Mar 15, 2023
by
王明明
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vy 转换测试
parent
5b15f433
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
test.go
src/test/test.go
+12
-12
No files found.
src/test/test.go
View file @
901eaba5
...
@@ -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://u
nfflcc:76cc14-47b8dd-1f8ace-827836-0c740e@usa.rotating.proxyrack.net:6521
\"}"))
//"application/json", strings.NewReader("{\"type\": \"u2\", \"proxy\": \"http://u
ser-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
())
test
U2Data
(
body
)
test
VY
(
body
)
}
}
func
main
()
{
func
main
()
{
for
i
:=
0
;
i
<
1
;
i
++
{
for
i
:=
0
;
i
<
1
0
;
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
test
U2Data
(
data
[]
byte
)
{
func
test
VY
(
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/"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment