Skip to content
Snippets Groups Projects
Commit c807103b authored by cyberta's avatar cyberta
Browse files

don't log each write and read action

parent a1439342
Branches tun2torsocks
No related tags found
No related merge requests found
......@@ -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
})
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment