forked from toolshed/abra
parent
e9113500d8
commit
e78ced41fb
@ -35,6 +35,9 @@ later for more advanced use cases.
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// https://www.privacy-handbuch.de/handbuch_93d.htm
|
||||||
|
freifunkDNS := "5.1.66.255:53"
|
||||||
|
|
||||||
resolver := &net.Resolver{
|
resolver := &net.Resolver{
|
||||||
PreferGo: false,
|
PreferGo: false,
|
||||||
Dial: func(ctx context.Context, network, address string) (net.Conn, error) {
|
Dial: func(ctx context.Context, network, address string) (net.Conn, error) {
|
||||||
@ -42,10 +45,10 @@ later for more advanced use cases.
|
|||||||
Timeout: time.Millisecond * time.Duration(10000),
|
Timeout: time.Millisecond * time.Duration(10000),
|
||||||
}
|
}
|
||||||
// comrade librehosters DNS resolver https://snopyta.org/service/dns/
|
// comrade librehosters DNS resolver https://snopyta.org/service/dns/
|
||||||
return d.DialContext(ctx, "udp", "95.216.24.230:53")
|
return d.DialContext(ctx, "udp", freifunkDNS)
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
logrus.Debugf("created DNS resolver via 95.216.24.230")
|
logrus.Debugf("created DNS resolver via '%s'", freifunkDNS)
|
||||||
|
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
ips, err := resolver.LookupIPAddr(ctx, domainName)
|
ips, err := resolver.LookupIPAddr(ctx, domainName)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user