new: implemented tcp.proxy (closes #33)

This commit is contained in:
evilsocket 2018-02-23 09:27:19 +01:00
commit 129f87f8f9
7 changed files with 410 additions and 78 deletions

View file

@ -36,7 +36,7 @@ type HTTPProxy struct {
Server *http.Server
Redirection *firewall.Redirection
Proxy *goproxy.ProxyHttpServer
Script *ProxyScript
Script *HttpProxyScript
CertFile string
KeyFile string
@ -147,7 +147,7 @@ func (p *HTTPProxy) Configure(address string, proxyPort int, httpPort int, scrip
p.Address = address
if scriptPath != "" {
if err, p.Script = LoadProxyScript(scriptPath, p.sess); err != nil {
if err, p.Script = LoadHttpProxyScript(scriptPath, p.sess); err != nil {
return err
} else {
log.Debug("Proxy script %s loaded.", scriptPath)