The DNSServer currently only resolves A records and has no support for AAAA records or IPv6 literals. The behaviour should be configurable, to make sure only relevant addresses are returned. E.g. when only IPv4 is available only IPv4 addresses should be returned, when only IPv6 is availble only IPv6 addresses should be returned. When both are available is should be possible to specify a 'prefered protocol'.
It might be possible to autoconfigure some things by querying java.net.NetworkInterface.
DnsJames seems to have all the needed functions.