feat: add DNS over QUIC support

This commit is contained in:
lyekumchew 2021-12-11 23:45:24 +08:00 committed by Karan Sharma
parent 3d7b4a9821
commit a5fe3ae922
7 changed files with 390 additions and 7 deletions

View file

@ -106,6 +106,13 @@ func initNameserver(n string) (models.Nameserver, error) {
} else {
ns.Address = net.JoinHostPort(u.Hostname(), u.Port())
}
case "quic":
ns.Type = models.DOQResolver
if u.Port() == "" {
ns.Address = net.JoinHostPort(u.Hostname(), models.DefaultDOQPort)
} else {
ns.Address = net.JoinHostPort(u.Hostname(), u.Port())
}
}
return ns, nil
}