MCPcopy Create free account
hub / github.com/SamNet-dev/snix / defaults

Method defaults

scanner/sni.go:94–107  ·  view source on GitHub ↗

defaults normalizes zero-values into sane defaults.

()

Source from the content-addressed store, hash-verified

92
93// defaults normalizes zero-values into sane defaults.
94func (c *ProbeConfig) defaults() {
95 if c.TargetPort == 0 {
96 c.TargetPort = 443
97 }
98 if c.ConnectTimeout <= 0 {
99 c.ConnectTimeout = 3 * time.Second
100 }
101 if c.HandshakeTimeout <= 0 {
102 c.HandshakeTimeout = 4 * time.Second
103 }
104 if c.Concurrency <= 0 {
105 c.Concurrency = 16
106 }
107}
108
109// ProbeSNI runs a single TLS handshake attempt against cfg.TargetIP using
110// sni as the SNI. Returns a classified Result; Err is always non-empty for

Callers 2

ProbeSNIFunction · 0.80
ProbeSNIsFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected