{"modulePath":"github.com/hackme3/bettercap","version":"v2.24.1+incompatible","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package http_proxy\n\n## Types\n\n```go\ntype CookieTracker struct {\n\tsync.RWMutex\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewCookieTracker() *CookieTracker\n```\n\n```go\nfunc (t *CookieTracker) Expire(req *http.Request) *http.Response\n```\n\n```go\nfunc (t *CookieTracker) IsClean(req *http.Request) bool\n```\n\n```go\nfunc (t *CookieTracker) Track(req *http.Request)\n```\n\n```go\ntype HTTPProxy struct {\n\tName        string\n\tAddress     string\n\tServer      *http.Server\n\tRedirection *firewall.Redirection\n\tProxy       *goproxy.ProxyHttpServer\n\tScript      *HttpProxyScript\n\tCertFile    string\n\tKeyFile     string\n\tBlacklist   []string\n\tWhitelist   []string\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewHTTPProxy(s *session.Session) *HTTPProxy\n```\n\n```go\nfunc (p *HTTPProxy) Configure(address string, proxyPort int, httpPort int, scriptPath string, jsToInject string, stripSSL bool) error\n```\n\n```go\nfunc (p *HTTPProxy) ConfigureTLS(address string, proxyPort int, httpPort int, scriptPath string, certFile string, keyFile string, jsToInject string, stripSSL bool) (err error)\n```\n\n```go\nfunc (p *HTTPProxy) Debug(format string, args ...interface{})\n```\n\n```go\nfunc (p *HTTPProxy) Error(format string, args ...interface{})\n```\n\n```go\nfunc (p *HTTPProxy) Fatal(format string, args ...interface{})\n```\n\n```go\nfunc (p *HTTPProxy) Info(format string, args ...interface{})\n```\n\n```go\nfunc (p *HTTPProxy) Start()\n```\n\n```go\nfunc (p *HTTPProxy) Stop() error\n```\n\n```go\nfunc (p *HTTPProxy) TLSConfigFromCA(ca *tls.Certificate) func(host string, ctx *goproxy.ProxyCtx) (*tls.Config, error)\n```\n\n```go\nfunc (p *HTTPProxy) Warning(format string, args ...interface{})\n```\n\n```go\ntype Host struct {\n\tHostname string\n\tAddress  net.IP\n\tResolved sync.WaitGroup\n}\n```\n\n```go\nfunc NewHost(name string) *Host\n```\n\n```go\ntype HostTracker struct {\n\tsync.RWMutex\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewHostTracker() *HostTracker\n```\n\n```go\nfunc (t *HostTracker) Track(host, stripped string)\n```\n\n```go\nfunc (t *HostTracker) Unstrip(stripped string) *Host\n```\n\n```go\ntype HttpProxy struct {\n\tsession.SessionModule\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewHttpProxy(s *session.Session) *HttpProxy\n```\n\n```go\nfunc (mod *HttpProxy) Author() string\n```\n\n```go\nfunc (mod *HttpProxy) Configure() error\n```\n\n```go\nfunc (mod *HttpProxy) Description() string\n```\n\n```go\nfunc (mod *HttpProxy) Name() string\n```\n\n```go\nfunc (mod *HttpProxy) Start() error\n```\n\n```go\nfunc (mod *HttpProxy) Stop() error\n```\n\n```go\ntype HttpProxyScript struct {\n\t*plugin.Plugin\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc LoadHttpProxyScript(path string, sess *session.Session) (err error, s *HttpProxyScript)\n```\n\n```go\nfunc (s *HttpProxyScript) OnCommand(cmd string) bool\n```\n\n```go\nfunc (s *HttpProxyScript) OnRequest(original *http.Request) (jsreq *JSRequest, jsres *JSResponse)\n```\n\n```go\nfunc (s *HttpProxyScript) OnResponse(res *http.Response) (jsreq *JSRequest, jsres *JSResponse)\n```\n\n```go\ntype JSRequest struct {\n\tClient      map[string]string\n\tMethod      string\n\tVersion     string\n\tScheme      string\n\tPath        string\n\tQuery       string\n\tHostname    string\n\tContentType string\n\tHeaders     string\n\tBody        string\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewJSRequest(req *http.Request) *JSRequest\n```\n\n```go\nfunc (j *JSRequest) GetHeader(name, deflt string) string\n```\n\n```go\nfunc (j *JSRequest) NewHash() string\n```\n\n```go\nfunc (j *JSRequest) ParseForm() map[string]string\n```\n\n```go\nfunc (j *JSRequest) ReadBody() string\n```\n\n```go\nfunc (j *JSRequest) RemoveHeader(name string)\n```\n\n```go\nfunc (j *JSRequest) SetHeader(name, value string)\n```\n\n```go\nfunc (j *JSRequest) ToRequest() (req *http.Request)\n```\n\n```go\nfunc (j *JSRequest) UpdateHash()\n```\n\n```go\nfunc (j *JSRequest) WasModified() bool\n```\n\n```go\ntype JSResponse struct {\n\tStatus      int\n\tContentType string\n\tHeaders     string\n\tBody        string\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewJSResponse(res *http.Response) *JSResponse\n```\n\n```go\nfunc (j *JSResponse) ClearBody()\n```\n\n```go\nfunc (j *JSResponse) GetHeader(name, deflt string) string\n```\n\n```go\nfunc (j *JSResponse) NewHash() string\n```\n\n```go\nfunc (j *JSResponse) ReadBody() string\n```\n\n```go\nfunc (j *JSResponse) RemoveHeader(name string)\n```\n\n```go\nfunc (j *JSResponse) SetHeader(name, value string)\n```\n\n```go\nfunc (j *JSResponse) ToResponse(req *http.Request) (resp *http.Response)\n```\n\n```go\nfunc (j *JSResponse) UpdateHash()\n```\n\n```go\nfunc (j *JSResponse) WasModified() bool\n```\n\n```go\ntype SSLStripper struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewSSLStripper(s *session.Session, enabled bool) *SSLStripper\n```\n\n```go\nfunc (s *SSLStripper) Enable(enabled bool)\n```\n\n```go\nfunc (s *SSLStripper) Enabled() bool\n```\n\n```go\nfunc (s *SSLStripper) Preprocess(req *http.Request, ctx *goproxy.ProxyCtx) (redir *http.Response)\n```\nsslstrip preprocessing, takes care of:\n\n\\- handling stripped domains - making unknown session cookies expire\n\n```go\nfunc (s *SSLStripper) Process(res *http.Response, ctx *goproxy.ProxyCtx)\n```\n\n","path":"github.com/hackme3/bettercap/modules/http_proxy","name":"http_proxy","synopsis":"","isRedistributable":true}
