MCPcopy Index your code
hub / github.com/tailscale/tailscale / TLSWithIP

Function TLSWithIP

prober/tls.go:44–51  ·  view source on GitHub ↗

TLSWithIP is like TLS, but dials the provided dialAddr instead of using DNS resolution. Use config.ServerName to send SNI and validate the name in the cert.

(dialAddr netip.AddrPort, config *tls.Config)

Source from the content-addressed store, hash-verified

42// resolution. Use config.ServerName to send SNI and validate the name in the
43// cert.
44func TLSWithIP(dialAddr netip.AddrPort, config *tls.Config) ProbeClass {
45 return ProbeClass{
46 Probe: func(ctx context.Context) error {
47 return probeTLS(ctx, config, dialAddr.String())
48 },
49 Class: "tls",
50 }
51}
52
53func probeTLS(ctx context.Context, config *tls.Config, dialHostPort string) error {
54 dialer := &tls.Dialer{Config: config}

Callers 1

ExampleForEachAddrFunction · 0.92

Calls 2

probeTLSFunction · 0.85
StringMethod · 0.65

Tested by 1

ExampleForEachAddrFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…