dns

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: May 19, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheItem

type CacheItem struct {
	// contains filtered or unexported fields
}

type Config

type Config struct {
	LogLevel int `json:"logLevel"`
}

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func NewDNSManager

func NewDNSManager() *Manager

func (*Manager) GetUpstreamDNS

func (d *Manager) GetUpstreamDNS() string

func (*Manager) RemoveStealthDNS

func (d *Manager) RemoveStealthDNS()

func (*Manager) SetStealthDNS

func (d *Manager) SetStealthDNS() bool

type ProxyService

type ProxyService struct {
	// contains filtered or unexported fields
}

ProxyService dns proxy service

func (*ProxyService) ServeDNS

func (p *ProxyService) ServeDNS(w dns.ResponseWriter, r *dns.Msg)

func (*ProxyService) Start

func (p *ProxyService) Start(dirPath string, logLevel int) (err error)

func (*ProxyService) Stop

func (p *ProxyService) Stop()

func (*ProxyService) StopConfigWatch

func (p *ProxyService) StopConfigWatch()

type Resource

type Resource struct {
	AuthServiceId  string `json:"authServiceId"`
	ResourceId     string `json:"resourceId"`
	ServerHostname string `json:"serverHostname"`
	ServerIp       string `json:"serverIp"`
	ServerPort     int    `json:"serverPort"`
}

type Resources

type Resources struct {
	Resources []*Resource
}

type StealthDNSCache

type StealthDNSCache struct {
	// contains filtered or unexported fields
}

func NewStealthDNSCache

func NewStealthDNSCache(ttl time.Duration) *StealthDNSCache

func (*StealthDNSCache) CleanupExpired

func (pc *StealthDNSCache) CleanupExpired()

func (*StealthDNSCache) Delete

func (pc *StealthDNSCache) Delete(key string)

func (*StealthDNSCache) GetCache

func (pc *StealthDNSCache) GetCache(key string) (*CacheItem, bool)

func (*StealthDNSCache) SetCache

func (pc *StealthDNSCache) SetCache(key string, value *dns.Msg)

func (*StealthDNSCache) SetCacheWithTTL

func (pc *StealthDNSCache) SetCacheWithTTL(key string, value *dns.Msg, ttl time.Duration)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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