1
0
mirror of https://github.com/fumiama/terasu-cloudflared.git synced 2026-06-07 19:40:30 +08:00

feat: embed terasu inside

This commit is contained in:
源文雨
2025-12-21 16:51:38 +08:00
parent 0d2a7a0385
commit f99b9330df
23 changed files with 1195 additions and 18 deletions

View File

@@ -17,6 +17,8 @@ import (
"net/url"
"strings"
"time"
"github.com/fumiama/terasu"
)
// ErrBadHandshake is returned when the server response to opening handshake is
@@ -340,7 +342,7 @@ func (d *Dialer) DialContext(ctx context.Context, urlStr string, requestHeader h
if cfg.ServerName == "" {
cfg.ServerName = hostNoPort
}
tlsConn := tls.Client(netConn, cfg)
tlsConn := tls.Client(terasu.NewConn(netConn), cfg)
netConn = tlsConn
if trace != nil && trace.TLSHandshakeStart != nil {