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
56c4bb9d
Commit
56c4bb9d
authored
May 24, 2023
by
wangmingming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
11
parent
5820c47a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
client.go
tls/client.go
+5
-3
tls.go
tls/tls.go
+1
-0
No files found.
tls/client.go
View file @
56c4bb9d
...
...
@@ -57,7 +57,6 @@ func (c *Client) Start() error {
}
if
err
!=
nil
{
logrus
.
Error
(
"url初始化失败 "
,
err
.
Error
())
return
err
}
for
k
,
v
:=
range
c
.
Item
.
Headers
{
...
...
@@ -66,7 +65,6 @@ func (c *Client) Start() error {
resp
,
err
:=
c
.
Client
.
Do
(
req
)
if
err
!=
nil
{
logrus
.
Error
(
"请求失败 "
,
err
.
Error
())
return
err
}
c
.
Response
=
resp
...
...
@@ -138,7 +136,11 @@ func NewClient(forWard ForwardItem, ios bool) (Client, error) {
//tls_client.WithRandomTLSExtensionOrder(),
//tls_client.WithProxyUrl("http://user:pass@host:port"),
}
client
,
err
:=
tls_client
.
NewHttpClient
(
tls_client
.
NewNoopLogger
(),
options
...
)
logger
:=
tls_client
.
NewLogger
()
if
forWard
.
Debug
{
logger
=
tls_client
.
NewDebugLogger
(
tls_client
.
NewNoopLogger
())
}
client
,
err
:=
tls_client
.
NewHttpClient
(
logger
,
options
...
)
client
.
SetFollowRedirect
(
forWard
.
AllowRedirects
)
if
err
!=
nil
{
return
Client
{},
err
...
...
tls/tls.go
View file @
56c4bb9d
...
...
@@ -15,6 +15,7 @@ type ForwardItem struct {
Timeout
int
`json:"timeout,omitempty"`
AllowRedirects
bool
`json:"allow_redirects,omitempty"`
Verify
bool
`json:"verify,omitempty"`
Debug
bool
`json:"debug"`
}
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