androidlib

package
v0.3.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 14, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Version

func Version() string

Types

type PeerStatus

type PeerStatus struct {
	IP, HostName            string
	LastActive              int64
	SendBytes, ReceiveBytes int64
	ActiveAddress           string
	LastFailure             string
}

type PeerStatusArray

type PeerStatusArray interface {
	Get(i int) *PeerStatus
	Size() int
}

type PeerStatusConsumer

type PeerStatusConsumer interface {
	OnPeerStatus(*PeerStatus)
}

type VpnConfig

type VpnConfig struct {
	// contains filtered or unexported fields
}

func ParseTunnelConfig

func ParseTunnelConfig(srcURL string) *VpnConfig

func (*VpnConfig) Error

func (c *VpnConfig) Error() string

func (*VpnConfig) HasGateway

func (c *VpnConfig) HasGateway() bool

func (*VpnConfig) LocalAddress

func (c *VpnConfig) LocalAddress() string

func (*VpnConfig) LocalAddressMasked

func (c *VpnConfig) LocalAddressMasked() string

func (*VpnConfig) MTU

func (c *VpnConfig) MTU() int

func (*VpnConfig) Mask

func (c *VpnConfig) Mask() int

func (*VpnConfig) Ok

func (c *VpnConfig) Ok() bool

type VpnContext

type VpnContext struct {
	// contains filtered or unexported fields
}

func PrepareVPN

func PrepareVPN(fd int, srcURL, dstURL string, key string, listener VpnEvent) *VpnContext

func (*VpnContext) Connect

func (c *VpnContext) Connect()

func (*VpnContext) Disconnect

func (c *VpnContext) Disconnect()

func (*VpnContext) GetPeerStatus

func (c *VpnContext) GetPeerStatus() PeerStatusArray

func (*VpnContext) Ok

func (c *VpnContext) Ok() bool

func (*VpnContext) ResetConnection

func (c *VpnContext) ResetConnection()

func (*VpnContext) StatusText

func (c *VpnContext) StatusText() string

type VpnEvent

type VpnEvent interface {
	OnDisconnect()
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL