yourivw / LEClient

An easy-to-use PHP ACME v2 client library, designed to be used with LetsEncrypt.
MIT License
204 stars 98 forks source link

Try local DNS for DNS check first #89

Closed mvorisek closed 4 years ago

mvorisek commented 4 years ago

The Google DNS is reliable, but the results are cached.

So if something failed and the DNS results were cached by Google, the DNS check was failing again and again before the caches has expired.

This PR solves this issue by trying local check first. If it passes, check was successful. If not, the old/Google DNS is used.

mvorisek commented 4 years ago

It will be also good to convert the static methods to a singleton, so they can be overrided locally. Let me know if that is ok with you, I can propose the changes.