SYMBOL INDEX (417 symbols across 56 files) FILE: actions.go type ReqHandler (line 10) | type ReqHandler interface type FuncReqHandler (line 15) | type FuncReqHandler method Handle (line 18) | func (f FuncReqHandler) Handle(req *http.Request, ctx *ProxyCtx) (*htt... type RespHandler (line 26) | type RespHandler interface type FuncRespHandler (line 31) | type FuncRespHandler method Handle (line 34) | func (f FuncRespHandler) Handle(resp *http.Response, ctx *ProxyCtx) *h... type HttpsHandler (line 47) | type HttpsHandler interface type FuncHttpsHandler (line 52) | type FuncHttpsHandler method HandleConnect (line 55) | func (f FuncHttpsHandler) HandleConnect(host string, ctx *ProxyCtx) (*... FILE: certs.go function init (line 10) | func init() { FILE: ctx.go type ProxyCtx (line 13) | type ProxyCtx struct method RoundTrip (line 47) | func (ctx *ProxyCtx) RoundTrip(req *http.Request) (*http.Response, err... method printf (line 54) | func (ctx *ProxyCtx) printf(msg string, argv ...any) { method Logf (line 66) | func (ctx *ProxyCtx) Logf(msg string, argv ...any) { method Warnf (line 83) | func (ctx *ProxyCtx) Warnf(msg string, argv ...any) { method Charset (line 90) | func (ctx *ProxyCtx) Charset() string { type RoundTripper (line 33) | type RoundTripper interface type CertStorage (line 37) | type CertStorage interface type RoundTripperFunc (line 41) | type RoundTripperFunc method RoundTrip (line 43) | func (f RoundTripperFunc) RoundTrip(req *http.Request, ctx *ProxyCtx) ... FILE: dispatcher.go type ReqCondition (line 14) | type ReqCondition interface type RespCondition (line 22) | type RespCondition interface type ReqConditionFunc (line 27) | type ReqConditionFunc method HandleReq (line 32) | func (c ReqConditionFunc) HandleReq(req *http.Request, ctx *ProxyCtx) ... method HandleResp (line 38) | func (c ReqConditionFunc) HandleResp(resp *http.Response, ctx *ProxyCt... type RespConditionFunc (line 30) | type RespConditionFunc method HandleResp (line 42) | func (c RespConditionFunc) HandleResp(resp *http.Response, ctx *ProxyC... function UrlHasPrefix (line 50) | func UrlHasPrefix(prefix string) ReqConditionFunc { function UrlIs (line 70) | func UrlIs(urls ...string) ReqConditionFunc { function ReqHostMatches (line 84) | func ReqHostMatches(regexps ...*regexp.Regexp) ReqConditionFunc { function ReqHostIs (line 97) | func ReqHostIs(hosts ...string) ReqConditionFunc { function UrlMatches (line 128) | func UrlMatches(re *regexp.Regexp) ReqConditionFunc { function DstHostIs (line 136) | func DstHostIs(host string) ReqConditionFunc { function SrcIpIs (line 161) | func SrcIpIs(ips ...string) ReqCondition { function Not (line 173) | func Not(r ReqCondition) ReqConditionFunc { function ContentTypeIs (line 181) | func ContentTypeIs(typ string, types ...string) RespCondition { function StatusCodeIs (line 199) | func StatusCodeIs(codes ...int) RespCondition { method OnRequest (line 219) | func (proxy *ProxyHttpServer) OnRequest(conds ...ReqCondition) *ReqProxy... type ReqProxyConds (line 226) | type ReqProxyConds struct method DoFunc (line 232) | func (pcond *ReqProxyConds) DoFunc(f func(req *http.Request, ctx *Prox... method Do (line 244) | func (pcond *ReqProxyConds) Do(h ReqHandler) { method HandleConnect (line 268) | func (pcond *ReqProxyConds) HandleConnect(h HttpsHandler) { method HandleConnectFunc (line 293) | func (pcond *ReqProxyConds) HandleConnectFunc(f func(host string, ctx ... method HijackConnect (line 297) | func (pcond *ReqProxyConds) HijackConnect(f func(req *http.Request, cl... type ProxyConds (line 312) | type ProxyConds struct method DoFunc (line 319) | func (pcond *ProxyConds) DoFunc(f func(resp *http.Response, ctx *Proxy... method Do (line 325) | func (pcond *ProxyConds) Do(h RespHandler) { method OnResponse (line 346) | func (proxy *ProxyHttpServer) OnResponse(conds ...RespCondition) *ProxyC... function HandleBytes (line 370) | func HandleBytes(f func(b []byte, ctx *ProxyCtx) []byte) RespHandler { FILE: dispatcher_test.go function TestIsLocalHost (line 13) | func TestIsLocalHost(t *testing.T) { FILE: examples/base/main.go function main (line 11) | func main() { FILE: examples/cascadeproxy-socks/socks5proxyserver/main.go function main (line 11) | func main() { FILE: examples/cascadeproxy-socks/socksproxy.go type SocksAuth (line 13) | type SocksAuth struct function createSocksProxy (line 17) | func createSocksProxy(socksAddr string, auth SocksAuth) func(r *http.Req... function main (line 30) | func main() { FILE: examples/cascadeproxy/main.go constant _proxyAuthHeader (line 16) | _proxyAuthHeader = "Proxy-Authorization" function SetBasicAuth (line 18) | func SetBasicAuth(username, password string, req *http.Request) { function main (line 22) | func main() { FILE: examples/certstorage/cache.go type CertStorage (line 10) | type CertStorage struct method Fetch (line 15) | func (cs *CertStorage) Fetch(hostname string, gen func() (*tls.Certifi... function NewCertStorage (line 35) | func NewCertStorage() *CertStorage { FILE: examples/certstorage/main.go function main (line 10) | func main() { FILE: examples/customca/main.go function main (line 13) | func main() { function parseCA (line 34) | func parseCA(caCert, caKey []byte) (*tls.Certificate, error) { FILE: examples/goproxy-httpdump/httpdump.go type FileStream (line 22) | type FileStream struct method Write (line 31) | func (fs *FileStream) Write(b []byte) (nr int, err error) { method Close (line 41) | func (fs *FileStream) Close() error { function NewFileStream (line 27) | func NewFileStream(path string) *FileStream { type Meta (line 49) | type Meta struct method WriteTo (line 77) | func (m *Meta) WriteTo(w io.Writer) (nr int64, err error) { function fprintf (line 59) | func fprintf(nr *int64, err *error, w io.Writer, pat string, a ...any) { function write (line 68) | func write(nr *int64, err *error, w io.Writer, b []byte) { type HttpLogger (line 111) | type HttpLogger struct method LogResp (line 134) | func (logger *HttpLogger) LogResp(resp *http.Response, ctx *goproxy.Pr... method LogReq (line 156) | func (logger *HttpLogger) LogReq(req *http.Request, ctx *goproxy.Proxy... method LogMeta (line 171) | func (logger *HttpLogger) LogMeta(m *Meta) { method Close (line 175) | func (logger *HttpLogger) Close() error { function NewLogger (line 117) | func NewLogger(basepath string) (*HttpLogger, error) { type TeeReadCloser (line 182) | type TeeReadCloser struct method Read (line 192) | func (t *TeeReadCloser) Read(b []byte) (int, error) { method Close (line 198) | func (t *TeeReadCloser) Close() error { function NewTeeReadCloser (line 188) | func NewTeeReadCloser(r io.ReadCloser, w io.WriteCloser) io.ReadCloser { type stoppableListener (line 209) | type stoppableListener struct method Accept (line 223) | func (sl *stoppableListener) Accept() (net.Conn, error) { type stoppableConn (line 214) | type stoppableConn struct method Close (line 232) | func (sc *stoppableConn) Close() error { function newStoppableListener (line 219) | func newStoppableListener(l net.Listener) *stoppableListener { function main (line 237) | func main() { FILE: examples/goproxy-transparent/transparent.go function orPanic (line 19) | func orPanic(err error) { function main (line 25) | func main() { function dial (line 115) | func dial(ctx context.Context, proxy *goproxy.ProxyHttpServer, network, ... function connectDial (line 124) | func connectDial(ctx context.Context, proxy *goproxy.ProxyHttpServer, ne... type dumbResponseWriter (line 131) | type dumbResponseWriter struct method Header (line 135) | func (dumb dumbResponseWriter) Header() http.Header { method Write (line 139) | func (dumb dumbResponseWriter) Write(buf []byte) (int, error) { method WriteHeader (line 146) | func (dumb dumbResponseWriter) WriteHeader(code int) { method Hijack (line 150) | func (dumb dumbResponseWriter) Hijack() (net.Conn, *bufio.ReadWriter, ... FILE: examples/hijack/main.go function main (line 14) | func main() { FILE: examples/html-parser/jquery_test.go function equal (line 15) | func equal(u, v []string) bool { function readFile (line 27) | func readFile(fname string, t *testing.T) string { function TestDefectiveScriptParser (line 35) | func TestDefectiveScriptParser(t *testing.T) { function proxyWithLog (line 65) | func proxyWithLog() (*http.Client, *bytes.Buffer) { function get (line 76) | func get(t *testing.T, server *httptest.Server, client *http.Client, url... function TestProxyServiceTwoVersions (line 85) | func TestProxyServiceTwoVersions(t *testing.T) { function TestProxyService (line 106) | func TestProxyService(t *testing.T) { FILE: examples/html-parser/main.go function findScriptSrc (line 18) | func findScriptSrc(html string) []string { function NewJQueryVersionProxy (line 34) | func NewJQueryVersionProxy() *goproxy.ProxyHttpServer { function main (line 61) | func main() { FILE: examples/image-manipulation/main.go function main (line 11) | func main() { FILE: examples/redirect-https/main.go function main (line 12) | func main() { FILE: examples/remove-https/main.go function main (line 10) | func main() { FILE: examples/request-filtering/noreddit.go function main (line 10) | func main() { FILE: examples/socket-keepalive/keepalive.go function main (line 12) | func main() { FILE: examples/websockets/main.go function echo (line 16) | func echo(w http.ResponseWriter, r *http.Request) { function StartEchoServer (line 39) | func StartEchoServer() { function StartProxy (line 50) | func StartProxy() { function main (line 63) | func main() { FILE: ext/auth/basic.go function BasicUnauthorized (line 15) | func BasicUnauthorized(req *http.Request, realm string) *http.Response { function auth (line 33) | func auth(req *http.Request, f func(user, passwd string) bool) bool { function Basic (line 53) | func Basic(realm string, f func(user, passwd string) bool) goproxy.ReqHa... function BasicConnect (line 65) | func BasicConnect(realm string, f func(user, passwd string) bool) goprox... function ProxyBasic (line 76) | func ProxyBasic(proxy *goproxy.ProxyHttpServer, realm string, f func(use... FILE: ext/auth/basic_test.go type ConstantHanlder (line 20) | type ConstantHanlder method ServeHTTP (line 22) | func (h ConstantHanlder) ServeHTTP(w http.ResponseWriter, r *http.Requ... function oneShotProxy (line 26) | func oneShotProxy(proxy *goproxy.ProxyHttpServer) (client *http.Client, ... function times (line 35) | func times(n int, s string) string { function TestBasicConnectAuthWithCurl (line 43) | func TestBasicConnectAuthWithCurl(t *testing.T) { function TestBasicAuthWithCurl (line 71) | func TestBasicAuthWithCurl(t *testing.T) { function TestBasicAuth (line 98) | func TestBasicAuth(t *testing.T) { function TestWithBrowser (line 144) | func TestWithBrowser(t *testing.T) { FILE: ext/har/logger.go type ExportFunc (line 11) | type ExportFunc type Logger (line 14) | type Logger struct method OnRequest (line 56) | func (l *Logger) OnRequest(req *http.Request, ctx *goproxy.ProxyCtx) (... method OnResponse (line 62) | func (l *Logger) OnResponse(resp *http.Response, ctx *goproxy.ProxyCtx... method exportLoop (line 88) | func (l *Logger) exportLoop() { method Stop (line 122) | func (l *Logger) Stop() { type LoggerOption (line 22) | type LoggerOption function WithExportInterval (line 25) | func WithExportInterval(d time.Duration) LoggerOption { function WithExportThreshold (line 32) | func WithExportThreshold(threshold int) LoggerOption { function NewLogger (line 39) | func NewLogger(exportFunc ExportFunc, opts ...LoggerOption) *Logger { FILE: ext/har/logger_test.go type ConstantHandler (line 19) | type ConstantHandler method ServeHTTP (line 21) | func (h ConstantHandler) ServeHTTP(w http.ResponseWriter, r *http.Requ... function createTestProxy (line 27) | func createTestProxy(logger *Logger) *httptest.Server { function createProxyClient (line 35) | func createProxyClient(proxyURL string) *http.Client { function TestHarLoggerBasicFunctionality (line 43) | func TestHarLoggerBasicFunctionality(t *testing.T) { function TestLoggerThresholdExport (line 117) | func TestLoggerThresholdExport(t *testing.T) { function TestHarLoggerExportInterval (line 173) | func TestHarLoggerExportInterval(t *testing.T) { FILE: ext/har/types.go type Har (line 18) | type Har struct type Log (line 22) | type Log struct function New (line 31) | func New() *Har { function makeNewEntries (line 46) | func makeNewEntries() []Entry { type Creator (line 51) | type Creator struct type Browser (line 57) | type Browser struct type Page (line 63) | type Page struct type Entry (line 71) | type Entry struct method fillIPAddress (line 109) | func (entry *Entry) fillIPAddress(req *http.Request) { type Cache (line 84) | type Cache struct type CacheEntry (line 89) | type CacheEntry struct type Request (line 97) | type Request struct function readBody (line 120) | func readBody(ctx *goproxy.ProxyCtx, body io.ReadCloser) ([]byte, error) { function parseMediaType (line 130) | func parseMediaType(ctx *goproxy.ProxyCtx, header http.Header) string { function parsePostData (line 144) | func parsePostData(ctx *goproxy.ProxyCtx, req *http.Request) *PostData { type Response (line 177) | type Response struct function parseResponse (line 190) | func parseResponse(ctx *goproxy.ProxyCtx) *Response { function parseRequest (line 226) | func parseRequest(ctx *goproxy.ProxyCtx) *Request { function parseStringArrMap (line 258) | func parseStringArrMap(stringArrMap map[string][]string) []NameValuePair { function parseCookies (line 285) | func parseCookies(cookies []*http.Cookie) []Cookie { type Cookie (line 304) | type Cookie struct type NameValuePair (line 314) | type NameValuePair struct type PostData (line 319) | type PostData struct type PostDataParam (line 326) | type PostDataParam struct type Content (line 334) | type Content struct type PageTimings (line 343) | type PageTimings struct type Timings (line 349) | type Timings struct FILE: ext/html/html.go function HandleString (line 39) | func HandleString(f func(s string, ctx *goproxy.ProxyCtx) string) goprox... function HandleStringReader (line 52) | func HandleStringReader(f func(r io.Reader, ctx *goproxy.ProxyCtx) io.Re... type readFirstCloseBoth (line 82) | type readFirstCloseBoth struct method Read (line 87) | func (rfcb *readFirstCloseBoth) Read(b []byte) (nr int, err error) { method Close (line 90) | func (rfcb *readFirstCloseBoth) Close() error { FILE: ext/html/html_test.go type ConstantServer (line 13) | type ConstantServer method ServeHTTP (line 15) | func (s ConstantServer) ServeHTTP(w http.ResponseWriter, r *http.Reque... function TestCharset (line 20) | func TestCharset(t *testing.T) { FILE: ext/image/image.go function HandleImage (line 23) | func HandleImage(f func(img image.Image, ctx *ProxyCtx) image.Image) Res... FILE: ext/image/image_test.go function oneShotProxy (line 19) | func oneShotProxy(proxy *goproxy.ProxyHttpServer, t *testing.T) (client ... function getImage (line 28) | func getImage(file string, t *testing.T) image.Image { function compareImage (line 40) | func compareImage(eImg, aImg image.Image, t *testing.T) { function localFile (line 59) | func localFile(url string) string { return fs.URL + "/" + url } function TestConstantImageHandler (line 61) | func TestConstantImageHandler(t *testing.T) { function TestImageHandler (line 84) | func TestImageHandler(t *testing.T) { function fatalOnErr (line 121) | func fatalOnErr(err error, msg string, t *testing.T) { function get (line 127) | func get(url string, client *http.Client) ([]byte, error) { function getOrFail (line 140) | func getOrFail(url string, client *http.Client, t *testing.T) []byte { function TestReplaceImage (line 148) | func TestReplaceImage(t *testing.T) { FILE: ext/limitation/concurrency.go function ConcurrentRequests (line 12) | func ConcurrentRequests(limit int) goproxy.ReqHandler { FILE: ext/limitation/concurrency_test.go function TestConcurrentRequests (line 13) | func TestConcurrentRequests(t *testing.T) { FILE: h2.go type H2Transport (line 21) | type H2Transport struct method RoundTrip (line 31) | func (r *H2Transport) RoundTrip(_ *http.Request) (*http.Response, erro... function dial (line 97) | func dial(network, addr string) (c net.Conn, err error) { function proxyFrame (line 108) | func proxyFrame(fr *http2.Framer) error { FILE: http.go method handleHttp (line 10) | func (proxy *ProxyHttpServer) handleHttp(w http.ResponseWriter, r *http.... FILE: https.go type ConnectActionLiteral (line 22) | type ConnectActionLiteral constant ConnectAccept (line 25) | ConnectAccept = iota constant ConnectReject (line 26) | ConnectReject constant ConnectMitm (line 27) | ConnectMitm constant ConnectHijack (line 28) | ConnectHijack constant ConnectHTTPMitm (line 30) | ConnectHTTPMitm constant ConnectProxyAuthHijack (line 31) | ConnectProxyAuthHijack constant _tlsRecordTypeHandshake (line 44) | _tlsRecordTypeHandshake = byte(22) type readBufferedConn (line 46) | type readBufferedConn struct method Read (line 51) | func (c *readBufferedConn) Read(p []byte) (int, error) { type ConnectAction (line 59) | type ConnectAction struct function stripPort (line 65) | func stripPort(s string) string { method dial (line 87) | func (proxy *ProxyHttpServer) dial(ctx *ProxyCtx, network, addr string) ... method connectDial (line 102) | func (proxy *ProxyHttpServer) connectDial(ctx *ProxyCtx, network, addr s... type halfClosable (line 114) | type halfClosable interface method handleHttps (line 122) | func (proxy *ProxyHttpServer) handleHttps(w http.ResponseWriter, r *http... function httpError (line 401) | func httpError(w io.WriteCloser, ctx *ProxyCtx, err error) { function copyOrWarn (line 420) | func copyOrWarn(ctx *ProxyCtx, dst io.Writer, src io.Reader) error { function copyAndClose (line 431) | func copyAndClose(ctx *ProxyCtx, dst, src halfClosable, wg *sync.WaitGro... function dialerFromEnv (line 442) | func dialerFromEnv(proxy *ProxyHttpServer) func(network, addr string) (n... method NewConnectDialToProxy (line 453) | func (proxy *ProxyHttpServer) NewConnectDialToProxy(httpsProxy string) f... method NewConnectDialToProxyWithHandler (line 457) | func (proxy *ProxyHttpServer) NewConnectDialToProxyWithHandler( function TLSConfigFromCA (line 555) | func TLSConfigFromCA(ca *tls.Certificate) func(host string, ctx *ProxyCt... method initializeTLSconnection (line 583) | func (proxy *ProxyHttpServer) initializeTLSconnection( FILE: internal/http1parser/header.go function Http1ExtractHeaders (line 15) | func Http1ExtractHeaders(r *textproto.Reader) ([]string, error) { FILE: internal/http1parser/header_test.go function TestHttp1ExtractHeaders_Empty (line 14) | func TestHttp1ExtractHeaders_Empty(t *testing.T) { function TestHttp1ExtractHeaders (line 24) | func TestHttp1ExtractHeaders(t *testing.T) { function TestHttp1ExtractHeaders_InvalidData (line 41) | func TestHttp1ExtractHeaders_InvalidData(t *testing.T) { FILE: internal/http1parser/request.go type RequestReader (line 12) | type RequestReader struct method IsEOF (line 38) | func (r *RequestReader) IsEOF() bool { method Reader (line 47) | func (r *RequestReader) Reader() *bufio.Reader { method ReadRequest (line 51) | func (r *RequestReader) ReadRequest() (*http.Request, error) { function NewRequestReader (line 19) | func NewRequestReader(preventCanonicalization bool, conn io.Reader) *Req... function getRequestReader (line 83) | func getRequestReader(r *bufio.Reader, cloned *bytes.Buffer) *textproto.... FILE: internal/http1parser/request_test.go constant _data (line 19) | _data = "POST /index.html HTTP/1.1\r\n" + constant _data2 (line 27) | _data2 = "GET /index.html HTTP/1.1\r\n" + function TestCanonicalRequest (line 34) | func TestCanonicalRequest(t *testing.T) { function TestNonCanonicalRequest (line 56) | func TestNonCanonicalRequest(t *testing.T) { function TestMultipleNonCanonicalRequests (line 67) | func TestMultipleNonCanonicalRequests(t *testing.T) { type reqTest (line 90) | type reqTest struct function TestReadRequest (line 172) | func TestReadRequest(t *testing.T) { FILE: internal/signer/counterecryptor.go type CounterEncryptorRand (line 14) | type CounterEncryptorRand struct method Seed (line 50) | func (c *CounterEncryptorRand) Seed(b []byte) { method refill (line 57) | func (c *CounterEncryptorRand) refill() { method Read (line 67) | func (c *CounterEncryptorRand) Read(b []byte) (n int, err error) { function NewCounterEncryptorRandFromKey (line 21) | func NewCounterEncryptorRandFromKey(key any, seed []byte) (r CounterEncr... FILE: internal/signer/counterecryptor_test.go type RandSeedReader (line 15) | type RandSeedReader struct method Read (line 19) | func (r *RandSeedReader) Read(b []byte) (n int, err error) { function fatalOnErr (line 26) | func fatalOnErr(t *testing.T, err error, msg string) { function TestCounterEncDifferentConsecutive (line 33) | func TestCounterEncDifferentConsecutive(t *testing.T) { function TestCounterEncIdenticalStreams (line 48) | func TestCounterEncIdenticalStreams(t *testing.T) { function stddev (line 73) | func stddev(data []int) float64 { function TestCounterEncStreamHistogram (line 84) | func TestCounterEncStreamHistogram(t *testing.T) { FILE: internal/signer/signer.go constant _goproxySignerVersion (line 23) | _goproxySignerVersion = ":goproxy2" function hashSorted (line 25) | func hashSorted(lst []string) []byte { function SignHost (line 34) | func SignHost(ca tls.Certificate, hosts []string) (cert *tls.Certificate... FILE: internal/signer/signer_test.go function orFatal (line 20) | func orFatal(t *testing.T, msg string, err error) { type ConstantHanlder (line 27) | type ConstantHanlder method ServeHTTP (line 29) | func (h ConstantHanlder) ServeHTTP(w http.ResponseWriter, _ *http.Requ... function getBrowser (line 33) | func getBrowser(args []string) string { function testSignerX509 (line 45) | func testSignerX509(t *testing.T, ca tls.Certificate) { function testSignerTLS (line 62) | func testSignerTLS(t *testing.T, ca tls.Certificate) { function TestSignerRsaTls (line 99) | func TestSignerRsaTls(t *testing.T) { function TestSignerRsaX509 (line 103) | func TestSignerRsaX509(t *testing.T) { function TestSignerEcdsaTls (line 107) | func TestSignerEcdsaTls(t *testing.T) { function TestSignerEcdsaX509 (line 111) | func TestSignerEcdsaX509(t *testing.T) { function BenchmarkSignRsa (line 115) | func BenchmarkSignRsa(b *testing.B) { function BenchmarkSignEcdsa (line 125) | func BenchmarkSignEcdsa(b *testing.B) { function init (line 162) | func init() { FILE: logger.go type Logger (line 3) | type Logger interface FILE: proxy.go type ProxyHttpServer (line 13) | type ProxyHttpServer struct method filterRequest (line 70) | func (proxy *ProxyHttpServer) filterRequest(r *http.Request, ctx *Prox... method filterResponse (line 83) | func (proxy *ProxyHttpServer) filterResponse(respOrig *http.Response, ... method ServeHTTP (line 137) | func (proxy *ProxyHttpServer) ServeHTTP(w http.ResponseWriter, r *http... function copyHeaders (line 58) | func copyHeaders(dst, src http.Header, keepDestHeaders bool) { function RemoveProxyHeaders (line 93) | func RemoveProxyHeaders(ctx *ProxyCtx, r *http.Request) { type flushWriter (line 122) | type flushWriter struct method Write (line 126) | func (fw flushWriter) Write(p []byte) (int, error) { function NewProxyHttpServer (line 146) | func NewProxyHttpServer() *ProxyHttpServer { FILE: proxy_test.go type QueryHandler (line 37) | type QueryHandler struct method ServeHTTP (line 39) | func (QueryHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { type HeadersHandler (line 46) | type HeadersHandler struct method ServeHTTP (line 49) | func (HeadersHandler) ServeHTTP(w http.ResponseWriter, req *http.Reque... function init (line 62) | func init() { type ConstantHanlder (line 68) | type ConstantHanlder method ServeHTTP (line 70) | func (h ConstantHanlder) ServeHTTP(w http.ResponseWriter, r *http.Requ... function get (line 74) | func get(url string, client *http.Client) ([]byte, error) { function getOrFail (line 91) | func getOrFail(t *testing.T, url string, client *http.Client) []byte { function getCert (line 100) | func getCert(t *testing.T, c *tls.Conn) []byte { function localFile (line 108) | func localFile(url string) string { function TestSimpleHttpReqWithProxy (line 112) | func TestSimpleHttpReqWithProxy(t *testing.T) { function oneShotProxy (line 128) | func oneShotProxy(proxy *goproxy.ProxyHttpServer) (client *http.Client, ... function TestSimpleHook (line 142) | func TestSimpleHook(t *testing.T) { function TestAlwaysHook (line 160) | func TestAlwaysHook(t *testing.T) { function TestReplaceResponse (line 176) | func TestReplaceResponse(t *testing.T) { function TestReplaceReponseForUrl (line 192) | func TestReplaceReponseForUrl(t *testing.T) { function TestOneShotFileServer (line 211) | func TestOneShotFileServer(t *testing.T) { function TestContentType (line 238) | func TestContentType(t *testing.T) { function panicOnErr (line 277) | func panicOnErr(err error, msg string) { function TestChangeResp (line 283) | func TestChangeResp(t *testing.T) { function TestSimpleMitm (line 313) | func TestSimpleMitm(t *testing.T) { function TestMitmMutateRequest (line 366) | func TestMitmMutateRequest(t *testing.T) { function TestConnectHandler (line 384) | func TestConnectHandler(t *testing.T) { function TestMitmIsFiltered (line 399) | func TestMitmIsFiltered(t *testing.T) { function TestFirstHandlerMatches (line 420) | func TestFirstHandlerMatches(t *testing.T) { function TestIcyResponse (line 437) | func TestIcyResponse(t *testing.T) { type VerifyNoProxyHeaders (line 459) | type VerifyNoProxyHeaders struct method ServeHTTP (line 463) | func (v VerifyNoProxyHeaders) ServeHTTP(w http.ResponseWriter, r *http... function TestNoProxyHeaders (line 470) | func TestNoProxyHeaders(t *testing.T) { function TestNoProxyHeadersHttps (line 482) | func TestNoProxyHeadersHttps(t *testing.T) { type VerifyAcceptEncodingHeader (line 494) | type VerifyAcceptEncodingHeader struct method ServeHTTP (line 498) | func (v *VerifyAcceptEncodingHeader) ServeHTTP(w http.ResponseWriter, ... function TestAcceptEncoding (line 502) | func TestAcceptEncoding(t *testing.T) { function TestHeadReqHasContentLength (line 546) | func TestHeadReqHasContentLength(t *testing.T) { function TestChunkedResponse (line 562) | func TestChunkedResponse(t *testing.T) { function TestGoproxyThroughProxy (line 633) | func TestGoproxyThroughProxy(t *testing.T) { function TestHttpProxyAddrsFromEnv (line 657) | func TestHttpProxyAddrsFromEnv(t *testing.T) { function TestGoproxyHijackConnect (line 681) | func TestGoproxyHijackConnect(t *testing.T) { function readResponse (line 717) | func readResponse(buf *bufio.Reader) string { function writeConnect (line 728) | func writeConnect(w io.Writer) { function TestCurlMinusP (line 744) | func TestCurlMinusP(t *testing.T) { function TestSelfRequest (line 775) | func TestSelfRequest(t *testing.T) { function TestHasGoproxyCA (line 784) | func TestHasGoproxyCA(t *testing.T) { type TestCertStorage (line 801) | type TestCertStorage struct method Fetch (line 807) | func (tcs *TestCertStorage) Fetch(hostname string, gen func() (*tls.Ce... method statHits (line 826) | func (tcs *TestCertStorage) statHits() int { method statMisses (line 830) | func (tcs *TestCertStorage) statMisses() int { function newTestCertStorage (line 834) | func newTestCertStorage() *TestCertStorage { function TestProxyWithCertStorage (line 841) | func TestProxyWithCertStorage(t *testing.T) { function TestHttpsMitmURLRewrite (line 889) | func TestHttpsMitmURLRewrite(t *testing.T) { function TestSimpleHttpRequest (line 957) | func TestSimpleHttpRequest(t *testing.T) { function TestResponseContentLength (line 1018) | func TestResponseContentLength(t *testing.T) { function TestMITMResponseHTTP2MissingContentLength (line 1057) | func TestMITMResponseHTTP2MissingContentLength(t *testing.T) { function TestMITMResponseContentLength (line 1122) | func TestMITMResponseContentLength(t *testing.T) { function TestMITMEmptyBody (line 1144) | func TestMITMEmptyBody(t *testing.T) { function TestMITMOverwriteAlreadyEmptyBody (line 1168) | func TestMITMOverwriteAlreadyEmptyBody(t *testing.T) { function TestMITMOverwriteBodyToEmpty (line 1194) | func TestMITMOverwriteBodyToEmpty(t *testing.T) { function TestMITMRequestCancel (line 1220) | func TestMITMRequestCancel(t *testing.T) { function TestNewResponseProtoVersion (line 1267) | func TestNewResponseProtoVersion(t *testing.T) { function TestNewResponseMitmWrite (line 1286) | func TestNewResponseMitmWrite(t *testing.T) { function TestPersistentMitmRequest (line 1310) | func TestPersistentMitmRequest(t *testing.T) { FILE: regretable/regretreader.go type Reader (line 16) | type Reader struct method Regret (line 27) | func (rb *Reader) Regret() { method Forget (line 43) | func (rb *Reader) Forget() { method Read (line 62) | func (rb *Reader) Read(p []byte) (n int, err error) { constant _defaultBufferSize (line 23) | _defaultBufferSize = 500 function NewRegretableReaderSize (line 52) | func NewRegretableReaderSize(r io.Reader, size int) *Reader { function NewRegretableReader (line 57) | func NewRegretableReader(r io.Reader) *Reader { type ReaderCloser (line 81) | type ReaderCloser struct method Close (line 97) | func (rbc *ReaderCloser) Close() error { function NewRegretableReaderCloser (line 87) | func NewRegretableReaderCloser(rc io.ReadCloser) *ReaderCloser { function NewRegretableReaderCloserSize (line 92) | func NewRegretableReaderCloserSize(rc io.ReadCloser, size int) *ReaderCl... FILE: regretable/regretreader_test.go function assertEqual (line 12) | func assertEqual(t *testing.T, expected, actual string) { function assertReadAll (line 19) | func assertReadAll(t *testing.T, r io.Reader) string { function TestRegretableReader (line 28) | func TestRegretableReader(t *testing.T) { function TestRegretableEmptyRead (line 44) | func TestRegretableEmptyRead(t *testing.T) { function TestRegretableAlsoEmptyRead (line 60) | func TestRegretableAlsoEmptyRead(t *testing.T) { function TestRegretableRegretBeforeRead (line 80) | func TestRegretableRegretBeforeRead(t *testing.T) { function TestRegretableFullRead (line 96) | func TestRegretableFullRead(t *testing.T) { function TestRegretableRegretTwice (line 112) | func TestRegretableRegretTwice(t *testing.T) { type CloseCounter (line 125) | type CloseCounter struct method Read (line 130) | func (cc *CloseCounter) Read(b []byte) (int, error) { method Close (line 134) | func (cc *CloseCounter) Close() error { function TestRegretableCloserSizeRegrets (line 139) | func TestRegretableCloserSizeRegrets(t *testing.T) { function TestRegretableCloserRegretsClose (line 158) | func TestRegretableCloserRegretsClose(t *testing.T) { FILE: responses.go function NewResponse (line 17) | func NewResponse(r *http.Request, contentType string, status int, body s... constant ContentTypeText (line 35) | ContentTypeText = "text/plain" constant ContentTypeHtml (line 36) | ContentTypeHtml = "text/html" function TextResponse (line 40) | func TextResponse(r *http.Request, text string) *http.Response { FILE: transport/roundtripper.go type RoundTripper (line 5) | type RoundTripper interface FILE: transport/transport.go constant DefaultMaxIdleConnsPerHost (line 40) | DefaultMaxIdleConnsPerHost = 2 type Transport (line 45) | type Transport struct method DetailedRoundTrip (line 131) | func (t *Transport) DetailedRoundTrip(req *http.Request) (details *Rou... method RoundTrip (line 170) | func (t *Transport) RoundTrip(req *http.Request) (resp *http.Response,... method RegisterProtocol (line 181) | func (t *Transport) RegisterProtocol(scheme string, rt RoundTripper) { method CloseIdleConnections (line 200) | func (t *Transport) CloseIdleConnections() { method connectMethodForRequest (line 225) | func (t *Transport) connectMethodForRequest(treq *transportRequest) (*... method putIdleConn (line 256) | func (t *Transport) putIdleConn(pconn *persistConn) bool { method getIdleConn (line 279) | func (t *Transport) getIdleConn(cm *connectMethod) (pconn *persistConn) { method dial (line 306) | func (t *Transport) dial(network, addr string) (c net.Conn, raddr stri... method getConn (line 330) | func (t *Transport) getConn(cm *connectMethod) (*persistConn, error) { function ProxyFromEnvironment (line 84) | func ProxyFromEnvironment(req *http.Request) (*url.URL, error) { function ProxyURL (line 104) | func ProxyURL(fixedURL *url.URL) func(*http.Request) (*url.URL, error) { type transportRequest (line 112) | type transportRequest struct method extraHeaders (line 117) | func (tr *transportRequest) extraHeaders() http.Header { type RoundTripDetails (line 124) | type RoundTripDetails struct function getenvEitherCase (line 218) | func getenvEitherCase(k string) string { function useProxy (line 419) | func useProxy(addr string) bool { type connectMethod (line 474) | type connectMethod struct method proxyAuth (line 242) | func (cm *connectMethod) proxyAuth() string { method String (line 480) | func (cm *connectMethod) String() string { method addr (line 489) | func (cm *connectMethod) addr() string { method tlsHost (line 498) | func (cm *connectMethod) tlsHost() string { type persistConn (line 508) | type persistConn struct method isBroken (line 530) | func (pc *persistConn) isBroken() bool { method readLoop (line 536) | func (pc *persistConn) readLoop() { method roundTrip (line 645) | func (pc *persistConn) roundTrip(req *transportRequest) (resp *http.Re... method close (line 689) | func (pc *persistConn) close() { method closeLocked (line 695) | func (pc *persistConn) closeLocked() { type responseAndError (line 630) | type responseAndError struct type requestAndChan (line 635) | type requestAndChan struct function canonicalAddr (line 707) | func canonicalAddr(url *url.URL) string { type bodyEOFSignal (line 718) | type bodyEOFSignal struct method Read (line 724) | func (es *bodyEOFSignal) Read(p []byte) (n int, err error) { method Close (line 736) | func (es *bodyEOFSignal) Close() (err error) { type readFirstCloseBoth (line 749) | type readFirstCloseBoth struct method Close (line 754) | func (r *readFirstCloseBoth) Close() error { type discardOnCloseReadCloser (line 766) | type discardOnCloseReadCloser struct method Close (line 770) | func (d *discardOnCloseReadCloser) Close() error { FILE: transport/util.go type badStringError (line 8) | type badStringError struct method Error (line 13) | func (e *badStringError) Error() string { return fmt.Sprintf("%s %q", ... function hasPort (line 15) | func hasPort(s string) bool { return strings.LastIndex(s, ":") > strings... FILE: websocket.go function headerContains (line 10) | func headerContains(header http.Header, name string, value string) bool { function isWebSocketHandshake (line 21) | func isWebSocketHandshake(header http.Header) bool { method hijackConnection (line 26) | func (proxy *ProxyHttpServer) hijackConnection(ctx *ProxyCtx, w http.Res... method proxyWebsocket (line 40) | func (proxy *ProxyHttpServer) proxyWebsocket(ctx *ProxyCtx, remoteConn i... FILE: websocket_test.go function TestWebSocketMitm (line 18) | func TestWebSocketMitm(t *testing.T) {