From 9f12ffc069ed4d95f2b4f19adad359155c59b8ed Mon Sep 17 00:00:00 2001 From: "Quentin McGaw (desktop)" Date: Tue, 24 Aug 2021 13:12:40 +0000 Subject: [PATCH] Fix: `MULTIHOP_ONLY` defaults to `no` --- internal/configuration/surfshark.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/configuration/surfshark.go b/internal/configuration/surfshark.go index bd39b98b..d835efc3 100644 --- a/internal/configuration/surfshark.go +++ b/internal/configuration/surfshark.go @@ -5,6 +5,7 @@ import ( "github.com/qdm12/gluetun/internal/constants" "github.com/qdm12/gluetun/internal/models" + "github.com/qdm12/golibs/params" ) func (settings *Provider) readSurfshark(r reader) (err error) { @@ -54,7 +55,7 @@ func (settings *Provider) readSurfshark(r reader) (err error) { settings.ServerSelection.Hostnames = append(settings.ServerSelection.Hostnames, locationData.Hostname) } - settings.ServerSelection.MultiHopOnly, err = r.env.YesNo("MULTIHOP_ONLY") + settings.ServerSelection.MultiHopOnly, err = r.env.YesNo("MULTIHOP_ONLY", params.Default("no")) if err != nil { return fmt.Errorf("environment variable MULTIHOP_ONLY: %w", err) }