diff --git a/internal/experiment/quicping/quicping.go b/internal/experiment/quicping/quicping.go index c3955f4af4..afc33d2c62 100644 --- a/internal/experiment/quicping/quicping.go +++ b/internal/experiment/quicping/quicping.go @@ -33,7 +33,7 @@ const ( const ( testName = "quicping" - testVersion = "0.1.0" + testVersion = "0.1.1" ) // Config contains the experiment configuration. @@ -228,12 +228,18 @@ func (m *Measurer) Run(ctx context.Context, args *model.ExperimentArgs) error { sess := args.Session host := string(measurement.Input) + var port = "" // allow URL input if u, err := url.ParseRequestURI(host); err == nil { - host = u.Host + host = u.Hostname() + port = u.Port() } - service := net.JoinHostPort(host, m.config.port()) - udpAddr, err := net.ResolveUDPAddr("udp4", service) + var service string + if port == "" { + port = m.config.port() + } + service = net.JoinHostPort(host, port) + udpAddr, err := net.ResolveUDPAddr("udp", service) if err != nil { return err } diff --git a/internal/experiment/quicping/quicping_test.go b/internal/experiment/quicping/quicping_test.go index 0d7f659018..e0b28e37e1 100644 --- a/internal/experiment/quicping/quicping_test.go +++ b/internal/experiment/quicping/quicping_test.go @@ -20,7 +20,7 @@ func TestNewExperimentMeasurer(t *testing.T) { if measurer.ExperimentName() != "quicping" { t.Fatal("unexpected name") } - if measurer.ExperimentVersion() != "0.1.0" { + if measurer.ExperimentVersion() != "0.1.1" { t.Fatal("unexpected version") } }