Documentation
¶
Overview ¶
Package profiles defines a wrapper around the various profiles returned by the /info endpoint
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Info ¶
type Info struct {
Info ListInfo `json:"info"`
}
Info is the top-level struct for the info endpoint
type ListInfo ¶
type ListInfo struct {
ProfileList []Profile `json:"profile_list"`
}
ListInfo is the struct that has the profile list
type Profile ¶
type Profile struct { // ID is the identifier of the profile // Used to select a profile ID string `json:"profile_id"` // DisplayName defines the UI friendly name for the profile DisplayName string `json:"display_name"` // VPNProtoList defines the list of VPN protocols // E.g. wireguard, openvpn VPNProtoList []string `json:"vpn_proto_list"` // VPNProtoTransportList defines the list of VPN protocols including their transport values // E.g. wireguard+udp, openvpn+tcp VPNProtoTransportList []string `json:"vpn_proto_transport_list"` // DefaultGateway specifies whether or not this profile is a default gateway profile DefaultGateway bool `json:"default_gateway"` // DNSSearchDomains specifies the list of dns search domains // This is provided for a Linux client issue // See: https://github.com/eduvpn/python-eduvpn-client/issues/550 DNSSearchDomains []string `json:"dns_search_domain_list"` // Priority is the priority of the profile for sorting in the UI // the higher the priority, the higher it should be in the list Priority int `json:"profile_priority"` }
Profile is the information for a profile
func (*Profile) HasOpenVPN ¶
HasOpenVPN returns whether or not the profile has OpenVPN support
func (*Profile) HasWireGuard ¶
HasWireGuard returns whether or not the profile has WireGuard support
func (*Profile) ShouldFailover ¶
ShouldFailover returns whether or not this VPN profile should start a failover procedure This is true when the profile supports a TCP connection If we cannot determine whether it supports a TCP connection (because the server doesn't provide the VPN transport list function yet), we will just check if it supports OpenVPN