Documentation
¶
Overview ¶
Package proxychaintest provides an in-process HTTP CONNECT forward proxy for tests.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Proxy ¶
type Proxy struct {
*httptest.Server
// Reject, if set, is consulted for each CONNECT; a non-zero status short
// circuits with that status and headers.
Reject func(target string) (int, http.Header)
// Hold, if set, is closed by the test to release a CONNECT that is
// deliberately left unanswered.
Hold chan struct{}
// contains filtered or unexported fields
}
Proxy is an httptest forward proxy: CONNECT is hijacked and piped to the requested authority, plain requests are forwarded absolute-URI style. It records every CONNECT authority and Proxy-Authorization it saw.
Click to show internal directories.
Click to hide internal directories.