From 74248acf4947317cc70f2968eaa530ea743232a0 Mon Sep 17 00:00:00 2001 From: zema1 Date: Mon, 4 Sep 2023 17:56:29 +0800 Subject: [PATCH] feat: allow tls1.0 close #36 --- ctrl/ctrl.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ctrl/ctrl.go b/ctrl/ctrl.go index 8c8265f..387090b 100644 --- a/ctrl/ctrl.go +++ b/ctrl/ctrl.go @@ -46,6 +46,7 @@ func Run(ctx context.Context, config *Suo5Config) error { tr := &http.Transport{ TLSClientConfig: &tls.Config{ + MinVersion: tls.VersionTLS10, InsecureSkipVerify: true, }, DialTLSContext: func(ctx context.Context, network, addr string) (net.Conn, error) { @@ -331,7 +332,10 @@ func newRawClient(upstream string, timeout time.Duration) *rawhttp.Client { AutomaticContentLength: true, ForceReadAllBody: false, TLSHandshake: func(conn net.Conn, addr string, options *rawhttp.Options) (net.Conn, error) { - uTlsConn := utls.UClient(conn, &utls.Config{InsecureSkipVerify: true}, utls.HelloRandomized) + uTlsConn := utls.UClient(conn, &utls.Config{ + InsecureSkipVerify: true, + MinVersion: tls.VersionTLS10, + }, utls.HelloRandomized) if err := uTlsConn.Handshake(); err != nil { return nil, err }