Don't assume IPv6 or IPv4 about DoH servers
This commit is contained in:
parent
91f97833a3
commit
22f69a475a
|
@ -414,6 +414,9 @@ func (config *Config) loadSource(proxy *Proxy, requiredProps ServerInformalPrope
|
||||||
}
|
}
|
||||||
if config.SourceIPv4 || config.SourceIPv6 {
|
if config.SourceIPv4 || config.SourceIPv6 {
|
||||||
isIPv4, isIPv6 := true, false
|
isIPv4, isIPv6 := true, false
|
||||||
|
if registeredServer.stamp.proto == StampProtoTypeDoH {
|
||||||
|
isIPv4, isIPv6 = true, true
|
||||||
|
}
|
||||||
if strings.HasPrefix(registeredServer.stamp.serverAddrStr, "[") {
|
if strings.HasPrefix(registeredServer.stamp.serverAddrStr, "[") {
|
||||||
isIPv4, isIPv6 = false, true
|
isIPv4, isIPv6 = false, true
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue