summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYawning Angel <yawning@torproject.org>2014-09-03 12:50:43 +0000
committerYawning Angel <yawning@torproject.org>2014-09-03 12:50:43 +0000
commitce86fa4348bdd436eed69fccae366e2980bd7b37 (patch)
treeb272e748dfa1112289e3e12f18cc1a0589e0827a
parentfb13cf124149ebb94f400f718c9ae22dda341bdd (diff)
Change the default logLevel to ERROR, upgrade some client warnings.
Client side logs are less spammy than server side in general, so more messages should be visible at the default logLevel when running as a client. Server side logging will be spammy basically no matter what unless obfs4proxy gets into the (arguably dangerous) business of figuring out which errors are people being evil vs which ones are transient network issues, so most logging is suppressed by default, unless the admin choses to open the floodgates.
-rw-r--r--obfs4proxy/obfs4proxy.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/obfs4proxy/obfs4proxy.go b/obfs4proxy/obfs4proxy.go
index cf8043a..85817f0 100644
--- a/obfs4proxy/obfs4proxy.go
+++ b/obfs4proxy/obfs4proxy.go
@@ -188,7 +188,7 @@ func clientHandler(f base.ClientFactory, conn *pt.SocksConn, proxyURI *url.URL)
// Deal with arguments.
args, err := f.ParseArgs(&conn.Req.Args)
if err != nil {
- warnf("%s(%s) - invalid arguments: %s", name, addrStr, err)
+ errorf("%s(%s) - invalid arguments: %s", name, addrStr, err)
conn.Reject()
return
}
@@ -210,7 +210,7 @@ func clientHandler(f base.ClientFactory, conn *pt.SocksConn, proxyURI *url.URL)
}
remoteConn, err := dialFn("tcp", conn.Req.Target) // XXX: Allow UDP?
if err != nil {
- warnf("%s(%s) - outgoing connection failed: %s", name, addrStr, elideError(err))
+ errorf("%s(%s) - outgoing connection failed: %s", name, addrStr, elideError(err))
conn.Reject()
return
}
@@ -220,13 +220,13 @@ func clientHandler(f base.ClientFactory, conn *pt.SocksConn, proxyURI *url.URL)
// bytes back and forth.
remote, err := f.WrapConn(remoteConn, args)
if err != nil {
- warnf("%s(%s) - handshake failed: %s", name, addrStr, elideError(err))
+ errorf("%s(%s) - handshake failed: %s", name, addrStr, elideError(err))
conn.Reject()
return
}
err = conn.Grant(remoteConn.RemoteAddr().(*net.TCPAddr))
if err != nil {
- warnf("%s(%s) - SOCKS grant failed: %s", name, addrStr, elideError(err))
+ errorf("%s(%s) - SOCKS grant failed: %s", name, addrStr, elideError(err))
return
}
@@ -391,7 +391,7 @@ func main() {
// Handle the command line arguments.
_, execName := path.Split(os.Args[0])
showVer := flag.Bool("version", false, "Print version and exit")
- logLevelStr := flag.String("logLevel", "WARN", "Log level (ERROR/WARN/INFO)")
+ logLevelStr := flag.String("logLevel", "ERROR", "Log level (ERROR/WARN/INFO)")
flag.BoolVar(&enableLogging, "enableLogging", false, "Log to TOR_PT_STATE_LOCATION/"+obfs4proxyLogFile)
flag.BoolVar(&unsafeLogging, "unsafeLogging", false, "Disable the address scrubber")
flag.Parse()