From 2eafed30bbdaaef6a40d506bbceae8f3cf2642e3 Mon Sep 17 00:00:00 2001 From: Sam Lancia Date: Fri, 2 Jul 2021 21:39:52 +0100 Subject: [PATCH] Pass ServerName to dtls.Config Otherwise DTLS would only work if InsecureSkipVerify was enabled --- gather.go | 1 + 1 file changed, 1 insertion(+) diff --git a/gather.go b/gather.go index b005a3d..e6ea827 100644 --- a/gather.go +++ b/gather.go @@ -473,6 +473,7 @@ func (a *Agent) gatherCandidatesRelay(ctx context.Context, urls []*URL) { //noli } conn, connectErr := dtls.Dial(network, udpAddr, &dtls.Config{ + ServerName: url.Host, InsecureSkipVerify: a.insecureSkipVerify, //nolint:gosec }) if connectErr != nil {