Documentation
¶
Index ¶
- Variables
- type CmdStarter
- type DNSLoop
- type Firewall
- type Linker
- type Loop
- func (l *Loop) ApplyStatus(ctx context.Context, status models.LoopStatus) (outcome string, err error)
- func (l *Loop) GetSettings() (settings settings.VPN)
- func (l *Loop) GetStatus() (status models.LoopStatus)
- func (l *Loop) Run(ctx context.Context, done chan<- struct{})
- func (l *Loop) SetSettings(ctx context.Context, vpn settings.VPN) (outcome string)
- type NetLinker
- type OpenVPN
- type PortForward
- type PortForwarder
- type Provider
- type Providers
- type PublicIPLoop
- type Router
- type Routing
- type Ruler
- type Storage
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrPortForwardingNotSupported = errors.New("custom port forwarding obtention is not supported")
Functions ¶
This section is empty.
Types ¶
type CmdStarter ¶
type Linker ¶
type Linker interface { LinkList() (links []netlink.Link, err error) LinkByName(name string) (link netlink.Link, err error) LinkAdd(link netlink.Link) (linkIndex int, err error) LinkDel(link netlink.Link) (err error) LinkSetUp(link netlink.Link) (linkIndex int, err error) LinkSetDown(link netlink.Link) (err error) }
type Loop ¶
type Loop struct {
// contains filtered or unexported fields
}
func NewLoop ¶
func NewLoop(vpnSettings settings.VPN, ipv6Supported bool, vpnInputPorts []uint16, providers Providers, storage Storage, openvpnConf OpenVPN, netLinker NetLinker, fw Firewall, routing Routing, portForward PortForward, starter CmdStarter, publicip PublicIPLoop, dnsLooper DNSLoop, logger log.LoggerInterface, client *http.Client, buildInfo models.BuildInformation, versionInfo bool, ) *Loop
func (*Loop) ApplyStatus ¶
func (*Loop) GetSettings ¶
func (*Loop) GetStatus ¶
func (l *Loop) GetStatus() (status models.LoopStatus)
type PortForward ¶
type PortForward interface {
UpdateWith(settings portforward.Settings) (err error)
}
type PortForwarder ¶
type Provider ¶
type Provider interface { GetConnection(selection settings.ServerSelection, ipv6Supported bool) (connection models.Connection, err error) OpenVPNConfig(connection models.Connection, settings settings.OpenVPN, ipv6Supported bool) (lines []string) Name() string FetchServers(ctx context.Context, minServers int) ( servers []models.Server, err error) }
type PublicIPLoop ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.