dns

package
v0.11.2 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ZeropsServiceName = "ZeropsVPN"
)

Variables

View Source
var UnknownDnsManagementErr = errors.New("unknown dns management")

Functions

func CleanDns

func CleanDns(dnsServer *dnsServer.Handler, dnsIp net.IP, interfaceName string, dnsManagement LocalDnsManagement) error

func IsAlive

func IsAlive() (bool, error)

func SetDns

func SetDns(dnsServer *dnsServer.Handler, dnsIp net.IP, clientIp net.IP, vpnNetwork net.IPNet, dnsManagement LocalDnsManagement) error

Types

type LocalDnsManagement

type LocalDnsManagement string
const (
	LocalDnsManagementSystemdResolve LocalDnsManagement = "SYSTEMD_RESOLVE"
	LocalDnsManagementResolveConf    LocalDnsManagement = "RESOLVCONF"
	LocalDnsManagementFile           LocalDnsManagement = "FILE"
	LocalDnsManagementScutil         LocalDnsManagement = "SCUTIL"
	LocalDnsManagementUnknown        LocalDnsManagement = "UNKNOWN"
	LocalDnsManagementWindows        LocalDnsManagement = "WINDOWS"
)

func DetectDns

func DetectDns() (LocalDnsManagement, error)

type ZeropsDynamicStorage

type ZeropsDynamicStorage struct {
	Active           bool
	VpnInterfaceName string
	VpnNetwork       string
	DomainName       string
	ServerAddresses  []net.IP
	ClientIp         net.IP
	DnsIp            net.IP
	PrimaryService   string
}

func (*ZeropsDynamicStorage) Apply

func (z *ZeropsDynamicStorage) Apply() error

func (*ZeropsDynamicStorage) Read

func (z *ZeropsDynamicStorage) Read() error

func (ZeropsDynamicStorage) Store

func (z ZeropsDynamicStorage) Store() error

type ZeropsServiceDns

type ZeropsServiceDns struct {
	scutil.ServiceDns
	ZeropsVPN bool
}

type ZeropsServiceIPv6

type ZeropsServiceIPv6 struct {
	ZeropsVPN bool
}

Jump to

Keyboard shortcuts

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