Documentation
¶
Index ¶
- Variables
- func CleanupHosts() error
- func GetHostFile() string
- func GetResolveCtlCmd(ctx context.Context, tunName string, config *miekgdns.ClientConfig) error
- func GetSystemdResolveCmd(ctx context.Context, tunName string, config *miekgdns.ClientConfig) error
- func ListenAndServe(network, address string, forwardDNS *miekgdns.ClientConfig) error
- func SetupLocalDNS(ctx context.Context, clientConfig *miekgdns.ClientConfig, ...) error
- func WriteResolvConf(filename string, config miekgdns.ClientConfig) error
- type Config
- type CoreFile
- type CoreFileTmpl
- type Entry
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrorNotSupportSplitDNS = errors.New("not support split DNS")
Functions ¶
func CleanupHosts ¶
func CleanupHosts() error
func GetHostFile ¶
func GetHostFile() string
func GetResolveCtlCmd ¶ added in v2.2.19
GetResolveCtlCmd resolvectl dns utun0 10.10.129.161 resolvectl domain utun0 default.svc.cluster.local svc.cluster.local cluster.local
func GetSystemdResolveCmd ¶ added in v2.2.19
func ListenAndServe ¶ added in v2.2.5
func ListenAndServe(network, address string, forwardDNS *miekgdns.ClientConfig) error
func SetupLocalDNS ¶
func WriteResolvConf ¶
func WriteResolvConf(filename string, config miekgdns.ClientConfig) error
Types ¶
type Config ¶
type Config struct { Config *miekgdns.ClientConfig Ns []string TunName string Hosts []Entry Lock *sync.Mutex // only set it on linux OSConfigurator dns.OSConfigurator }
func (*Config) AddServiceNameToHosts ¶
func (*Config) UseLibraryDNS ¶ added in v2.2.19
func (c *Config) UseLibraryDNS(tunName string, clientConfig *miekgdns.ClientConfig) error
type CoreFile ¶
type CoreFile struct {
Content []byte
}
func BuildCoreFile ¶
func BuildCoreFile(corefileTmpl CoreFileTmpl) (*CoreFile, error)
func (*CoreFile) ServerType ¶
ServerType The type of server this input is intended for
type CoreFileTmpl ¶
Click to show internal directories.
Click to hide internal directories.