Skip to content

Commit

Permalink
fix: use go resolver instead of system
Browse files Browse the repository at this point in the history
  • Loading branch information
fritterhoff committed Oct 22, 2023
1 parent c456292 commit f611647
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion acme/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,12 @@ func (c *client) LookupTxt(name string) ([]string, error) {
if os.Getenv("ACME_DNS") != "" {
addr := os.Getenv("ACME_DNS")
r := &net.Resolver{
PreferGo: true,
Dial: func(ctx context.Context, network, address string) (net.Conn, error) {
d := net.Dialer{
Timeout: time.Second * 1,
}
return d.DialContext(ctx, network, addr)
return d.DialContext(ctx, "udp", addr)
},
}
data, err := r.LookupTXT(context.Background(), name)
Expand Down

0 comments on commit f611647

Please sign in to comment.