Files
gluetun/internal/configuration/selection.go

64 lines
1.7 KiB
Go
Raw Normal View History

2021-02-06 11:05:50 -05:00
package configuration
import (
"net"
)
type ServerSelection struct { //nolint:maligned
2021-02-06 11:05:50 -05:00
// Common
TCP bool `json:"tcp"` // UDP if TCP is false
2021-02-06 18:31:14 +00:00
TargetIP net.IP `json:"target_ip,omitempty"`
// TODO comments
// Cyberghost, PIA, Protonvpn, Surfshark, Windscribe, Vyprvpn, NordVPN
2021-02-06 11:05:50 -05:00
Regions []string `json:"regions"`
// Cyberghost
Groups []string `json:"groups"`
2021-02-06 11:05:50 -05:00
// Fastestvpn, HideMyAss, IPVanish, IVPN, Mullvad, PrivateVPN, Protonvpn, PureVPN, VPNUnlimited
Countries []string `json:"countries"`
// HideMyAss, IPVanish, IVPN, Mullvad, PrivateVPN, Protonvpn, PureVPN, VPNUnlimited, Windscribe
Cities []string `json:"cities"`
// Fastestvpn, HideMyAss, IPVanish, IVPN, PrivateVPN, Windscribe, Privado, Protonvpn, VPNUnlimited
Hostnames []string `json:"hostnames"`
Names []string `json:"names"` // Protonvpn
2021-02-06 11:05:50 -05:00
// Mullvad
ISPs []string `json:"isps"`
Owned bool `json:"owned"`
// Mullvad, Windscribe, PIA
CustomPort uint16 `json:"custom_port"`
// NordVPN
Numbers []uint16 `json:"numbers"`
// PIA
EncryptionPreset string `json:"encryption_preset"`
// ProtonVPN
FreeOnly bool `json:"free_only"`
// VPNUnlimited
StreamOnly bool `json:"stream_only"`
2021-02-06 11:05:50 -05:00
}
type ExtraConfigOptions struct {
ClientCertificate string `json:"-"` // Cyberghost
ClientKey string `json:"-"` // Cyberghost, VPNUnlimited
2021-02-06 11:05:50 -05:00
EncryptionPreset string `json:"encryption_preset"` // PIA
OpenVPNIPv6 bool `json:"openvpn_ipv6"` // Mullvad
}
// PortForwarding contains settings for port forwarding.
type PortForwarding struct {
2021-02-06 18:31:14 +00:00
Enabled bool `json:"enabled"`
Filepath string `json:"filepath"`
2021-02-06 11:05:50 -05:00
}
func (p *PortForwarding) lines() (lines []string) {
return []string{
2021-02-06 18:31:14 +00:00
lastIndent + "File path: " + p.Filepath,
2021-02-06 11:05:50 -05:00
}
}