3 ms·
I found its internal working quite interesting: $ dig 127.0.0.1.xip.io ;; ANSWER SECTION: 127.0.0.1.xip.io. 403 IN CNAME 9zlhb.xip.
by sirn 12y ago
I found its internal working quite interesting:
$ 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
- matthewrudy 12y agoThe code is on github https://github.com/sstephenson/xipd/blob/master/src/index.coffee#l95-l99 https://github.com/sstephenson/xipd/blob/master/src/index.co.... I wonder if it was just an oversight in parsing the string, rather than deliberate.
- rs 12y agoThere is http://nip.io http://nip.io as well, which does resolutions quite straight forward: $ dig 127.0.0.1.nip.io ;; ANSWER SECTION: 127.0.0.1.nip.io. 432000 IN A 127.0.0.1
- kmf 12y agoHmm, this doesn't seem to be working for me in the same way that xip.io does. One 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.
- sirn 12y agoPow has a special support for .xip.io domain[1]. If you add `export POW_EXT_DOMAINS=10.0.0.1.nip.io pow` to `~/.powconfig` it should work[2]. I haven't tried this myself though. [1]: https://github.com/basecamp/pow/blob/master/lib/configuration.js#L77-78 https://github.com/basecamp/pow/blob/master/lib/configuratio... [2]: http://pow.cx/docs/configuration.html http://pow.cx/docs/configuration.html
- michaelmior 12y agoThe most recent commit[1] causes the server to return an A record instead of a CNAME. [1] https://github.com/sstephenson/xipd/commit/ea40f65300ccc3d32a2f736a2256c3ed7683d963 https://github.com/sstephenson/xipd/commit/ea40f65300ccc3d32...