Pull request 1798: 4262-ipv6-pref

Updates #4262.

Squashed commit of the following:

commit de64f9c40c00317dbb5dbdda900d9b4c574a0a32
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Mon Apr 3 19:23:15 2023 +0300

    all: add ipv6 boostrap pref
This commit is contained in:
Ainar Garipov
2023-04-04 13:28:21 +03:00
parent 195300f56e
commit 27dbb427a1
7 changed files with 22 additions and 7 deletions

View File

@@ -199,6 +199,10 @@ type FilteringConfig struct {
// IpsetListFileName, if set, points to the file with ipset configuration.
// The format is the same as in [IpsetList].
IpsetListFileName string `yaml:"ipset_file"`
// BootstrapPreferIPv6, if true, instructs the bootstrapper to prefer IPv6
// addresses to IPv4 ones for DoH, DoQ, and DoT.
BootstrapPreferIPv6 bool `yaml:"bootstrap_prefer_ipv6"`
}
// EDNSClientSubnet is the settings list for EDNS Client Subnet.
@@ -479,6 +483,7 @@ func (s *Server) prepareUpstreamSettings() error {
Bootstrap: s.conf.BootstrapDNS,
Timeout: s.conf.UpstreamTimeout,
HTTPVersions: httpVersions,
PreferIPv6: s.conf.BootstrapPreferIPv6,
},
)
if err != nil {
@@ -494,6 +499,7 @@ func (s *Server) prepareUpstreamSettings() error {
Bootstrap: s.conf.BootstrapDNS,
Timeout: s.conf.UpstreamTimeout,
HTTPVersions: httpVersions,
PreferIPv6: s.conf.BootstrapPreferIPv6,
},
)
if err != nil {