From cfe3878ed8d212acf7f83740352ea79d3ec78379 Mon Sep 17 00:00:00 2001 From: idk Date: Tue, 9 Jul 2019 10:07:41 -0400 Subject: [PATCH] remove redundant logging --- Makefile | 2 +- common/common.go | 4 ---- multiproxy/authenticate.go | 8 +++----- multiproxy/multitunnel.go | 4 ++-- 4 files changed, 6 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index c4f957a..4189d46 100644 --- a/Makefile +++ b/Makefile @@ -165,4 +165,4 @@ opmac32: ureq: http_proxy=http://127.0.0.1:7950 \ wget -d --auth-no-challenge --proxy-user user --proxy-password password \ - http://inr.i2p -O /dev/null 2>&1 | less -rN + http://i2p-projekt.i2p -O /dev/null 2>&1 | less -rN diff --git a/common/common.go b/common/common.go index 2070082..7c29ba1 100644 --- a/common/common.go +++ b/common/common.go @@ -27,11 +27,7 @@ func Transfer(destination io.WriteCloser, source io.ReadCloser) { } func DelHopHeaders(header http.Header) { - for k, h := range header { - log.Println("HEADER",k, h) - } for _, h := range hopHeaders { - //log.Println(h) header.Del(h) } if header.Get("User-Agent") != "MYOB/6.66 (AN/ON)" { diff --git a/multiproxy/authenticate.go b/multiproxy/authenticate.go index 8c22fed..f8d61d4 100644 --- a/multiproxy/authenticate.go +++ b/multiproxy/authenticate.go @@ -2,11 +2,11 @@ package i2pbrowserproxy import ( "bytes" - "encoding/base64" + "encoding/base64" "io/ioutil" "log" "net/http" - "strings" + "strings" ) // Create a struct that models the structure of a user, both in the request body, and in the DB @@ -20,7 +20,7 @@ func ProxyBasicAuth(r *http.Request) (username, password string, ok bool) { if auth == "" { return } - return parseBasicAuth(auth) + return parseBasicAuth(auth) } func parseBasicAuth(auth string) (username, password string, ok bool) { @@ -56,8 +56,6 @@ func DecodeIdentity(body *http.Request) (*http.Request, *Credentials, error) { creds.User, creds.Site, ok = ProxyBasicAuth(body) if ok { log.Println("OK", creds.User, creds.Site) - } else { - log.Println("NOT OK", creds.User, creds.Site) } return req, &creds, nil } diff --git a/multiproxy/multitunnel.go b/multiproxy/multitunnel.go index 4e57394..d86b474 100644 --- a/multiproxy/multitunnel.go +++ b/multiproxy/multitunnel.go @@ -302,9 +302,9 @@ func (p *SAMMultiProxy) reset(wr http.ResponseWriter, req *http.Request) { func (p *SAMMultiProxy) get(wr http.ResponseWriter, req *http.Request) { req.RequestURI = "" - proxycommon.DelHopHeaders(req.Header) client, req := p.Signin(wr, req) - resp, err := client.client.Do(req) + proxycommon.DelHopHeaders(req.Header) + resp, err := client.client.Do(req) if err != nil { msg := "Proxy Error " + err.Error() if !Quiet {