appserver-io / dnsserver
Multithreaded DNS serve written in php
Installs: 1 932
Dependents: 1
Suggesters: 0
Security: 0
Stars: 15
Watchers: 5
Forks: 8
Open Issues: 0
Requires
- php: >=5.4.0
- appserver-io-psr/socket: ~1.0
- appserver-io/concurrency: ~0.1
- appserver-io/logger: ~2.0
- appserver-io/server: ~10.0
- monolog/monolog: 1.10.*
- psr/log: *
- rhumsaa/uuid: ~2.8
Requires (Dev)
- appserver-io/build: ~1.0
- codeclimate/php-test-reporter: dev-master
README
Introduction
Are you serious? A DNS server written in pure PHP for PHP? Ohhhh Yes! :)
We use this in the appserver.io
project as a server component for handling DNS requests. The purpose to
implement a DNS server is to deliver it with appserver.io and allow automatich DNS resolution for the defined virtual hosts.
Installation
If you want to use the DNS server with your application add this
{ "require": { "appserver-io/dnsserver": "dev-master" } }
to your composer.json
and invoke composer update
in your project.
Usage
If you can satisfy the requirements it is very simple to use the DNS server. Just do this:
git clone https://github.com/appserver-io/dnsserver
cd dnsserver
PHP_BIN=/path/to/your/threadsafe/php-binary bin/dnsserver
If you're using appserver.io
the start line will be:
bin/dnsserver
Open a console and enter
console$ dig @127.0.0.1 test.com A +short
the output should be
111.111.111.111
which is the IP v4 address for the domain test.com, defined in the file etc/dns_record.json
;)
External Links
- Documentation at appserver.io