From 7481a859b624c01bc1d4324475acfa39491b2dab Mon Sep 17 00:00:00 2001 From: Haruue Icymoon Date: Wed, 23 Nov 2022 23:32:47 +0800 Subject: [PATCH] fix(tun): udp not work when timeout not specified --- cmd/client_gpl.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/client_gpl.go b/cmd/client_gpl.go index 177e89b..de7aa0b 100644 --- a/cmd/client_gpl.go +++ b/cmd/client_gpl.go @@ -73,7 +73,7 @@ func startTUN(config *clientConfig, client *core.Client, errChan chan error) { } } - tunServer, err := tun.NewServer(client, time.Duration(config.TUN.Timeout)*time.Second, + tunServer, err := tun.NewServer(client, timeout, config.TUN.Name, config.TUN.MTU, int(tcpSendBufferSize), int(tcpReceiveBufferSize), config.TUN.TCPModerateReceiveBuffer) if err != nil {