From c807103be1cae8c2a2b97a716298fb554e30ee2d Mon Sep 17 00:00:00 2001
From: cyBerta <cyberta@riseup.net>
Date: Fri, 1 Jul 2022 02:45:39 +0200
Subject: [PATCH] don't log each write and read action

---
 tun2torsocks/tun2torsocks.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tun2torsocks/tun2torsocks.go b/tun2torsocks/tun2torsocks.go
index bfbdcd5..7a8a361 100644
--- a/tun2torsocks/tun2torsocks.go
+++ b/tun2torsocks/tun2torsocks.go
@@ -28,7 +28,7 @@ type TorSocksTunnel struct {
 // InputPacket writes IP packets to the socks interface using lwIP stack.
 func (t *TorSocksTunnel) InputPacket(data []byte) {
 	if t.lwipStack != nil {
-		t.log("writing ", data)
+		// t.log("writing ", data)
 		t.lwipStack.Write(data)
 	}
 }
@@ -39,8 +39,8 @@ func (t *TorSocksTunnel) Start(socksOutput SocksOutput, proxyHost string, proxyP
 		t.lwipStack = core.NewLWIPStack()
 		core.RegisterTCPConnHandler(socks.NewTCPHandler(proxyHost, uint16(proxyPort)))
 		core.RegisterOutputFn(func(data []byte) (int, error) {
-			t.log("reading ", data)
 			socksOutput.WritePacket(data)
+			// t.log("reading ", data)
 			return len(data), nil
 		})
 	}
-- 
GitLab