Add support for kTLS

Reference: https://gitlab.com/go-extension/tls
This commit is contained in:
世界
2025-09-07 21:03:32 +08:00
parent f84129ca79
commit 107f92381b
59 changed files with 2682 additions and 222 deletions

View File

@@ -129,7 +129,7 @@ func (t *Transport) updateTransports(link *TransportLink) error {
return os.ErrInvalid
}
if link.dnsOverTLS {
tlsConfig := common.Must1(tls.NewClient(t.ctx, serverAddr.String(), option.OutboundTLSOptions{
tlsConfig := common.Must1(tls.NewClient(t.ctx, t.logger, serverAddr.String(), option.OutboundTLSOptions{
Enabled: true,
ServerName: serverAddr.String(),
}))
@@ -151,7 +151,7 @@ func (t *Transport) updateTransports(link *TransportLink) error {
} else {
serverName = serverAddr.String()
}
tlsConfig := common.Must1(tls.NewClient(t.ctx, serverAddr.String(), option.OutboundTLSOptions{
tlsConfig := common.Must1(tls.NewClient(t.ctx, t.logger, serverAddr.String(), option.OutboundTLSOptions{
Enabled: true,
ServerName: serverName,
}))