mirror of
https://github.com/DNSCrypt/dnscrypt-proxy.git
synced 2025-04-06 06:37:36 +03:00
Don't assume IPv6 or IPv4 about DoH servers
This commit is contained in:
parent
91f97833a3
commit
22f69a475a
1 changed files with 3 additions and 0 deletions
|
@ -414,6 +414,9 @@ func (config *Config) loadSource(proxy *Proxy, requiredProps ServerInformalPrope
|
|||
}
|
||||
if config.SourceIPv4 || config.SourceIPv6 {
|
||||
isIPv4, isIPv6 := true, false
|
||||
if registeredServer.stamp.proto == StampProtoTypeDoH {
|
||||
isIPv4, isIPv6 = true, true
|
||||
}
|
||||
if strings.HasPrefix(registeredServer.stamp.serverAddrStr, "[") {
|
||||
isIPv4, isIPv6 = false, true
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue