1
0
mirror of https://github.com/fumiama/terasu.git synced 2026-06-08 12:00:31 +08:00
Files
terasu/dns/tls.go
2026-02-16 15:20:45 +08:00

20 lines
555 B
Go

package dns
import (
"context"
"crypto/tls"
"net"
mtls "github.com/fumiama/terasu/tls"
)
// DialTLSContext fills http.Transport method with terasu and DNS
func DialTLSContext(ctx context.Context, network, addr string) (net.Conn, error) {
return DialTLSContextWithConfig(ctx, network, addr, nil)
}
// DialTLSContextWithConfig fills http2.Transport method with terasu and DNS
func DialTLSContextWithConfig(ctx context.Context, network, addr string, cfg *tls.Config) (net.Conn, error) {
return mtls.DialTLSContextCL(ctx, network, addr, cfg, nil)
}