From ca8384933d7a316b63405b3baa3fa42cf2272758 Mon Sep 17 00:00:00 2001 From: decfox Date: Thu, 21 Nov 2024 13:46:46 +0530 Subject: [PATCH] refactor: separate default and extended dnscheck targets --- internal/experiment/dnscheck/richerinput.go | 305 +++++++++++++------- 1 file changed, 204 insertions(+), 101 deletions(-) diff --git a/internal/experiment/dnscheck/richerinput.go b/internal/experiment/dnscheck/richerinput.go index 3b4bb9c65..61f29a162 100644 --- a/internal/experiment/dnscheck/richerinput.go +++ b/internal/experiment/dnscheck/richerinput.go @@ -130,46 +130,6 @@ var defaultInput = []model.ExperimentTarget{ DefaultAddrs: "1.1.1.1 1.0.0.1", }, }, - // &Target{ - // URL: "https://dns.cloudflare.com/dns-query", - // Config: &Config{ - // HTTP3Enabled: true, - // }, - // }, - // &Target{ - // URL: "https://dns.cloudflare.com/dns-query", - // Config: &Config{}, - // }, - // &Target{ - // URL: "https://family.cloudflare-dns.com/dns-query", - // Config: &Config{ - // HTTP3Enabled: true, - // }, - // }, - // &Target{ - // URL: "https://family.cloudflare-dns.com/dns-query", - // Config: &Config{}, - // }, - // &Target{ - // URL: "https://1dot1dot1dot1.cloudflare-dns.com/dns-query", - // Config: &Config{ - // HTTP3Enabled: true, - // }, - // }, - // &Target{ - // URL: "https://1dot1dot1dot1.cloudflare-dns.com/dns-query", - // Config: &Config{}, - // }, - // &Target{ - // URL: "https://security.cloudflare-dns.com/dns-query", - // Config: &Config{ - // HTTP3Enabled: true, - // }, - // }, - // &Target{ - // URL: "https://security.cloudflare-dns.com/dns-query", - // Config: &Config{}, - // }, &Target{ URL: "https://dns.quad9.net/dns-query", Config: &Config{ @@ -183,47 +143,6 @@ var defaultInput = []model.ExperimentTarget{ DefaultAddrs: "9.9.9.9", }, }, - // &Target{ - // URL: "https://dns11.quad9.net/dns-query", - // Config: &Config{ - // HTTP3Enabled: true, - // }, - // }, - // &Target{ - // URL: "https://dns11.quad9.net/dns-query", - // Config: &Config{}, - // }, - // &Target{ - // URL: "https://dns9.quad9.net/dns-query", - // Config: &Config{ - // HTTP3Enabled: true, - // }, - // }, - // &Target{ - // URL: "https://dns9.quad9.net/dns-query", - // Config: &Config{}, - // }, - // &Target{ - // URL: "https://dns12.quad9.net/dns-query", - // Config: &Config{ - // HTTP3Enabled: true, - // }, - // }, - // &Target{ - // URL: "https://dns12.quad9.net/dns-query", - // Config: &Config{}, - // }, - // &Target{ - // URL: "https://dns10.quad9.net/dns-query", - // Config: &Config{ - // HTTP3Enabled: true, - // }, - // }, - // &Target{ - // URL: "https://dns10.quad9.net/dns-query", - // Config: &Config{}, - // }, - &Target{ URL: "https://dns.adguard.com/dns-query", Config: &Config{ @@ -234,26 +153,6 @@ var defaultInput = []model.ExperimentTarget{ URL: "https://dns.adguard.com/dns-query", Config: &Config{}, }, - // &Target{ - // URL: "https://dns-family.adguard.com/dns-query", - // Config: &Config{ - // HTTP3Enabled: true, - // }, - // }, - // &Target{ - // URL: "https://dns-family.adguard.com/dns-query", - // Config: &Config{}, - // }, - // &Target{ - // URL: "https://adblock.doh.mullvad.net/dns-query", - // Config: &Config{ - // HTTP3Enabled: true, - // }, - // }, - // &Target{ - // URL: "https://adblock.doh.mullvad.net/dns-query", - // Config: &Config{}, - // }, &Target{ URL: "https://dns.alidns.com/dns-query", Config: &Config{ @@ -295,6 +194,210 @@ var defaultInput = []model.ExperimentTarget{ URL: "https://dns.switch.ch/dns-query", Config: &Config{}, }, +} + +// extendedInput is an extended input target list for dnscheck. +// TODO(decfox): we should have a flag to return the extended list in special cases +// while using the default list for normal runs. +// +//lint:ignore U1000 ignore unused var +var _extendedInput = []model.ExperimentTarget{ + // + // https://dns.google/dns-query + // + // Measure HTTP/3 first and then HTTP/2 (see https://github.com/ooni/probe/issues/2675). + // + // Make sure we include the typical IP addresses for the domain. + // + &Target{ + URL: "https://dns.google/dns-query", + Config: &Config{ + HTTP3Enabled: true, + DefaultAddrs: "8.8.8.8 8.8.4.4", + }, + }, + &Target{ + URL: "https://dns.google/dns-query", + Config: &Config{ + DefaultAddrs: "8.8.8.8 8.8.4.4", + }, + }, + &Target{ + URL: "https://cloudflare-dns.com/dns-query", + Config: &Config{ + HTTP3Enabled: true, + DefaultAddrs: "1.1.1.1 1.0.0.1", + }, + }, + &Target{ + URL: "https://cloudflare-dns.com/dns-query", + Config: &Config{ + DefaultAddrs: "1.1.1.1 1.0.0.1", + }, + }, + &Target{ + URL: "https://dns.quad9.net/dns-query", + Config: &Config{ + HTTP3Enabled: true, + DefaultAddrs: "9.9.9.9", + }, + }, + &Target{ + URL: "https://dns.quad9.net/dns-query", + Config: &Config{ + DefaultAddrs: "9.9.9.9", + }, + }, + &Target{ + URL: "https://family.cloudflare-dns.com/dns-query", + Config: &Config{ + HTTP3Enabled: true, + }, + }, + &Target{ + URL: "https://family.cloudflare-dns.com/dns-query", + Config: &Config{}, + }, + &Target{ + URL: "https://dns11.quad9.net/dns-query", + Config: &Config{ + HTTP3Enabled: true, + }, + }, + &Target{ + URL: "https://dns11.quad9.net/dns-query", + Config: &Config{}, + }, + &Target{ + URL: "https://dns9.quad9.net/dns-query", + Config: &Config{ + HTTP3Enabled: true, + }, + }, + &Target{ + URL: "https://dns9.quad9.net/dns-query", + Config: &Config{}, + }, + &Target{ + URL: "https://dns12.quad9.net/dns-query", + Config: &Config{ + HTTP3Enabled: true, + }, + }, + &Target{ + URL: "https://dns12.quad9.net/dns-query", + Config: &Config{}, + }, + &Target{ + URL: "https://1dot1dot1dot1.cloudflare-dns.com/dns-query", + Config: &Config{ + HTTP3Enabled: true, + }, + }, + &Target{ + URL: "https://1dot1dot1dot1.cloudflare-dns.com/dns-query", + Config: &Config{}, + }, + &Target{ + URL: "https://dns.adguard.com/dns-query", + Config: &Config{ + HTTP3Enabled: true, + }, + }, + &Target{ + URL: "https://dns.adguard.com/dns-query", + Config: &Config{}, + }, + &Target{ + URL: "https://dns-family.adguard.com/dns-query", + Config: &Config{ + HTTP3Enabled: true, + }, + }, + &Target{ + URL: "https://dns-family.adguard.com/dns-query", + Config: &Config{}, + }, + &Target{ + URL: "https://dns.cloudflare.com/dns-query", + Config: &Config{ + HTTP3Enabled: true, + }, + }, + &Target{ + URL: "https://dns.cloudflare.com/dns-query", + Config: &Config{}, + }, + &Target{ + URL: "https://adblock.doh.mullvad.net/dns-query", + Config: &Config{ + HTTP3Enabled: true, + }, + }, + &Target{ + URL: "https://adblock.doh.mullvad.net/dns-query", + Config: &Config{}, + }, + &Target{ + URL: "https://dns.alidns.com/dns-query", + Config: &Config{ + HTTP3Enabled: true, + }, + }, + &Target{ + URL: "https://dns.alidns.com/dns-query", + Config: &Config{}, + }, + &Target{ + URL: "https://doh.opendns.com/dns-query", + Config: &Config{ + HTTP3Enabled: true, + }, + }, + &Target{ + URL: "https://doh.opendns.com/dns-query", + Config: &Config{}, + }, + &Target{ + URL: "https://dns.nextdns.io/dns-query", + Config: &Config{ + HTTP3Enabled: true, + }, + }, + &Target{ + URL: "https://dns.nextdns.io/dns-query", + Config: &Config{}, + }, + &Target{ + URL: "https://dns10.quad9.net/dns-query", + Config: &Config{ + HTTP3Enabled: true, + }, + }, + &Target{ + URL: "https://dns10.quad9.net/dns-query", + Config: &Config{}, + }, + &Target{ + URL: "https://security.cloudflare-dns.com/dns-query", + Config: &Config{ + HTTP3Enabled: true, + }, + }, + &Target{ + URL: "https://security.cloudflare-dns.com/dns-query", + Config: &Config{}, + }, + &Target{ + URL: "https://dns.switch.ch/dns-query", + Config: &Config{ + HTTP3Enabled: true, + }, + }, + &Target{ + URL: "https://dns.switch.ch/dns-query", + Config: &Config{}, + }, // TODO(DecFox): implement a backend API to serve this list as dnscheck inputs }