Maint: hardcoded data in JSON embedded file

- Server information, versions and timestamps together in internal/constants/servers.json
- breaking change: updater cli uses -enduser instead of -file
- breaking change: updater cli uses -maintainer instead of -stdout
- Fix: replace special last a character with 'a' from Bogota for PrivateVPN
- Feat: do not write out servers and timestamp if no change was detected
This commit is contained in:
Quentin McGaw (desktop)
2021-07-20 03:01:26 +00:00
parent 394abbbe35
commit da4d528463
49 changed files with 109965 additions and 12159 deletions

View File

@@ -28,8 +28,7 @@ type Updater struct {
Vyprvpn bool `json:"vyprvpn"`
Windscribe bool `json:"windscribe"`
// The two below should be used in CLI mode only
Stdout bool `json:"-"` // in order to update constants file (maintainer side)
CLI bool `json:"-"`
CLI bool `json:"-"`
}
func (settings *Updater) String() string {
@@ -66,7 +65,6 @@ func (settings *Updater) read(r reader) (err error) {
settings.VPNUnlimited = true
settings.Vyprvpn = true
settings.Windscribe = true
settings.Stdout = false
settings.CLI = false
// use cloudflare in plaintext to not be blocked by DNS over TLS by default.
// If a plaintext address is set in the DNS settings, this one will be used.