From f7929229c8c903d529df59aa3d83dffa25e17978 Mon Sep 17 00:00:00 2001 From: Audrius Butkevicius Date: Mon, 22 Mar 2021 20:47:51 +0000 Subject: [PATCH] cmd/strelaysrv: Increase default strelaysrv network buffer size (fixes #7514) (#7517) Increases throughput at the cost of more memory per connection --- cmd/strelaysrv/main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/strelaysrv/main.go b/cmd/strelaysrv/main.go index 09876079e..fea34ccd4 100644 --- a/cmd/strelaysrv/main.go +++ b/cmd/strelaysrv/main.go @@ -99,7 +99,7 @@ func main() { flag.IntVar(&natRenewal, "nat-renewal", 30, "NAT renewal frequency in minutes") flag.IntVar(&natTimeout, "nat-timeout", 10, "NAT discovery timeout in seconds") flag.BoolVar(&pprofEnabled, "pprof", false, "Enable the built in profiling on the status server") - flag.IntVar(&networkBufferSize, "network-buffer", 2048, "Network buffer size (two of these per proxied connection)") + flag.IntVar(&networkBufferSize, "network-buffer", 65536, "Network buffer size (two of these per proxied connection)") showVersion := flag.Bool("version", false, "Show version") flag.Parse() @@ -233,6 +233,7 @@ func main() { uri, err := url.Parse(fmt.Sprintf("relay://%s/?id=%s&pingInterval=%s&networkTimeout=%s&sessionLimitBps=%d&globalLimitBps=%d&statusAddr=%s&providedBy=%s", mapping.Address(), id, pingInterval, networkTimeout, sessionLimitBps, globalLimitBps, statusAddr, providedBy)) if err != nil { log.Fatalln("Failed to construct URI", err) + return } log.Println("URI:", uri.String())