Documentation
¶
Index ¶
- Constants
- func FormatError(w http.ResponseWriter, comment string, errcode int)
- func IsGlobalIP(ip net.IP) bool
- func PrepareReply(req *dns.Msg) *dns.Msg
- func Unmarshal(msg *dns.Msg, resp *Response, udpSize uint16, ednsClientNetmask uint8) *dns.Msg
- type Question
- type RR
- type Response
- type UnmarshalError
Constants ¶
View Source
const USER_AGENT = "DNS-over-HTTPS/" + VERSION + " (+https://github.com/m13253/dns-over-https)"
View Source
const VERSION = "1.3.2"
Variables ¶
This section is empty.
Functions ¶
func FormatError ¶
func FormatError(w http.ResponseWriter, comment string, errcode int)
func IsGlobalIP ¶
Types ¶
type Response ¶
type Response struct {
// Standard DNS response code (32 bit integer)
Status uint32 `json:"Status"`
// Whether the response is truncated
TC bool `json:"TC"`
// Recursion desired
RD bool `json:"RD"`
// Recursion available
RA bool `json:"RA"`
// Whether all response data was validated with DNSSEC
// FIXME: We don't have DNSSEC yet! This bit is not reliable!
AD bool `json:"AD"`
// Whether the client asked to disable DNSSEC
CD bool `json:"CD"`
Question []Question `json:"Question"`
Answer []RR `json:"Answer,omitempty"`
Authority []RR `json:"Authority,omitempty"`
Additional []RR `json:"Additional,omitempty"`
Comment string `json:"Comment,omitempty"`
EdnsClientSubnet string `json:"edns_client_subnet,omitempty"`
// Least time-to-live
HaveTTL bool `json:"-"`
LeastTTL uint32 `json:"-"`
EarliestExpires time.Time `json:"-"`
}
type UnmarshalError ¶
type UnmarshalError struct {
// contains filtered or unexported fields
}
func (UnmarshalError) Error ¶
func (e UnmarshalError) Error() string
Click to show internal directories.
Click to hide internal directories.