Skip to content

Commit f736895

Browse files
committed
fix(dns): allow http:// DoH resolvers
allows people to run own DoH resolver on the same box or within same secure VLAN/VPN/infra
1 parent 0190b70 commit f736895

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gateway/dns.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ var defaultResolvers = map[string]string{
1515
}
1616

1717
func newResolver(url string, opts ...doh.Option) (madns.BasicResolver, error) {
18-
if !strings.HasPrefix(url, "https://") {
19-
return nil, fmt.Errorf("invalid resolver url: %s", url)
18+
if !strings.HasPrefix(url, "https://") && !strings.HasPrefix(url, "http://") {
19+
return nil, fmt.Errorf("invalid DoH resolver URL: %s", url)
2020
}
2121

2222
return doh.NewResolver(url, opts...)

0 commit comments

Comments
 (0)