mirror of
https://github.com/fumiama/terasu-cloudflared.git
synced 2026-06-20 02:30:27 +08:00
feat: embed terasu inside
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"net"
|
||||
"time"
|
||||
|
||||
"github.com/fumiama/terasu"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
@@ -30,7 +31,7 @@ func DialEdge(
|
||||
return nil, newDialError(err, "DialContext error")
|
||||
}
|
||||
|
||||
tlsEdgeConn := tls.Client(edgeConn, tlsConfig)
|
||||
tlsEdgeConn := tls.Client(terasu.NewConn(edgeConn), tlsConfig)
|
||||
tlsEdgeConn.SetDeadline(time.Now().Add(timeout))
|
||||
|
||||
if err = tlsEdgeConn.Handshake(); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user