mirror of
https://github.com/safing/portmaster
synced 2025-09-12 15:59:39 +00:00
Move some Resolver information to ResolverInfo and propagate it
This commit is contained in:
parent
43cfba8445
commit
20383226f8
13 changed files with 275 additions and 180 deletions
|
@ -20,12 +20,13 @@ const (
|
|||
|
||||
var (
|
||||
envResolver = &Resolver{
|
||||
Server: ServerSourceEnv,
|
||||
ServerType: ServerTypeEnv,
|
||||
ServerIPScope: netutils.SiteLocal,
|
||||
ServerInfo: "Portmaster environment",
|
||||
Source: ServerSourceEnv,
|
||||
Conn: &envResolverConn{},
|
||||
ConfigURL: ServerSourceEnv,
|
||||
Info: &ResolverInfo{
|
||||
Type: ServerTypeEnv,
|
||||
Source: ServerSourceEnv,
|
||||
IPScope: netutils.SiteLocal,
|
||||
},
|
||||
Conn: &envResolverConn{},
|
||||
}
|
||||
envResolvers = []*Resolver{envResolver}
|
||||
|
||||
|
@ -109,14 +110,12 @@ func (er *envResolverConn) makeRRCache(q *Query, answers []dns.RR) *RRCache {
|
|||
q.NoCaching = true
|
||||
|
||||
return &RRCache{
|
||||
Domain: q.FQDN,
|
||||
Question: q.QType,
|
||||
RCode: dns.RcodeSuccess,
|
||||
Answer: answers,
|
||||
Extra: []dns.RR{internalSpecialUseComment}, // Always add comment about this TLD.
|
||||
Server: envResolver.Server,
|
||||
ServerScope: envResolver.ServerIPScope,
|
||||
ServerInfo: envResolver.ServerInfo,
|
||||
Domain: q.FQDN,
|
||||
Question: q.QType,
|
||||
RCode: dns.RcodeSuccess,
|
||||
Answer: answers,
|
||||
Extra: []dns.RR{internalSpecialUseComment}, // Always add comment about this TLD.
|
||||
Resolver: envResolver.Info.Copy(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue