Fix: log custom port only if set (PIA, Windscribe)

This commit is contained in:
Quentin McGaw
2021-05-19 17:53:11 +00:00
parent 4f521e4dcb
commit a3751a77aa
2 changed files with 6 additions and 2 deletions

View File

@@ -22,7 +22,9 @@ func (settings *Provider) privateinternetaccessLines() (lines []string) {
lines = append(lines, lastIndent+"Encryption preset: "+settings.ServerSelection.EncryptionPreset) 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 { if settings.PortForwarding.Enabled {
lines = append(lines, lastIndent+"Port forwarding:") lines = append(lines, lastIndent+"Port forwarding:")

View File

@@ -19,7 +19,9 @@ func (settings *Provider) windscribeLines() (lines []string) {
lines = append(lines, lastIndent+"Hostnames: "+commaJoin(settings.ServerSelection.Hostnames)) 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 return lines
} }