From 301515d2e86e30904dc5ca9cd81057049d7de8ff Mon Sep 17 00:00:00 2001 From: fatedier Date: Tue, 21 May 2024 12:00:35 +0800 Subject: [PATCH] update the default value of transport.tcpMuxKeepaliveInterval (#4231) --- Release.md | 4 ++++ conf/frpc_full_example.toml | 2 +- conf/frps_full_example.toml | 2 +- pkg/config/v1/client.go | 2 +- pkg/config/v1/server.go | 2 +- pkg/util/version/version.go | 2 +- 6 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Release.md b/Release.md index 940fa94f..ef65ec1c 100644 --- a/Release.md +++ b/Release.md @@ -1,3 +1,7 @@ ### Fixes * Fixed an issue where HTTP/2 was not enabled for https2http and https2https plugins. + +### Changes + +* Updated the default value of `transport.tcpMuxKeepaliveInterval` from 60 to 30. diff --git a/conf/frpc_full_example.toml b/conf/frpc_full_example.toml index 3d4d0347..c88087a1 100644 --- a/conf/frpc_full_example.toml +++ b/conf/frpc_full_example.toml @@ -76,7 +76,7 @@ transport.poolCount = 5 # Specify keep alive interval for tcp mux. # only valid if tcpMux is enabled. -# transport.tcpMuxKeepaliveInterval = 60 +# transport.tcpMuxKeepaliveInterval = 30 # Communication protocol used to connect to server # supports tcp, kcp, quic, websocket and wss now, default is tcp diff --git a/conf/frps_full_example.toml b/conf/frps_full_example.toml index 35c1a57b..a4fc2736 100644 --- a/conf/frps_full_example.toml +++ b/conf/frps_full_example.toml @@ -34,7 +34,7 @@ transport.maxPoolCount = 5 # Specify keep alive interval for tcp mux. # only valid if tcpMux is true. -# transport.tcpMuxKeepaliveInterval = 60 +# transport.tcpMuxKeepaliveInterval = 30 # tcpKeepalive specifies the interval between keep-alive probes for an active network connection between frpc and frps. # If negative, keep-alive probes are disabled. diff --git a/pkg/config/v1/client.go b/pkg/config/v1/client.go index 35d8071c..d43ec1bc 100644 --- a/pkg/config/v1/client.go +++ b/pkg/config/v1/client.go @@ -135,7 +135,7 @@ func (c *ClientTransportConfig) Complete() { c.ProxyURL = util.EmptyOr(c.ProxyURL, os.Getenv("http_proxy")) c.PoolCount = util.EmptyOr(c.PoolCount, 1) c.TCPMux = util.EmptyOr(c.TCPMux, lo.ToPtr(true)) - c.TCPMuxKeepaliveInterval = util.EmptyOr(c.TCPMuxKeepaliveInterval, 60) + c.TCPMuxKeepaliveInterval = util.EmptyOr(c.TCPMuxKeepaliveInterval, 30) if lo.FromPtr(c.TCPMux) { // If TCPMux is enabled, heartbeat of application layer is unnecessary because we can rely on heartbeat in tcpmux. c.HeartbeatInterval = util.EmptyOr(c.HeartbeatInterval, -1) diff --git a/pkg/config/v1/server.go b/pkg/config/v1/server.go index c4ef59de..3108cd34 100644 --- a/pkg/config/v1/server.go +++ b/pkg/config/v1/server.go @@ -176,7 +176,7 @@ type ServerTransportConfig struct { func (c *ServerTransportConfig) Complete() { c.TCPMux = util.EmptyOr(c.TCPMux, lo.ToPtr(true)) - c.TCPMuxKeepaliveInterval = util.EmptyOr(c.TCPMuxKeepaliveInterval, 60) + c.TCPMuxKeepaliveInterval = util.EmptyOr(c.TCPMuxKeepaliveInterval, 30) c.TCPKeepAlive = util.EmptyOr(c.TCPKeepAlive, 7200) c.MaxPoolCount = util.EmptyOr(c.MaxPoolCount, 5) if lo.FromPtr(c.TCPMux) { diff --git a/pkg/util/version/version.go b/pkg/util/version/version.go index c6f3f04b..11d140eb 100644 --- a/pkg/util/version/version.go +++ b/pkg/util/version/version.go @@ -14,7 +14,7 @@ package version -var version = "0.58.0" +var version = "0.58.1" func Full() string { return version