Shuffle ODoH target configs and use different NX queries

This commit is contained in:
Frank Denis 2021-06-07 12:05:42 +02:00
parent 4a4f69edb7
commit b35e27bd51
1 changed files with 4 additions and 1 deletions

View File

@ -720,9 +720,12 @@ func _fetchODoHTargetInfo(proxy *Proxy, name string, stamp stamps.ServerStamp, i
useGet := relay == nil
query := dohNXTestPacket(0xcafe)
workingConfigs := make([]ODoHTargetConfig, 0)
rand.Shuffle(len(odohTargetConfigs), func(i, j int) {
odohTargetConfigs[i], odohTargetConfigs[j] = odohTargetConfigs[j], odohTargetConfigs[i]
})
for _, odohTargetConfig := range odohTargetConfigs {
query := dohNXTestPacket(0xcafe)
odohQuery, err := odohTargetConfig.encryptQuery(query)
if err != nil {
continue