Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CmdLineOpts = []CmdLineOpt{{ // contains filtered or unexported fields }, { // contains filtered or unexported fields }, { // contains filtered or unexported fields }, { // contains filtered or unexported fields }, { // contains filtered or unexported fields }, { // contains filtered or unexported fields }, { // contains filtered or unexported fields }, { // contains filtered or unexported fields }, { // contains filtered or unexported fields }, { // contains filtered or unexported fields }, { // contains filtered or unexported fields }, { // contains filtered or unexported fields }, { // contains filtered or unexported fields }, { // contains filtered or unexported fields }, { // contains filtered or unexported fields }, { // contains filtered or unexported fields }, { // contains filtered or unexported fields }}
CmdLineOpts are all command-line Options of AdGuard Home.
Functions ¶
func InitCmdLineOpts ¶
func InitCmdLineOpts()
InitCmdLineOpts completes initialization of the global command-line option slice. It must only be called once.
func ParseCmdOpts ¶
ParseCmdOpts parses the command-line arguments into Options and effects.
Types ¶
type CmdLineOpt ¶
type CmdLineOpt struct {
// contains filtered or unexported fields
}
CmdLineOpt contains the data for a single command-line option. Only one of updateWithValue, updateNoValue, and effect must be present.
type Effect ¶
type Effect func() (err error)
Effect is the type for functions used for their side effects.
type Options ¶
type Options struct {
// confFilename is the path to the configuration file.
ConfFilename string
// workDir is the path to the working directory where AdGuard Home stores
// filter data, the query log, and other data.
WorkDir string
// logFile is the path to the log file. If empty, AdGuard Home writes to
// stdout; if "syslog", to syslog.
LogFile string
// pidFile is the file name for the file to which the PID is saved.
PidFile string
// serviceControlAction is the service action to perform. See
// [service.ControlAction] and [handleServiceControlAction].
ServiceControlAction string
// bindHost is the address on which to serve the HTTP UI.
//
// Deprecated: Use bindAddr.
BindHost netip.Addr
// bindPort is the port on which to serve the HTTP UI.
//
// Deprecated: Use bindAddr.
BindPort uint16
// bindAddr is the address to serve the web UI on.
BindAddr netip.AddrPort
// checkConfig is true if the current invocation is only required to check
// the configuration file and exit.
CheckConfig bool
// disableUpdate, if set, makes AdGuard Home not check for updates.
DisableUpdate bool
// performUpdate, if set, updates AdGuard Home without GUI and exits.
PerformUpdate bool
// verbose shows if verbose logging is enabled.
Verbose bool
// runningAsService flag is set to true when Options are passed from the
// service runner
//
// TODO(a.garipov): Perhaps this could be determined by a non-empty
// serviceControlAction?
RunningAsService bool
// glinetMode shows if the GL-Inet compatibility mode is enabled.
GlinetMode bool
// NoEtcHosts flag should be provided when /etc/hosts file shouldn't be
// used.
NoEtcHosts bool
// localFrontend forces AdGuard Home to use the frontend files from disk
// rather than the ones that have been compiled into the binary.
LocalFrontend bool
}
Options represents the command-line Options.
Click to show internal directories.
Click to hide internal directories.