Commit 1730ab23 authored by wang's avatar wang

每次请求后关闭连接

parent e08009a6
...@@ -155,7 +155,9 @@ func NewClient(forWard ForwardItem, ios bool) (Client, error) { ...@@ -155,7 +155,9 @@ func NewClient(forWard ForwardItem, ios bool) (Client, error) {
//tls_client.WithProxyUrl("http://user:pass@host:port"), //tls_client.WithProxyUrl("http://user:pass@host:port"),
tls_client.WithInsecureSkipVerify(), tls_client.WithInsecureSkipVerify(),
} }
if forWard.RandomTls {
options = append(options, tls_client.WithRandomTLSExtensionOrder())
}
logger := tls_client.NewNoopLogger() logger := tls_client.NewNoopLogger()
if forWard.Debug { if forWard.Debug {
logger = tls_client.NewDebugLogger(tls_client.NewDebugLogger(tls_client.NewLogger())) logger = tls_client.NewDebugLogger(tls_client.NewDebugLogger(tls_client.NewLogger()))
......
...@@ -17,6 +17,7 @@ type ForwardItem struct { ...@@ -17,6 +17,7 @@ type ForwardItem struct {
AllowRedirects bool `json:"allow_redirects,omitempty"` AllowRedirects bool `json:"allow_redirects,omitempty"`
Verify bool `json:"verify,omitempty"` Verify bool `json:"verify,omitempty"`
Debug bool `json:"debug"` Debug bool `json:"debug"`
RandomTls bool `json:"random_tls"`
} }
func ForwardIOS(c *gin.Context) { func ForwardIOS(c *gin.Context) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment