From 2822dc8dd17fd9ad86f72ee9e554098f90c52f95 Mon Sep 17 00:00:00 2001
From: Bolke de Bruin <bolke@xs4all.nl>
Date: Fri, 7 Aug 2020 09:22:33 +0200
Subject: [PATCH] Clean up

---
 protocol/common.go | 2 --
 protocol/server.go | 2 --
 2 files changed, 4 deletions(-)

diff --git a/protocol/common.go b/protocol/common.go
index 3cd0a08..3705364 100644
--- a/protocol/common.go
+++ b/protocol/common.go
@@ -110,7 +110,6 @@ func forward(in net.Conn, out transport.Transport) {
 		b1.Write(buf[:n])
 		out.WritePacket(createPacket(PKT_TYPE_DATA, b1.Bytes()))
 		b1.Reset()
-		log.Printf("Forward data")
 	}
 }
 
@@ -124,6 +123,5 @@ func receive(data []byte, out net.Conn) {
 	binary.Read(buf, binary.LittleEndian, &pkt)
 
 	out.Write(pkt)
-	log.Printf("Received data")
 }
 
diff --git a/protocol/server.go b/protocol/server.go
index d0d5978..13288dd 100644
--- a/protocol/server.go
+++ b/protocol/server.go
@@ -66,7 +66,6 @@ func (s *Server) Process(ctx context.Context) error {
 			return err
 		}
 
-		log.Printf("%x", pkt)
 		switch pt {
 		case PKT_TYPE_HANDSHAKE_REQUEST:
 			log.Printf("Client handshakeRequest from %s", common.GetClientIp(ctx))
@@ -142,7 +141,6 @@ func (s *Server) Process(ctx context.Context) error {
 			go forward(s.Remote, s.Session.TransportOut)
 			s.State = SERVER_STATE_CHANNEL_CREATE
 		case PKT_TYPE_DATA:
-			log.Printf("Data received")
 			if s.State < SERVER_STATE_CHANNEL_CREATE {
 				log.Printf("Data received while in wrong state %d != %d", s.State, SERVER_STATE_CHANNEL_CREATE)
 				return errors.New("wrong state")
-- 
GitLab