Documentation
¶
Overview ¶
Package proxytest is a small HTTP CONNECT proxy for tests. Every tunnel goes to one backend address, whatever host the client asks for, so a test can use a name like example.com and still reach its own server.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Proxy ¶
type Proxy struct {
URL string // http://127.0.0.1:PORT
// contains filtered or unexported fields
}
Proxy records what it was asked.
func Start ¶
Start runs a proxy that tunnels every CONNECT to backend until the test ends. A status other than 200 refuses every tunnel with it.