Documentation
¶
Index ¶
- Constants
- func CheckDeactivationPin(pin int64, stopCh chan struct{}) int
- func ConfigureWindowsServiceFailureActions(serviceName string) error
- func ControlSocketName() string
- func FlushDNSCache() error
- func Main()
- func RunCobraCommand(cmd *cobra.Command)
- func RunMobile(appConfig *AppConfig, appCallback *AppCallback, stopCh chan struct{})
- func ValidateDefaultLocalIPsFromDelta(newState *netmon.State)
- type AppCallback
- type AppConfig
- type RecoveryReason
Constants ¶
const ( BackupDomainController = 4 PrimaryDomainController = 5 )
Domain controller role values from Win32_ComputerSystem https://learn.microsoft.com/en-us/windows/win32/cimwin32prov/win32-computersystem
const ( // EDNS0_OPTION_MAC is dnsmasq EDNS0 code for adding mac option. // https://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=blob;f=src/dns-protocol.h;h=76ac66a8c28317e9c121a74ab5fd0e20f6237dc8;hb=HEAD#l81 // This is also dns.EDNS0LOCALSTART, but define our own constant here for clarification. EDNS0_OPTION_MAC = 0xFDE9 )
Variables ¶
This section is empty.
Functions ¶
func CheckDeactivationPin ¶ added in v1.3.5
CheckDeactivationPin checks if deactivation pin is valid
func ConfigureWindowsServiceFailureActions ¶ added in v1.4.0
func ControlSocketName ¶ added in v1.3.6
func ControlSocketName() string
ControlSocketName returns name for control unix socket.
func FlushDNSCache ¶ added in v1.4.0
func FlushDNSCache() error
FlushDNSCache flushes the DNS cache on macOS.
func RunCobraCommand ¶ added in v1.3.1
RunCobraCommand runs ctrld cli.
func RunMobile ¶ added in v1.3.1
func RunMobile(appConfig *AppConfig, appCallback *AppCallback, stopCh chan struct{})
RunMobile runs the ctrld cli on mobile platforms.
func ValidateDefaultLocalIPsFromDelta ¶ added in v1.4.1
ValidateDefaultLocalIPsFromDelta checks if the default local IPv4 and IPv6 stored are still present in the new network state (provided by delta.New). If a stored default IP is no longer active, it resets that default (sets it to nil) so that it won't be used in subsequent custom dialer contexts.
Types ¶
type AppCallback ¶ added in v1.3.1
type AppCallback struct { HostName func() string LanIp func() string MacAddress func() string Exit func(error string) }
AppCallback provides hooks for injecting certain functionalities from mobile platforms to main ctrld cli.
type AppConfig ¶ added in v1.3.1
type AppConfig struct { CdUID string HomeDir string UpstreamProto string Verbose int LogPath string }
AppConfig allows overwriting ctrld cli flags from mobile platforms.
type RecoveryReason ¶ added in v1.4.0
type RecoveryReason int
RecoveryReason provides context for why we are waiting for recovery. recovery involves removing the listener IP from the interface and waiting for the upstreams to work before returning
const ( RecoveryReasonNetworkChange RecoveryReason = iota RecoveryReasonRegularFailure RecoveryReasonOSFailure )
Source Files
¶
- ad_others.go
- cgo.go
- cli.go
- commands.go
- conn.go
- control_client.go
- control_server.go
- dns.go
- dns_proxy.go
- hostname.go
- library.go
- log_writer.go
- loop.go
- main.go
- metrics.go
- net_linux.go
- netlink_linux.go
- network_manager_linux.go
- nextdns.go
- os_linux.go
- prog.go
- prog_linux.go
- prometheus.go
- reload_others.go
- resolvconf.go
- resolvconf_not_darwin_unix.go
- self_delete_others.go
- self_kill_unix.go
- self_upgrade_others.go
- sema.go
- service.go
- service_others.go
- upstream_monitor.go