Changed $dns to an array, and set it dynamically from static configuration.