Documentation ¶
Index ¶
- type CookieTracker
- type HTTPProxy
- func (p *HTTPProxy) Configure(address string, proxyPort int, httpPort int, doRedirect bool, ...) error
- func (p *HTTPProxy) ConfigureTLS(address string, proxyPort int, httpPort int, doRedirect bool, ...) (err error)
- func (p *HTTPProxy) Debug(format string, args ...interface{})
- func (p *HTTPProxy) Error(format string, args ...interface{})
- func (p *HTTPProxy) Fatal(format string, args ...interface{})
- func (p *HTTPProxy) Info(format string, args ...interface{})
- func (p *HTTPProxy) Start()
- func (p *HTTPProxy) Stop() error
- func (p *HTTPProxy) TLSConfigFromCA(ca *tls.Certificate) func(host string, ctx *goproxy.ProxyCtx) (*tls.Config, error)
- func (p *HTTPProxy) Warning(format string, args ...interface{})
- type Host
- type HostTracker
- type HttpProxy
- type HttpProxyScript
- type JSRequest
- func (j *JSRequest) GetHeader(name, deflt string) string
- func (j *JSRequest) NewHash() string
- func (j *JSRequest) ParseForm() map[string]string
- func (j *JSRequest) ReadBody() string
- func (j *JSRequest) RemoveHeader(name string)
- func (j *JSRequest) SetHeader(name, value string)
- func (j *JSRequest) ToRequest() (req *http.Request)
- func (j *JSRequest) UpdateHash()
- func (j *JSRequest) WasModified() bool
- type JSResponse
- func (j *JSResponse) ClearBody()
- func (j *JSResponse) GetHeader(name, deflt string) string
- func (j *JSResponse) NewHash() string
- func (j *JSResponse) ReadBody() string
- func (j *JSResponse) RemoveHeader(name string)
- func (j *JSResponse) SetHeader(name, value string)
- func (j *JSResponse) ToResponse(req *http.Request) (resp *http.Response)
- func (j *JSResponse) UpdateHash()
- func (j *JSResponse) WasModified() bool
- type SSLStripper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CookieTracker ¶
func NewCookieTracker ¶
func NewCookieTracker() *CookieTracker
func (*CookieTracker) Track ¶
func (t *CookieTracker) Track(req *http.Request)
type HTTPProxy ¶
type HTTPProxy struct { Name string Address string Server *http.Server Redirection *firewall.Redirection Proxy *goproxy.ProxyHttpServer Script *HttpProxyScript CertFile string KeyFile string Blacklist []string Whitelist []string Sess *session.Session Stripper *SSLStripper // contains filtered or unexported fields }
func (*HTTPProxy) ConfigureTLS ¶
func (*HTTPProxy) TLSConfigFromCA ¶
type HostTracker ¶
func NewHostTracker ¶
func NewHostTracker() *HostTracker
func (*HostTracker) Strip ¶
func (t *HostTracker) Strip(unstripped string) *Host
func (*HostTracker) Track ¶
func (t *HostTracker) Track(host, stripped string)
func (*HostTracker) Unstrip ¶
func (t *HostTracker) Unstrip(stripped string) *Host
type HttpProxy ¶
type HttpProxy struct { session.SessionModule // contains filtered or unexported fields }
func NewHttpProxy ¶
func (*HttpProxy) Description ¶
type HttpProxyScript ¶
func LoadHttpProxyScript ¶
func LoadHttpProxyScript(path string, sess *session.Session) (err error, s *HttpProxyScript)
func (*HttpProxyScript) OnCommand ¶
func (s *HttpProxyScript) OnCommand(cmd string) bool
func (*HttpProxyScript) OnRequest ¶
func (s *HttpProxyScript) OnRequest(original *http.Request) (jsreq *JSRequest, jsres *JSResponse)
func (*HttpProxyScript) OnResponse ¶
func (s *HttpProxyScript) OnResponse(res *http.Response) (jsreq *JSRequest, jsres *JSResponse)
type JSRequest ¶
type JSRequest struct { Client map[string]string Method string Version string Scheme string Path string Query string Hostname string Port string ContentType string Headers string Body string // contains filtered or unexported fields }
func NewJSRequest ¶
func (*JSRequest) RemoveHeader ¶
func (*JSRequest) UpdateHash ¶
func (j *JSRequest) UpdateHash()
func (*JSRequest) WasModified ¶
type JSResponse ¶
type JSResponse struct { Status int ContentType string Headers string Body string // contains filtered or unexported fields }
func NewJSResponse ¶
func NewJSResponse(res *http.Response) *JSResponse
func (*JSResponse) ClearBody ¶
func (j *JSResponse) ClearBody()
func (*JSResponse) GetHeader ¶
func (j *JSResponse) GetHeader(name, deflt string) string
func (*JSResponse) NewHash ¶
func (j *JSResponse) NewHash() string
func (*JSResponse) ReadBody ¶
func (j *JSResponse) ReadBody() string
func (*JSResponse) RemoveHeader ¶
func (j *JSResponse) RemoveHeader(name string)
func (*JSResponse) SetHeader ¶
func (j *JSResponse) SetHeader(name, value string)
func (*JSResponse) ToResponse ¶
func (j *JSResponse) ToResponse(req *http.Request) (resp *http.Response)
func (*JSResponse) UpdateHash ¶
func (j *JSResponse) UpdateHash()
func (*JSResponse) WasModified ¶
func (j *JSResponse) WasModified() bool
type SSLStripper ¶
type SSLStripper struct {
// contains filtered or unexported fields
}
func NewSSLStripper ¶
func NewSSLStripper(s *session.Session, enabled bool) *SSLStripper
func (*SSLStripper) Enable ¶
func (s *SSLStripper) Enable(enabled bool)
func (*SSLStripper) Enabled ¶
func (s *SSLStripper) Enabled() bool
func (*SSLStripper) Preprocess ¶
sslstrip preprocessing, takes care of:
- handling stripped domains - making unknown session cookies expire
Click to show internal directories.
Click to hide internal directories.