Skip to content

Commit

Permalink
refactor: separate default and extended dnscheck targets
Browse files Browse the repository at this point in the history
  • Loading branch information
DecFox committed Nov 21, 2024
1 parent b363fc2 commit ca83849
Showing 1 changed file with 204 additions and 101 deletions.
305 changes: 204 additions & 101 deletions internal/experiment/dnscheck/richerinput.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand All @@ -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{
Expand All @@ -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{
Expand Down Expand Up @@ -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
}

Expand Down

0 comments on commit ca83849

Please sign in to comment.