first cut code for dns proxy