Programmable DNS resolver class for offline emulation of DNS