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
d1dd4f2b
Commit
d1dd4f2b
authored
Mar 09, 2023
by
王明明
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
超时处理
parent
d8fe0a64
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
8 deletions
+7
-8
easyjet.go
model/easyjet.go
+1
-1
test.go
test/test.go
+6
-7
No files found.
model/easyjet.go
View file @
d1dd4f2b
...
...
@@ -66,7 +66,7 @@ func (c *AkmClient) PostJson(times int, url, data string) (int, error) {
"user-agent"
,
},
}
for
i
:=
0
;
i
<
3
;
i
++
{
for
i
:=
0
;
i
<
1
;
i
++
{
startTime
:=
time
.
Now
()
response
,
err
:=
c
.
Client
.
Do
(
req
)
if
err
!=
nil
{
...
...
test/test.go
View file @
d1dd4f2b
...
...
@@ -5,7 +5,6 @@ import (
"fmt"
http
"github.com/bogdanfinn/fhttp"
tls_client
"github.com/bogdanfinn/tls-client"
"io"
"io/ioutil"
"net/url"
"strings"
...
...
@@ -25,8 +24,8 @@ func query(data []byte) {
tls_client
.
WithClientProfile
(
tls_client
.
Chrome_110
),
tls_client
.
WithNotFollowRedirects
(),
tls_client
.
WithCookieJar
(
jar
),
// create cookieJar instance and pass it as argument
//
tls_client.WithProxyUrl("http://user-unifflcc-region-us:q39CEBTs5A5YQXor@pr.roxlabs.cn:4600"),
tls_client
.
WithProxyUrl
(
"http://127.0.0.1:8888"
),
tls_client
.
WithProxyUrl
(
"http://user-unifflcc-region-us:q39CEBTs5A5YQXor@pr.roxlabs.cn:4600"
),
//
tls_client.WithProxyUrl("http://127.0.0.1:8888"),
tls_client
.
WithInsecureSkipVerify
(),
}
uri
,
_
:=
url
.
Parse
(
"https://www.easyjet.com/"
)
...
...
@@ -60,8 +59,8 @@ func query(data []byte) {
}
defer
resp
.
Body
.
Close
()
fmt
.
Println
(
"响应结果"
,
resp
.
StatusCode
)
readBytes
,
_
:=
io
.
ReadAll
(
resp
.
Body
)
fmt
.
Println
(
string
(
readBytes
))
//
readBytes, _ := io.ReadAll(resp.Body)
//
fmt.Println(string(readBytes))
}
func
main
()
{
...
...
@@ -69,7 +68,7 @@ func main() {
t1
:=
time
.
Now
()
fmt
.
Println
(
t1
)
wg
:=
sync
.
WaitGroup
{}
for
i
:=
0
;
i
<
1
;
i
++
{
for
i
:=
0
;
i
<
1
0
;
i
++
{
wg
.
Add
(
1
)
go
func
()
{
defer
wg
.
Done
()
...
...
@@ -78,7 +77,7 @@ func main() {
//resp, err := http.Get("http://127.0.0.1:9999/ping")
//resp, err := http.Post("http://lcc.unififi.com/proxy/get-proxy", "application/json", strings.NewReader("{\n \"name\": \"NK\",\n \"type\": \"shopping\"\n}"))
t1
:=
time
.
Now
()
resp
,
err
:=
http
.
Post
(
"http://127.0.0.1:19999/akamai/gen"
,
"application/json"
,
strings
.
NewReader
(
"{
\"
type
\"
:
\"
u2
\"
,
\"
proxy
\"
:
\"
http://
127.0.0.1:8888
\"
}"
))
resp
,
err
:=
http
.
Post
(
"http://127.0.0.1:19999/akamai/gen"
,
"application/json"
,
strings
.
NewReader
(
"{
\"
type
\"
:
\"
u2
\"
,
\"
proxy
\"
:
\"
http://
user-unifflcc-region-us:q39CEBTs5A5YQXor@pr.roxlabs.cn:4600
\"
}"
))
if
err
!=
nil
{
//panic(err)
fmt
.
Println
(
err
)
...
...
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