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 {