Documentation ¶
Index ¶
- func CanonicalAddr(url *url.URL) string
- func GetProxyConn(ctx context.Context, proxyUrl *url.URL, address string, sslInsecure bool) (net.Conn, error)
- func GetTlsKeyLogWriter() io.Writer
- func IsTls(buf []byte) bool
- func MatchHost(address string, hosts []string) bool
- func NewResponseCheck(r http.ResponseWriter) http.ResponseWriter
- func NewStructFromFile(filename string, v interface{}) error
- func ReaderToBuffer(r io.Reader, limit int64) ([]byte, io.Reader, error)
- type ResponseCheck
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CanonicalAddr ¶
CanonicalAddr returns url.Host but always with a ":port" suffix.
func GetProxyConn ¶
func GetProxyConn(ctx context.Context, proxyUrl *url.URL, address string, sslInsecure bool) (net.Conn, error)
GetProxyConn connect proxy ref: http/transport.go dialConn func
func GetTlsKeyLogWriter ¶
func IsTls ¶
https://github.com/mitmproxy/mitmproxy/blob/main/mitmproxy/net/tls.py is_tls_record_magic
func NewResponseCheck ¶
func NewResponseCheck(r http.ResponseWriter) http.ResponseWriter
func NewStructFromFile ¶
Types ¶
type ResponseCheck ¶
type ResponseCheck struct { http.ResponseWriter Wrote bool }
func (*ResponseCheck) WriteHeader ¶
func (r *ResponseCheck) WriteHeader(statusCode int)
Click to show internal directories.
Click to hide internal directories.