Skip to content

Conversation

@clue
Copy link
Member

@clue clue commented Feb 6, 2018

This PR implements parsing the resolv.conf file in order to detect system default nameserver configuration. This file is present on most systems and will very likely cover the 90% use case (it is not present on Windows systems). This PR includes some trivial "autodetection" code in the examples to show how this can be used in higher level applications (see also reactphp/socket#90).

This does not implement any other "autodection" mechanisms for other systems. In my opinion, the remainder is best discussed in a separate ticket.

Resolves / closes #29
Supersedes / closes #52, thank you @WyriHaximus
Inspired by #75

@clue
Copy link
Member Author

clue commented Feb 26, 2018

Rebased now that #93 is in :shipit:

This means that this now applies appropriate DNS settings on Unix-based systems (Linux, Mac OS X and more) automatically. A follow-up PR will add support for Windows.

@WyriHaximus WyriHaximus merged commit 927b1e8 into reactphp:master Feb 26, 2018
@clue clue deleted the resolvconf branch February 26, 2018 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use default nameservers (support /etc/resolv.conf)

3 participants