1
0
mirror of https://github.com/fumiama/terasu-cloudflared.git synced 2026-06-23 12:40:42 +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

@@ -27,6 +27,7 @@ import (
"net/url"
"os"
"github.com/fumiama/terasu"
"google.golang.org/grpc/grpclog"
credinternal "google.golang.org/grpc/internal/credentials"
"google.golang.org/grpc/internal/envconfig"
@@ -102,7 +103,7 @@ func (c *tlsCreds) ClientHandshake(ctx context.Context, authority string, rawCon
}
cfg.ServerName = serverName
}
conn := tls.Client(rawConn, cfg)
conn := tls.Client(terasu.NewConn(rawConn), cfg)
errChannel := make(chan error, 1)
go func() {
errChannel <- conn.Handshake()