amphp / dns

Async DNS resolution for PHP based on Amp.
https://amphp.org/dns
MIT License
155 stars 32 forks source link

etc/resolve ndots set to 1 #98

Closed suadhuskic closed 4 years ago

suadhuskic commented 4 years ago

Wondering why its set to 1 ? I'd like to set it to 3 without writing a new resolver. https://github.com/amphp/dns/blob/master/lib/UnixConfigLoader.php#L21

Is there a way to extend UnixConfigLoader and continue to use Rfc1035StubResolver ?

kelunik commented 4 years ago

You can either edit your /etc/resolv.conf, or set RES_OPTIONS in the environment, which can also be done at the start of the script.

putenv('RES_OPTIONS', 'ndots:3');