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)
| 42 | // resolution. Use config.ServerName to send SNI and validate the name in the |
| 43 | // cert. |
| 44 | func 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 | |
| 53 | func probeTLS(ctx context.Context, config *tls.Config, dialHostPort string) error { |
| 54 | dialer := &tls.Dialer{Config: config} |
searching dependent graphs…