From b363fc2f67e1769695f9c19a9b1d0b430f8a1c8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arturo=20Filast=C3=B2?= Date: Mon, 14 Oct 2024 17:08:14 +0200 Subject: [PATCH 1/3] Simplify the dnscheck list --- internal/experiment/dnscheck/richerinput.go | 202 ++++++++++---------- 1 file changed, 102 insertions(+), 100 deletions(-) diff --git a/internal/experiment/dnscheck/richerinput.go b/internal/experiment/dnscheck/richerinput.go index 51d848844..3b4bb9c65 100644 --- a/internal/experiment/dnscheck/richerinput.go +++ b/internal/experiment/dnscheck/richerinput.go @@ -130,6 +130,46 @@ 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{ @@ -143,56 +183,47 @@ var defaultInput = []model.ExperimentTarget{ 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://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{ @@ -203,36 +234,26 @@ 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://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-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{ @@ -263,26 +284,7 @@ var defaultInput = []model.ExperimentTarget{ 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{ From ca8384933d7a316b63405b3baa3fa42cf2272758 Mon Sep 17 00:00:00 2001 From: decfox Date: Thu, 21 Nov 2024 13:46:46 +0530 Subject: [PATCH 2/3] 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 } From 03d6f6e5de74ecf8a7f382f660fb38896643fe3f Mon Sep 17 00:00:00 2001 From: decfox Date: Thu, 21 Nov 2024 13:50:41 +0530 Subject: [PATCH 3/3] refactor: remove unrequired prefix underscore --- internal/experiment/dnscheck/richerinput.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/experiment/dnscheck/richerinput.go b/internal/experiment/dnscheck/richerinput.go index 61f29a162..56d17e3cc 100644 --- a/internal/experiment/dnscheck/richerinput.go +++ b/internal/experiment/dnscheck/richerinput.go @@ -201,7 +201,7 @@ var defaultInput = []model.ExperimentTarget{ // while using the default list for normal runs. // //lint:ignore U1000 ignore unused var -var _extendedInput = []model.ExperimentTarget{ +var extendedInput = []model.ExperimentTarget{ // // https://dns.google/dns-query //