Documentation ¶
Index ¶
- func InitializeLog(logLevel string, filePath string) error
- type Auth
- type Client
- func (c *Client) ClearLoginComplete()
- func (c *Client) DeselectRoute(id string) error
- func (c *Client) GetRoutesSelectionDetails() (*RoutesSelectionDetails, error)
- func (c *Client) GetStatusDetails() *StatusDetails
- func (c *Client) IsLoginComplete() bool
- func (c *Client) IsLoginRequired() bool
- func (c *Client) LoginForMobile() string
- func (c *Client) RemoveConnectionListener()
- func (c *Client) Run(fd int32, interfaceName string) error
- func (c *Client) SelectRoute(id string) error
- func (c *Client) SetConnectionListener(listener ConnectionListener)
- func (c *Client) SetTraceLogLevel()
- func (c *Client) Stop()
- type ConnectionListener
- type CustomLogger
- type DnsManager
- type DomainCollection
- type DomainDetails
- type DomainInfo
- type ErrListener
- type NetworkChangeListener
- type PeerInfo
- type PeerInfoCollection
- type Preferences
- func (p *Preferences) Commit() error
- func (p *Preferences) GetAdminURL() (string, error)
- func (p *Preferences) GetManagementURL() (string, error)
- func (p *Preferences) GetPreSharedKey() (string, error)
- func (p *Preferences) GetRosenpassEnabled() (bool, error)
- func (p *Preferences) GetRosenpassPermissive() (bool, error)
- func (p *Preferences) SetAdminURL(url string)
- func (p *Preferences) SetManagementURL(url string)
- func (p *Preferences) SetPreSharedKey(key string)
- func (p *Preferences) SetRosenpassEnabled(enabled bool)
- func (p *Preferences) SetRosenpassPermissive(permissive bool)
- type RoutesDetails
- type RoutesInfo
- type RoutesInfoCollection
- type RoutesSelectionDetails
- type RoutesSelectionInfo
- type RoutesSelectionInfoCollection
- type SSOListener
- type StatusDetails
- type URLOpener
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitializeLog ¶
InitializeLog initializes the log file.
Types ¶
type Auth ¶
type Auth struct {
// contains filtered or unexported fields
}
Auth can register or login new client
func NewAuthWithConfig ¶
NewAuthWithConfig instantiate Auth based on existing config
func (*Auth) LoginWithSetupKeyAndSaveConfig ¶
LoginWithSetupKeyAndSaveConfig test the connectivity with the management server with the setup key.
func (*Auth) SaveConfigIfSSOSupported ¶
SaveConfigIfSSOSupported test the connectivity with the management server by retrieving the server device flow info. If it returns a flow info than save the configuration and return true. If it gets a codes.NotFound, it means that SSO is not supported and returns false without saving the configuration. For other errors return false.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client struct manage the life circle of background service
func NewClient ¶
func NewClient(cfgFile, deviceName string, osVersion string, osName string, networkChangeListener NetworkChangeListener, dnsManager DnsManager) *Client
NewClient instantiate a new Client
func (*Client) ClearLoginComplete ¶
func (c *Client) ClearLoginComplete()
func (*Client) DeselectRoute ¶ added in v0.27.5
func (*Client) GetRoutesSelectionDetails ¶ added in v0.27.5
func (c *Client) GetRoutesSelectionDetails() (*RoutesSelectionDetails, error)
func (*Client) GetStatusDetails ¶
func (c *Client) GetStatusDetails() *StatusDetails
getStatusDetails return with the list of the PeerInfos
func (*Client) IsLoginComplete ¶
func (*Client) IsLoginRequired ¶
func (*Client) LoginForMobile ¶
func (*Client) RemoveConnectionListener ¶
func (c *Client) RemoveConnectionListener()
RemoveConnectionListener remove connection listener
func (*Client) SelectRoute ¶ added in v0.27.5
func (*Client) SetConnectionListener ¶
func (c *Client) SetConnectionListener(listener ConnectionListener)
SetConnectionListener set the network connection listener
func (*Client) SetTraceLogLevel ¶
func (c *Client) SetTraceLogLevel()
ÏSetTraceLogLevel configure the logger to trace level
type ConnectionListener ¶
ConnectionListener export internal Listener for mobile
type CustomLogger ¶
CustomLogger export internal CustomLogger for mobile
type DnsManager ¶
type DnsManager interface { dns.IosDnsManager }
DnsManager export internal dns Manager for mobile
type DomainCollection ¶ added in v0.28.5
type DomainCollection interface { Add(s DomainInfo) DomainCollection Get(i int) *DomainInfo Size() int }
type DomainDetails ¶ added in v0.28.5
type DomainDetails struct {
// contains filtered or unexported fields
}
func (DomainDetails) Add ¶ added in v0.28.5
func (array DomainDetails) Add(s DomainInfo) DomainCollection
func (DomainDetails) Get ¶ added in v0.28.5
func (array DomainDetails) Get(i int) *DomainInfo
func (DomainDetails) Size ¶ added in v0.28.5
func (array DomainDetails) Size() int
type DomainInfo ¶ added in v0.28.5
type ErrListener ¶
type ErrListener interface { OnSuccess() OnError(error) }
ErrListener is async listener for mobile framework
type NetworkChangeListener ¶
type NetworkChangeListener interface { listener.NetworkChangeListener }
RouteListener export internal RouteListener for mobile
type PeerInfo ¶
type PeerInfo struct { IP string FQDN string LocalIceCandidateEndpoint string RemoteIceCandidateEndpoint string LocalIceCandidateType string RemoteIceCandidateType string PubKey string Latency string BytesRx int64 BytesTx int64 ConnStatus string ConnStatusUpdate string Direct bool LastWireguardHandshake string Relayed bool RosenpassEnabled bool Routes RoutesDetails }
PeerInfo describe information about the peers. It designed for the UI usage
func (PeerInfo) GetRouteDetails ¶ added in v0.27.5
func (p PeerInfo) GetRouteDetails() *RoutesDetails
GetRoutes return with RouteDetails
type PeerInfoCollection ¶
type PeerInfoCollection interface { Add(s string) PeerInfoCollection Get(i int) string Size() int GetFQDN() string GetIP() string }
PeerInfoCollection made for Java layer to get non default types as collection
type Preferences ¶
type Preferences struct {
// contains filtered or unexported fields
}
Preferences export a subset of the internal config for gomobile
func NewPreferences ¶
func NewPreferences(configPath string) *Preferences
NewPreferences create new Preferences instance
func (*Preferences) Commit ¶
func (p *Preferences) Commit() error
Commit write out the changes into config file
func (*Preferences) GetAdminURL ¶
func (p *Preferences) GetAdminURL() (string, error)
GetAdminURL read url from config file
func (*Preferences) GetManagementURL ¶
func (p *Preferences) GetManagementURL() (string, error)
GetManagementURL read url from config file
func (*Preferences) GetPreSharedKey ¶
func (p *Preferences) GetPreSharedKey() (string, error)
GetPreSharedKey read preshared key from config file
func (*Preferences) GetRosenpassEnabled ¶ added in v0.27.4
func (p *Preferences) GetRosenpassEnabled() (bool, error)
GetRosenpassEnabled read rosenpass enabled from config file
func (*Preferences) GetRosenpassPermissive ¶ added in v0.27.4
func (p *Preferences) GetRosenpassPermissive() (bool, error)
GetRosenpassPermissive read rosenpass permissive from config file
func (*Preferences) SetAdminURL ¶
func (p *Preferences) SetAdminURL(url string)
SetAdminURL store the given url and wait for commit
func (*Preferences) SetManagementURL ¶
func (p *Preferences) SetManagementURL(url string)
SetManagementURL store the given url and wait for commit
func (*Preferences) SetPreSharedKey ¶
func (p *Preferences) SetPreSharedKey(key string)
SetPreSharedKey store the given key and wait for commit
func (*Preferences) SetRosenpassEnabled ¶ added in v0.27.4
func (p *Preferences) SetRosenpassEnabled(enabled bool)
SetRosenpassEnabled store if rosenpass is enabled
func (*Preferences) SetRosenpassPermissive ¶ added in v0.27.4
func (p *Preferences) SetRosenpassPermissive(permissive bool)
SetRosenpassPermissive store the given permissive and wait for commit
type RoutesDetails ¶ added in v0.27.5
type RoutesDetails struct {
// contains filtered or unexported fields
}
func (RoutesDetails) Add ¶ added in v0.27.5
func (array RoutesDetails) Add(s RoutesInfo) RoutesDetails
Add new PeerInfo to the collection
func (RoutesDetails) Get ¶ added in v0.27.5
func (array RoutesDetails) Get(i int) *RoutesInfo
Get return an element of the collection
func (RoutesDetails) Size ¶ added in v0.27.5
func (array RoutesDetails) Size() int
Size return with the size of the collection
type RoutesInfo ¶ added in v0.27.5
type RoutesInfo struct {
Route string
}
type RoutesInfoCollection ¶ added in v0.27.5
type RoutesInfoCollection interface { Add(s string) RoutesInfoCollection Get(i int) string Size() int }
RoutesInfoCollection made for Java layer to get non default types as collection
type RoutesSelectionDetails ¶ added in v0.27.5
type RoutesSelectionDetails struct { All bool Append bool // contains filtered or unexported fields }
func (RoutesSelectionDetails) Add ¶ added in v0.27.5
func (array RoutesSelectionDetails) Add(s RoutesSelectionInfo) RoutesSelectionDetails
Add new PeerInfo to the collection
func (RoutesSelectionDetails) Get ¶ added in v0.27.5
func (array RoutesSelectionDetails) Get(i int) *RoutesSelectionInfo
Get return an element of the collection
func (RoutesSelectionDetails) Size ¶ added in v0.27.5
func (array RoutesSelectionDetails) Size() int
Size return with the size of the collection
type RoutesSelectionInfo ¶ added in v0.27.5
type RoutesSelectionInfo struct { ID string Network string Domains *DomainDetails Selected bool }
type RoutesSelectionInfoCollection ¶ added in v0.27.5
type RoutesSelectionInfoCollection interface { Add(s string) RoutesSelectionInfoCollection Get(i int) string Size() int }
RoutesSelectionInfoCollection made for Java layer to get non default types as collection
type SSOListener ¶
SSOListener is async listener for mobile framework
type StatusDetails ¶
type StatusDetails struct {
// contains filtered or unexported fields
}
StatusDetails is the implementation of the PeerInfoCollection
func (StatusDetails) Add ¶
func (array StatusDetails) Add(s PeerInfo) StatusDetails
Add new PeerInfo to the collection
func (StatusDetails) Get ¶
func (array StatusDetails) Get(i int) *PeerInfo
Get return an element of the collection
func (StatusDetails) GetFQDN ¶
func (array StatusDetails) GetFQDN() string
GetFQDN return with the FQDN of the local peer
func (StatusDetails) GetIP ¶
func (array StatusDetails) GetIP() string
GetIP return with the IP of the local peer
func (StatusDetails) Size ¶
func (array StatusDetails) Size() int
Size return with the size of the collection