Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CertPath = "./certificates/"
CertPath is path where all created certificates will be stored. Should be an existing directory
Functions ¶
func GenCert ¶
func GenCert(names []string) (*tls.Certificate, error)
GenCert creates new certifice for host signed using specified CA certificate
func StartProxyServer ¶
func StartProxyServer(address string, proxyRequestHandler func(*ProxyRequest)) (chan bool, error)
StartProxyServer listens for all the connections to the proxy server and handles requests. Address is listen address, e.g.: ":8090", "0.0.0.0:8011"
Types ¶
type ProxyRequest ¶
type ProxyRequest struct { IsSSL bool ClientRequest *http.Request ServerResponse *http.Response // contains filtered or unexported fields }
ProxyRequest is request sent by client to the proxy server ProxyRequest provides functions for mitm attack, e.g. modifying client requests and changing server responses
func (*ProxyRequest) SendRequest ¶
func (pr *ProxyRequest) SendRequest() error
SendRequest sends request to the server and reads corresponding response
func (*ProxyRequest) SendResponse ¶
func (pr *ProxyRequest) SendResponse() error
SendResponse sends modified response to the client
Click to show internal directories.
Click to hide internal directories.