Pass ServerName to dtls.Config

Otherwise DTLS would only work if InsecureSkipVerify
was enabled
This commit is contained in:
Sam Lancia
2021-07-03 14:01:44 -04:00
committed by Sean DuBois
parent df5c838aa2
commit 2eafed30bb
+1
View File
@@ -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 {