Documentation
¶
Index ¶
- func NewJSEDNS0(e dns.EDNS0) (jsEDNS0 map[string]interface{}, err error)
- func NewJSResourceRecord(rr dns.RR) (jsRecord map[string]interface{}, err error)
- func NewJSSVCBKeyValue(kv dns.SVCBKeyValue) (map[string]interface{}, error)
- func ToEDNS0(jsEDNS0 map[string]interface{}) (e dns.EDNS0, err error)
- func ToRR(jsRecord map[string]interface{}) (rr dns.RR, err error)
- func ToSVCBKeyValue(jsKv map[string]interface{}) (dns.SVCBKeyValue, error)
- type DNSProxy
- func (p *DNSProxy) Configure(address string, dnsPort int, doRedirect bool, nameserver string, ...) error
- func (p *DNSProxy) Debug(format string, args ...interface{})
- func (p *DNSProxy) Error(format string, args ...interface{})
- func (p *DNSProxy) Fatal(format string, args ...interface{})
- func (p *DNSProxy) Info(format string, args ...interface{})
- func (p *DNSProxy) Start()
- func (p *DNSProxy) Stop() error
- func (p *DNSProxy) Warning(format string, args ...interface{})
- type DnsProxy
- type DnsProxyScript
- type JSQuery
- type JSQueryHeader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewJSResourceRecord ¶
func NewJSSVCBKeyValue ¶
func NewJSSVCBKeyValue(kv dns.SVCBKeyValue) (map[string]interface{}, error)
func ToSVCBKeyValue ¶
func ToSVCBKeyValue(jsKv map[string]interface{}) (dns.SVCBKeyValue, error)
Types ¶
type DNSProxy ¶
type DNSProxy struct {
Name string
Address string
Server *dns.Server
Redirection *firewall.Redirection
Nameserver string
NetProtocol string
Script *DnsProxyScript
CertFile string
KeyFile string
Blacklist []string
Whitelist []string
Sess *session.Session
// contains filtered or unexported fields
}
type DnsProxy ¶
type DnsProxy struct {
session.SessionModule
// contains filtered or unexported fields
}
func NewDnsProxy ¶
func (*DnsProxy) Description ¶
type DnsProxyScript ¶
func LoadDnsProxyScript ¶
func LoadDnsProxyScript(path string, sess *session.Session) (err error, s *DnsProxyScript)
func (*DnsProxyScript) OnCommand ¶
func (s *DnsProxyScript) OnCommand(cmd string) bool
func (*DnsProxyScript) OnRequest ¶
func (s *DnsProxyScript) OnRequest(req *dns.Msg, clientIP string) (jsreq, jsres *JSQuery)
func (*DnsProxyScript) OnResponse ¶
func (s *DnsProxyScript) OnResponse(req, res *dns.Msg, clientIP string) (jsreq, jsres *JSQuery)
type JSQuery ¶
type JSQuery struct {
Answers []map[string]interface{}
Client map[string]string
Compress bool
Extras []map[string]interface{}
Header JSQueryHeader
Nameservers []map[string]interface{}
Questions []map[string]interface{}
// contains filtered or unexported fields
}
func (*JSQuery) CheckIfModifiedAndUpdateHash ¶
func (*JSQuery) UpdateHash ¶
func (j *JSQuery) UpdateHash()
func (*JSQuery) WasModified ¶
Click to show internal directories.
Click to hide internal directories.