dnsmasq

package
v1.3.6 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const ConfigContentTmpl = `` /* 209-byte string literal not displayed */
View Source
const CtrldMarker = `# GENERATED BY ctrld - DO NOT MODIFY`
View Source
const MerlinPostConfMarker = `# GENERATED BY ctrld - EOF`
View Source
const MerlinPostConfPath = "/jffs/scripts/dnsmasq.postconf"
View Source
const MerlinPostConfTmpl = `` /* 1228-byte string literal not displayed */

Variables

This section is empty.

Functions

func ConfTmpl

func ConfTmpl(tmplText string, cfg *ctrld.Config) (string, error)

ConfTmpl generates dnsmasq configuration from ctrld config.

func ConfTmplWithCacheDisabled added in v1.3.4

func ConfTmplWithCacheDisabled(tmplText string, cfg *ctrld.Config, cacheDisabled bool) (string, error)

ConfTmplWithCacheDisabled is like ConfTmpl, but the caller can control whether dnsmasq cache is disabled using cacheDisabled parameter.

Generally, the caller should use ConfTmpl, but on some routers which dnsmasq config may be changed after ctrld started (like EdgeOS/Ubios, Firewalla ...), dnsmasq cache should not be disabled because the cache-size=0 generated by ctrld will conflict with router's generated config.

func FirewallaConfTmpl

func FirewallaConfTmpl(tmplText string, cfg *ctrld.Config) (string, error)

FirewallaConfTmpl generates dnsmasq config for Firewalla routers.

func FirewallaSelfInterfaces

func FirewallaSelfInterfaces() []*net.Interface

FirewallaSelfInterfaces returns list of interfaces that will be configured with default dnsmasq setup on Firewalla.

func InterfaceNameFromConfig

func InterfaceNameFromConfig(filename string) (string, error)

Types

type Upstream

type Upstream struct {
	IP   string
	Port int
}

Jump to

Keyboard shortcuts

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