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

Function TestControlHTTP

control/controlhttp/http_test.go:56–146  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

54}
55
56func TestControlHTTP(t *testing.T) {
57 tests := []httpTestParam{
58 // direct connection
59 {
60 name: "no_proxy",
61 proxy: nil,
62 },
63 // direct connection but port 80 is MITM'ed and broken
64 {
65 name: "port80_broken_mitm",
66 proxy: nil,
67 makeHTTPHangAfterUpgrade: true,
68 },
69 // SOCKS5
70 {
71 name: "socks5",
72 proxy: &socksProxy{},
73 },
74 // HTTP->HTTP
75 {
76 name: "http_to_http",
77 proxy: &httpProxy{
78 useTLS: false,
79 allowConnect: false,
80 allowHTTP: true,
81 },
82 },
83 // HTTP->HTTPS
84 {
85 name: "http_to_https",
86 proxy: &httpProxy{
87 useTLS: false,
88 allowConnect: true,
89 allowHTTP: false,
90 },
91 },
92 // HTTP->any (will pick HTTP)
93 {
94 name: "http_to_any",
95 proxy: &httpProxy{
96 useTLS: false,
97 allowConnect: true,
98 allowHTTP: true,
99 },
100 },
101 // HTTPS->HTTP
102 {
103 name: "https_to_http",
104 proxy: &httpProxy{
105 useTLS: true,
106 allowConnect: false,
107 allowHTTP: true,
108 },
109 },
110 // HTTPS->HTTPS
111 {
112 name: "https_to_https",
113 proxy: &httpProxy{

Callers

nothing calls this directly

Calls 2

testControlHTTPFunction · 0.85
RunMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…