MCPcopy
hub / github.com/cloudflare/cloudflared / TestUnsupportedBind

Function TestUnsupportedBind

socks/request_handler_test.go:12–20  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

10)
11
12func TestUnsupportedBind(t *testing.T) {
13 req := createRequest(t, socks5Version, bindCommand, "2001:db8::68", 1337, false)
14 var b bytes.Buffer
15
16 requestHandler := NewRequestHandler(NewNetDialer(), nil)
17 err := requestHandler.Handle(req, &b)
18 assert.NoError(t, err)
19 assert.True(t, b.Bytes()[1] == commandNotSupported, "expected a response")
20}
21
22func TestUnsupportedAssociate(t *testing.T) {
23 req := createRequest(t, socks5Version, associateCommand, "127.0.0.1", 1337, false)

Callers

nothing calls this directly

Calls 5

HandleMethod · 0.95
createRequestFunction · 0.85
NewRequestHandlerFunction · 0.85
NewNetDialerFunction · 0.85
BytesMethod · 0.80

Tested by

no test coverage detected