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
6ee9a569
Commit
6ee9a569
authored
Aug 12, 2024
by
wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cronet
parent
ea8525b9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletion
+12
-1
client.go
tls/client.go
+11
-1
tls.go
tls/tls.go
+1
-0
No files found.
tls/client.go
View file @
6ee9a569
...
...
@@ -5,6 +5,7 @@ import (
"compress/flate"
"compress/gzip"
"crypto/rand"
"encoding/base64"
"encoding/binary"
"errors"
"github.com/andybalholm/brotli"
...
...
@@ -69,7 +70,16 @@ func (c *Client) Start() error {
}
else
if
strings
.
ToUpper
(
c
.
Item
.
Method
)
==
http
.
MethodOptions
{
req
,
err
=
http
.
NewRequest
(
http
.
MethodOptions
,
c
.
Item
.
Url
,
nil
)
}
else
{
req
,
err
=
http
.
NewRequest
(
http
.
MethodPost
,
c
.
Item
.
Url
,
strings
.
NewReader
(
c
.
Item
.
Data
))
if
c
.
Item
.
IsBinary
{
bys
,
err
:=
base64
.
StdEncoding
.
DecodeString
(
c
.
Item
.
Data
)
if
err
!=
nil
{
return
err
}
req
,
err
=
http
.
NewRequest
(
http
.
MethodPost
,
c
.
Item
.
Url
,
bytes
.
NewReader
(
bys
))
}
else
{
req
,
err
=
http
.
NewRequest
(
http
.
MethodPost
,
c
.
Item
.
Url
,
strings
.
NewReader
(
c
.
Item
.
Data
))
}
}
if
err
!=
nil
{
logrus
.
Error
(
"url初始化失败 "
,
err
.
Error
())
...
...
tls/tls.go
View file @
6ee9a569
...
...
@@ -18,6 +18,7 @@ type ForwardItem struct {
Verify
bool
`json:"verify,omitempty"`
Debug
bool
`json:"debug"`
RandomTls
bool
`json:"random_tls"`
IsBinary
bool
`json:"is_binary"`
}
func
ForwardIOS
(
c
*
gin
.
Context
)
{
...
...
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