Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The html page at http://whatsmyresolver.stdlib.net/ loads a javascript script from the url http://whatsmyresolver.stdlib.net/resolver/.

Fetching http://whatsmyresolver.stdlib.net/resolver/ triggers a 302 redirect to a url of the form;

  http://$guid.nonce.stdlib.net/resolver/
The DNS server authoritative for nonce.stdlib.net has a simple wildcard configured, so *.nonce.stdlib.net all resolve to the same web-server. Obviously the DNS request for the globally unique id domain name has to come before any HTTP request to the guid url, so when the DNS request comes in the authoritative server can record it in a simple lookup store (guid -> resolver source ip).

Then, when the HTTP request makes it to the web-server, it can inspect the Host: header to determine what the guid was. It then uses this guid to correlate the HTTP request it is handling and the resolver source ip, and generates some javascript with the data we need;

  var resolver="192.0.2.53";var edns=true;
It's just a hack I wrote up for my own reasons years ago. But if you'd like to avail of it for any reason (ie helping end-users debug things), feel free to embed;

  <script language="javascript" src="http://whatsmyresolver.stdlib.net/resolver/"/>
and use the variables it populates. No warrantees or guarantee implied :-)


Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: