diff --git a/internal/configuration/privateinternetaccess.go b/internal/configuration/privateinternetaccess.go index 91536410..e3a15388 100644 --- a/internal/configuration/privateinternetaccess.go +++ b/internal/configuration/privateinternetaccess.go @@ -22,7 +22,9 @@ func (settings *Provider) privateinternetaccessLines() (lines []string) { lines = append(lines, lastIndent+"Encryption preset: "+settings.ServerSelection.EncryptionPreset) - lines = append(lines, lastIndent+"Custom port: "+strconv.Itoa(int(settings.ServerSelection.CustomPort))) + if settings.ServerSelection.CustomPort > 0 { + lines = append(lines, lastIndent+"Custom port: "+strconv.Itoa(int(settings.ServerSelection.CustomPort))) + } if settings.PortForwarding.Enabled { lines = append(lines, lastIndent+"Port forwarding:") diff --git a/internal/configuration/windscribe.go b/internal/configuration/windscribe.go index fc0f931f..0a9a4325 100644 --- a/internal/configuration/windscribe.go +++ b/internal/configuration/windscribe.go @@ -19,7 +19,9 @@ func (settings *Provider) windscribeLines() (lines []string) { lines = append(lines, lastIndent+"Hostnames: "+commaJoin(settings.ServerSelection.Hostnames)) } - lines = append(lines, lastIndent+"Custom port: "+strconv.Itoa(int(settings.ServerSelection.CustomPort))) + if settings.ServerSelection.CustomPort > 0 { + lines = append(lines, lastIndent+"Custom port: "+strconv.Itoa(int(settings.ServerSelection.CustomPort))) + } return lines }