Documentation
¶
Index ¶
- Constants
- func CheckDeactivationPin(pin int64, stopCh chan struct{}) int
- func ControlSocketName() string
- func Main()
- func RunCobraCommand(cmd *cobra.Command)
- func RunMobile(appConfig *AppConfig, appCallback *AppCallback, stopCh chan struct{})
- type AppCallback
- type AppConfig
- type FILE_DISPOSITION_INFO
- type FILE_RENAME_INFO
Constants ¶
View Source
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 ControlSocketName ¶ added in v1.3.6
func ControlSocketName() string
ControlSocketName returns name for control unix socket.
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.
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 FILE_DISPOSITION_INFO ¶ added in v1.3.8
type FILE_DISPOSITION_INFO struct {
DeleteFile bool
}
Source Files
¶
- cli.go
- conn.go
- control_client.go
- control_server.go
- dns.go
- dns_proxy.go
- library.go
- loop.go
- main.go
- metrics.go
- net.go
- net_windows.go
- netlink_others.go
- network_manager_others.go
- nextdns.go
- os_others.go
- os_windows.go
- prog.go
- prog_others.go
- prometheus.go
- reload_windows.go
- resolvconf.go
- resolvconf_windows.go
- self_delete_windows.go
- self_kill_others.go
- sema.go
- service.go
- service_windows.go
- upstream_monitor.go
- winres_windows.go
Click to show internal directories.
Click to hide internal directories.