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

Function hostPort

scanner/sni_test.go:52–63  ·  view source on GitHub ↗
(t *testing.T, addr string)

Source from the content-addressed store, hash-verified

50}
51
52func hostPort(t *testing.T, addr string) (netip.Addr, uint16) {
53 t.Helper()
54 host, port, err := net.SplitHostPort(addr)
55 if err != nil {
56 t.Fatal(err)
57 }
58 ap, err := netip.ParseAddrPort(net.JoinHostPort(host, port))
59 if err != nil {
60 t.Fatal(err)
61 }
62 return ap.Addr(), ap.Port()
63}
64
65func TestProbeSNISuccess(t *testing.T) {
66 addr, stop := tlsTestServer(t)

Callers 2

TestProbeSNISuccessFunction · 0.85
TestProbeSNIsConcurrentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected