Documentation ¶
Overview ¶
Package xmlprofile contains the XML profile.
Index ¶
- Variables
- type AllowCaptivePortalRemediation
- type AlwaysOn
- type AnyConnectProfile
- type AutomaticVPNPolicy
- type ConnectFailurePolicy
- type HostEntry
- type MobileHostEntryInfo
- type Pin
- type PrimaryProtocol
- type Profile
- func (p *Profile) Equal(other *Profile) bool
- func (p *Profile) GetAllowedHosts() (hosts []string)
- func (p *Profile) GetAlwaysOn() bool
- func (p *Profile) GetTNDHTTPSServers() (servers map[string]string)
- func (p *Profile) GetTNDServers() (servers []string)
- func (p *Profile) GetVPNServerHostNames() (servers []string)
- func (p *Profile) GetVPNServers() (servers []string)
- type ServerList
- type StandardAuthenticationOnly
- type TrustedHTTPSServer
Constants ¶
This section is empty.
Variables ¶
var (
// SystemProfile is the file path of the system XML profile.
SystemProfile = "/var/lib/oc-daemon/profile.xml"
)
Functions ¶
This section is empty.
Types ¶
type AllowCaptivePortalRemediation ¶
type AllowCaptivePortalRemediation struct { Flag string `xml:",chardata"` CaptivePortalRemediationTimeout string `xml:"CaptivePortalRemediationTimeout"` }
AllowCaptivePortalRemediation specifies if captive portal remediation is allowed in the profile.
type AlwaysOn ¶
type AlwaysOn struct { Flag bool `xml:",chardata"` ConnectFailurePolicy ConnectFailurePolicy `xml:"ConnectFailurePolicy"` AllowVPNDisconnect string `xml:"AllowVPNDisconnect"` AllowedHosts string `xml:"AllowedHosts"` }
AlwaysOn contains the AlwaysOn settings in the profile.
type AnyConnectProfile ¶
type AnyConnectProfile struct { AutomaticVPNPolicy AutomaticVPNPolicy `xml:"ClientInitialization>AutomaticVPNPolicy"` ServerList ServerList `xml:"ServerList"` }
AnyConnectProfile is the anyconnet profile.
type AutomaticVPNPolicy ¶
type AutomaticVPNPolicy struct { Flag string `xml:",chardata"` TrustedDNSDomains []string `xml:"TrustedDNSDomains"` TrustedDNSServers []string `xml:"TrustedDNSServers"` TrustedHTTPSServerList []TrustedHTTPSServer `xml:"TrustedHttpsServerList>TrustedHttpsServer"` TrustedNetworkPolicy string `xml:"TrustedNetworkPolicy"` UntrustedNetworkPolicy string `xml:"UntrustedNetworkPolicy"` AlwaysOn AlwaysOn `xml:"AlwaysOn"` }
AutomaticVPNPolicy contains the automatic vpn policy in the profile.
type ConnectFailurePolicy ¶
type ConnectFailurePolicy struct { Flag string `xml:",chardata"` AllowCaptivePortalRemediation AllowCaptivePortalRemediation `xml:"AllowCaptivePortalRemediation"` ApplyLastVPNLocalResourceRules string `xml:"ApplyLastVPNLocalResourceRules"` }
ConnectFailurePolicy specifies the connect failure policy in the profile.
type HostEntry ¶
type HostEntry struct { HostName string `xml:"HostName"` HostAddress string `xml:"HostAddress"` UserGroup string `xml:"UserGroup"` BackupServerList []string `xml:"BackupServerList>HostAddress"` LoadBalancingServerList []string `xml:"LoadBalancingServerList>HostAddress"` AutomaticSCEPHost string `xml:"AutomaticSCEPHost"` CAURL string `xml:"CAURL"` MobileHostEntryInfo MobileHostEntryInfo `xml:"MobileHostEntryInfo"` PrimaryProtocol PrimaryProtocol `xml:"PrimaryProtocol"` CertificatePinList []Pin `xml:"CertificatePinList>Pin"` }
HostEntry is a host entry in the profile.
type MobileHostEntryInfo ¶
type MobileHostEntryInfo struct { NetworkRoaming string `xml:"NetworkRoaming"` CertificatePolicy string `xml:"CertificatePolicy"` ConnectOnDemand string `xml:"ConnectOnDemand"` AlwaysConnectDomainList []string `xml:"AlwaysConnectDomainList"` NeverConnectDomainList []string `xml:"NeverConnectDomainList"` ConnectIfNeededDomainList []string `xml:"ConnectIfNeededDomainList"` ActivateOnImport string `xml:"ActivateOnImport"` }
MobileHostEntryInfo contains the mobile host entry info in the profile.
type PrimaryProtocol ¶
type PrimaryProtocol struct { Flag string `xml:",chardata"` StandardAuthenticationOnly StandardAuthenticationOnly `xml:"StandardAuthenticationOnly"` }
PrimaryProtocol specifies primary protocol in the profile.
type Profile ¶
type Profile AnyConnectProfile
Profile is an XML Profile.
func LoadProfile ¶
LoadProfile loads the XML profile from file.
func LoadSystemProfile ¶
func LoadSystemProfile() *Profile
LoadSystemProfile loads the XML profile from the default system location.
func (*Profile) GetAllowedHosts ¶
GetAllowedHosts returns the allowed hosts in the XML profile.
func (*Profile) GetAlwaysOn ¶
GetAlwaysOn returns the always on flag in the XML profile.
func (*Profile) GetTNDHTTPSServers ¶
GetTNDHTTPSServers gets the TND HTTPS server URLs and their hashes in the XML profile.
func (*Profile) GetTNDServers ¶
GetTNDServers returns the TND servers in the XML profile.
func (*Profile) GetVPNServerHostNames ¶
GetVPNServerHostNames returns the VPN server hostnames in the xml profile.
func (*Profile) GetVPNServers ¶
GetVPNServers returns the VPN servers in the XML profile.
type ServerList ¶
type ServerList struct {
HostEntry []HostEntry `xml:"HostEntry"`
}
ServerList is the server list in the profile.
type StandardAuthenticationOnly ¶
type StandardAuthenticationOnly struct { Flag string `xml:",chardata"` AuthMethodDuringIKENegotiation string `xml:"AuthMethodDuringIKENegotiation"` IKEIdentity string `xml:"IKEIdentity"` }
StandardAuthenticationOnly specifies standard authentication in the profile.
type TrustedHTTPSServer ¶
type TrustedHTTPSServer struct { Address string `xml:"Address"` Port string `xml:"Port"` CertificateHash string `xml:"CertificateHash"` }
TrustedHTTPSServer is a trusted https server in the profile.