Feature: filter by hostname for PureVPN servers

- Record support for TCP and UDP for each hostname
- Fix: each hostname supports only TCP or UDP, not both
- Update PureVPN server information
This commit is contained in:
Quentin McGaw
2021-05-10 00:36:14 +00:00
parent 4fe1e062f2
commit 6c1c069261
11 changed files with 185 additions and 103 deletions

View File

@@ -17,6 +17,10 @@ func (settings *Provider) purevpnLines() (lines []string) {
lines = append(lines, lastIndent+"Cities: "+commaJoin(settings.ServerSelection.Cities))
}
if len(settings.ServerSelection.Hostnames) > 0 {
lines = append(lines, lastIndent+"Hostnames: "+commaJoin(settings.ServerSelection.Hostnames))
}
return lines
}
@@ -48,5 +52,10 @@ func (settings *Provider) readPurevpn(r reader) (err error) {
return err
}
settings.ServerSelection.Hostnames, err = r.env.CSVInside("SERVER_HOSTNAME", constants.PurevpnHostnameChoices())
if err != nil {
return err
}
return nil
}