by sirn · 12y ago · 0 comments
$ dig 127.0.0.1.xip.io
;; ANSWER SECTION:
127.0.0.1.xip.io. 403 IN CNAME 9zlhb.xip.io.
9zlhb.xip.io. 405 IN A 127.0.0.1
Returning CNAME pointing to some record? Apparently, 9zlhb is a base 36 of integer of 1.0.0.127. ip: 1.0.0.127
dec: 16777343
base 36: 9zlhb
I guess they decided to reverse the IP address to make generated CNAME scale better (in number of characters): base 36 reverse base 36
1.0.0.0 9ZLDS 1
10.0.0.1 2RVXTT 9ZLE2
127.0.0.1 Z8KFLT 9ZLHB[1] https://github.com/sstephenson/xipd/commit/ea40f65300ccc3d32...
$ dig 127.0.0.1.nip.io
;; ANSWER SECTION:
127.0.0.1.nip.io. 432000 IN A 127.0.0.1One of my favorite features of Pow (also 37Signals, mentioned on xip.io) is the ability to forward .dev domains to certain ports. For instance:
`echo 3000 >> ~/.pow/myapplication` gives you `myapplication.dev` as an alias for `localhost:3000`.
xip.io seems to be able to figure that out -- myapplication.10.0.0.1.xip.io will work, whereas myapplication.10.0.0.1.nip.io does not (just shows the Pow page you would see for going to `localhost`).
Am I missing something here to get it to work with nip.io? I'm all for simpler tools, but since the port functionality is 100% of what I use Pow for, xip.io seems to be the way to go for now.
[1]: https://github.com/basecamp/pow/blob/master/lib/configuratio...