[tor-commits] [flashproxy/master] Don't show specific error messages when proxying fails.
dcf at torproject.org
dcf at torproject.org
Sun Feb 17 05:00:19 UTC 2013
commit 90d54824b7b0ba5b7c52e0dc934a8e5c6ae8bbb6
Author: David Fifield <david at bamsoftware.com>
Date: Sun Feb 3 17:35:36 2013 -0800
Don't show specific error messages when proxying fails.
The error messages contain the IP address of a proxy or client. I don't
know how to prevent the lower-level error messages from including the IP
address, so just omit the whole message.
The error messages look like
error copying WebSocket to ORPort: read tcp X.X.X.X:YYYY: connection reset by peer
error copying WebSocket to ORPort: read tcp X.X.X.X:YYYY: use of closed network connection
The great majority of them are "use of closed network connection", which
may be a bug related to the sharing of streams in different goroutines.
Here are the frequencies of different errors:
1 connection timed out
19 connection reset by peer
1137 use of closed network connection
---
websocket-transport/websocket-server.go | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/websocket-transport/websocket-server.go b/websocket-transport/websocket-server.go
index 6ce9e54..56c4b5b 100644
--- a/websocket-transport/websocket-server.go
+++ b/websocket-transport/websocket-server.go
@@ -126,7 +126,7 @@ func proxy(local *net.TCPConn, conn *websocketConn) {
go func() {
_, err := io.Copy(conn, local)
if err != nil {
- Log("error copying ORPort to WebSocket: " + err.Error())
+ Log("error copying ORPort to WebSocket")
}
local.CloseRead()
conn.Close()
@@ -136,7 +136,7 @@ func proxy(local *net.TCPConn, conn *websocketConn) {
go func() {
_, err := io.Copy(local, conn)
if err != nil {
- Log("error copying WebSocket to ORPort: " + err.Error())
+ Log("error copying WebSocket to ORPort")
}
local.CloseWrite()
conn.Close()
More information about the tor-commits
mailing list