ODoH: until relay auto selection is implemented, pick random ones
This commit is contained in:
parent
27a82c54c8
commit
cd45f64c18
|
@ -301,6 +301,12 @@ func findFarthestRoute(proxy *Proxy, name string, relayStamps []stamps.ServerSta
|
|||
}
|
||||
server := proxy.serversInfo.registeredServers[serverIdx]
|
||||
proxy.serversInfo.RUnlock()
|
||||
|
||||
// Fall back to random relays until the logic is implementeed for non-DNSCrypt relays
|
||||
if server.stamp.Proto != stamps.StampProtoTypeDNSCrypt {
|
||||
return &relayStamps[rand.Intn(len(relayStamps))]
|
||||
}
|
||||
|
||||
serverAddrStr, _ := ExtractHostAndPort(server.stamp.ServerAddrStr, 443)
|
||||
serverAddr := net.ParseIP(serverAddrStr)
|
||||
if serverAddr == nil {
|
||||
|
|
Loading…
Reference in New Issue