server

package
v0.0.0-...-61b053f Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(ctx context.Context, address string, logEnabled bool, logger Logger,
	authConfigPath string, buildInfo models.BuildInformation, openvpnLooper VPNLooper,
	pfGetter PortForwardedGetter, dnsLooper DNSLoop,
	updaterLooper UpdaterLooper, publicIPLooper PublicIPLoop, storage Storage,
	ipv6Supported bool) (
	server *httpserver.Server, err error,
)

Types

type DNSLoop

type DNSLoop interface {
	ApplyStatus(ctx context.Context, status models.LoopStatus) (
		outcome string, err error)
	GetStatus() (status models.LoopStatus)
}

type Logger

type Logger interface {
	Debugf(format string, args ...any)

	Warnf(format string, args ...any)
	// contains filtered or unexported methods
}

type PortForwardedGetter

type PortForwardedGetter interface {
	GetPortsForwarded() (ports []uint16)
}

type PublicIPLoop

type PublicIPLoop interface {
	GetData() (data models.PublicIP)
}

type Storage

type Storage interface {
	GetFilterChoices(provider string) models.FilterChoices
}

type UpdaterLooper

type UpdaterLooper interface {
	GetStatus() (status models.LoopStatus)
	SetStatus(ctx context.Context, status models.LoopStatus) (
		outcome string, err error)
	SetSettings(settings settings.Updater) (outcome string)
}

type VPNLooper

type VPNLooper interface {
	GetStatus() (status models.LoopStatus)
	ApplyStatus(ctx context.Context, status models.LoopStatus) (
		outcome string, err error)
	GetSettings() (settings settings.VPN)
	SetSettings(ctx context.Context, settings settings.VPN) (outcome string)
}

Directories

Path Synopsis
middlewares
log

Jump to

Keyboard shortcuts

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