From f6e315ba370a64ea8e438fbd9b8064053bed9f43 Mon Sep 17 00:00:00 2001 From: esrrhs Date: Fri, 25 Oct 2019 20:42:51 +0800 Subject: [PATCH] add --- cmd/main.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cmd/main.go b/cmd/main.go index d9fda2b..544101a 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -71,6 +71,7 @@ func main() { return } + loggo.Ini(loggo.Config{Level: loggo.LEVEL_DEBUG, Prefix: "pingtunnel", MaxDay: 7}) loggo.Info("start...") loggo.Info("key %d", *key) @@ -90,6 +91,12 @@ func main() { loggo.Info("server %s", *server) loggo.Info("target %s", *target) + if *tcpmode == 0 { + *tcpmode_buffersize = 0 + *tcpmode_maxwin = 0 + *tcpmode_resend_timems = 0 + } + c, err := pingtunnel.NewClient(*listen, *server, *target, *timeout, *key, *tcpmode, *tcpmode_buffersize, *tcpmode_maxwin, *tcpmode_resend_timems) if err != nil {