Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
T
tls-forward
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
tls-forward
Commits
b54e44c9
Commit
b54e44c9
authored
Aug 29, 2024
by
wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cronet
parent
6834237e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
client.go
tls/client.go
+8
-1
No files found.
tls/client.go
View file @
b54e44c9
...
...
@@ -8,6 +8,7 @@ import (
"encoding/base64"
"encoding/binary"
"errors"
"fmt"
"github.com/andybalholm/brotli"
"github.com/bogdanfinn/tls-client/profiles"
"github.com/sirupsen/logrus"
...
...
@@ -54,9 +55,10 @@ func (c *Client) Start() error {
for
_
,
ck
:=
range
cks
{
t
:=
strings
.
Index
(
ck
,
"="
)
if
t
!=
-
1
{
fmt
.
Println
(
ck
[
:
t
],
ck
[
t
+
1
:
],
zhuanyi
(
ck
[
t
+
1
:
]))
cookies
=
append
(
cookies
,
&
http
.
Cookie
{
Name
:
ck
[
:
t
],
Value
:
ck
[
t
+
1
:
]
,
Value
:
zhuanyi
(
ck
[
t
+
1
:
])
,
})
}
...
...
@@ -81,6 +83,7 @@ func (c *Client) Start() error {
req
,
err
=
http
.
NewRequest
(
http
.
MethodPost
,
c
.
Item
.
Url
,
strings
.
NewReader
(
c
.
Item
.
Data
))
}
}
req
.
Method
=
c
.
Item
.
Method
if
err
!=
nil
{
logrus
.
Error
(
"url初始化失败 "
,
err
.
Error
())
return
err
...
...
@@ -99,6 +102,10 @@ func (c *Client) Start() error {
return
nil
}
func
zhuanyi
(
s
string
)
string
{
return
strings
.
ReplaceAll
(
s
,
"
\"
"
,
"
\\\"
"
)
}
func
(
c
*
Client
)
GetResponseHeaders
()
map
[
string
]
string
{
res
:=
make
(
map
[
string
]
string
)
for
k
,
v
:=
range
c
.
Response
.
Header
{
...
...
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