Documentation ¶
Index ¶
- type BytesTransferred
- type OutlineConnectionSource
- type OutlineKey
- type OutlineVPN
- func (vpn *OutlineVPN) AddKey(key *OutlineKey) (*OutlineKey, error)
- func (vpn *OutlineVPN) DeleteKey(key *OutlineKey) error
- func (vpn *OutlineVPN) DeleteKeyByID(id string) error
- func (vpn *OutlineVPN) GetKey(id string) (*OutlineKey, error)
- func (vpn *OutlineVPN) GetKeys() ([]OutlineKey, error)
- func (vpn *OutlineVPN) GetOrCreateKey(id string) (*OutlineKey, error)
- func (vpn *OutlineVPN) GetServerInfo() (*ServerInfo, error)
- func (vpn *OutlineVPN) GetTransferMetrics() (*BytesTransferred, error)
- func (vpn *OutlineVPN) KeyExists(id string) bool
- func (vpn *OutlineVPN) RenameKey(key *OutlineKey, name string) error
- func (vpn *OutlineVPN) RenameKeyByID(id string, name string) error
- type ServerInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BytesTransferred ¶
type BytesTransferred struct {
BytesTransferredByUserId map[string]int64 `json:"bytesTransferredByUserId"`
}
BytesTransferred represents transferred bytes by client when using Outline VPN
type OutlineConnectionSource ¶
type OutlineConnectionSource struct { Server string `json:"server"` ServerPort int `json:"server_port"` Password string `json:"password"` Method string `json:"method"` }
OutlineConnectionSource represents connection data given by Outline server https://www.reddit.com/r/outlinevpn/wiki/index/dynamic_access_keys/
func NewOutlineConnection ¶
func NewOutlineConnection(server string, port int, password string, method string) *OutlineConnectionSource
NewOutlineConnection creates a new Outline client connection source.
type OutlineKey ¶
type OutlineKey struct { ID string `json:"id"` Name string `json:"name"` Password string `json:"password"` Port int64 `json:"port"` Method string `json:"method"` AccessURL string `json:"accessUrl"` }
OutlineKey represents access key parameters for Outline server
func NewOutlineKey ¶ added in v0.0.6
func NewOutlineKey() *OutlineKey
func (*OutlineKey) AsSource ¶ added in v0.0.5
func (key *OutlineKey) AsSource() (*OutlineConnectionSource, error)
func (*OutlineKey) IsInitialized ¶ added in v0.0.6
func (key *OutlineKey) IsInitialized() bool
type OutlineVPN ¶
type OutlineVPN struct {
// contains filtered or unexported fields
}
OutlineVPN represents connection source to manage Outline VPN server
func NewOutlineVPN ¶
func NewOutlineVPN(apiURL string, certSha256 string) (*OutlineVPN, error)
NewOutlineVPN creates a new Outline VPN management connection source.
func (*OutlineVPN) AddKey ¶
func (vpn *OutlineVPN) AddKey(key *OutlineKey) (*OutlineKey, error)
func (*OutlineVPN) DeleteKey ¶
func (vpn *OutlineVPN) DeleteKey(key *OutlineKey) error
func (*OutlineVPN) DeleteKeyByID ¶
func (vpn *OutlineVPN) DeleteKeyByID(id string) error
func (*OutlineVPN) GetKey ¶
func (vpn *OutlineVPN) GetKey(id string) (*OutlineKey, error)
func (*OutlineVPN) GetKeys ¶
func (vpn *OutlineVPN) GetKeys() ([]OutlineKey, error)
func (*OutlineVPN) GetOrCreateKey ¶ added in v0.0.6
func (vpn *OutlineVPN) GetOrCreateKey(id string) (*OutlineKey, error)
func (*OutlineVPN) GetServerInfo ¶
func (vpn *OutlineVPN) GetServerInfo() (*ServerInfo, error)
func (*OutlineVPN) GetTransferMetrics ¶
func (vpn *OutlineVPN) GetTransferMetrics() (*BytesTransferred, error)
func (*OutlineVPN) KeyExists ¶ added in v0.0.6
func (vpn *OutlineVPN) KeyExists(id string) bool
func (*OutlineVPN) RenameKey ¶
func (vpn *OutlineVPN) RenameKey(key *OutlineKey, name string) error
func (*OutlineVPN) RenameKeyByID ¶
func (vpn *OutlineVPN) RenameKeyByID(id string, name string) error
type ServerInfo ¶
type ServerInfo struct { Name string `json:"name"` ServerID string `json:"serverId"` MetricsEnabled bool `json:"metricsEnabled"` CreatedTimestampMs int64 `json:"createdTimestampMs"` Version string `json:"version"` AccessKeyDataLimit struct { Bytes int64 `json:"bytes"` } `json:"accessKeyDataLimit"` PortForNewAccessKeys int `json:"portForNewAccessKeys"` HostnameForAccessKeys string `json:"hostnameForAccessKeys"` }
ServerInfo represents Outline server info
Click to show internal directories.
Click to hide internal directories.