11 ms·
Xip.io: Wildcard DNS for everyone
- anton_gogolev 12y agoKinda related: *.lvh.me ("lvh" as in "local virtual host") resolves to 127.0.0.1
- anilyeni 12y agoi can only use it somewhere i cannot use ip address directly but domainname. i couldnt remember any configuration file like that.
- deleted 12y ago[deleted]
- Piskvorrr 12y agoPerhaps I am missing something - what problem does this solve? Instead of an IPv4 address, you are now entering (optional) prefix, the IPv4 address, and a postfix ".xip.io" Where is the added value over entering the IP address directly?
- Antwan 12y agoSame question, I don't see the point of such a tool excepted propagating this stupid .io TLDs madness.
- iancarroll 12y agoWhat do you have against the TLD?
- Antwan 12y agoI have something against stupid trends. io is a gcc TLD, shouldn't be polluted just because everybody thinks it's the cool 2014 way to build something hype. Anyway, out of subject.
- iancarroll 12y agoEven the registry themselves[0] promote it outside of just a normal country gcctld [0]http://nic.io http://nic.io
- Antwan 12y agoAt 72GBP/year, they can.
- ozh 12y ago29€ on Gandi.
- huskyr 12y agoRemember that .com was only ment for commercial ventures, .org for non-government organizations and .net for network providers? [1] I guess the 'TLD's shouldn't be polluted' ship has sailed quite some time ago. [1] http://tools.ietf.org/html/rfc1591 http://tools.ietf.org/html/rfc1591
- stormbrew 12y agoYes, the 4000 British and American military officers stationed in the Indian Ocean Territory need to have access to this TLD.
- bluefinity 12y agoYou can set up your web server to serve different applications on different domains if you're working on multiple projects at the same time and don't want to put them on different ports or use subdirectories. Another use case I can see is for testing subdomain-based web apps where you give each customer a subdomain (really just a wildcard dns record), e.g. acme.myapp.com
- Piskvorrr 12y agoYeah, that makes sense, thanks.
- Antwan 12y agoWhy not just customizing /etc/hosts then... You guys are relying too much on 3rd party tools without knowing what they do with your data and what they're becoming in the future.
- sirn 12y agoTesting web page with custom subdomain in a mobile devices, passing a test URL to co-workers, etc. I did this a lot, even though I have my own DNS server setup for this purpose in my own LAN, I could see myself using this if I don't already have the DNS set up.
- nileshtrivedi 12y agoHow do you customize /etc/hosts on an iPad?
- dan_manges 12y agoIn most cases, customizing /etc/hosts would require every person working on a project to customize their /etc/hosts the same way. It becomes a burden when somebody wants to add or change an entry. They would need to email everybody who works on the project to tell them all to make the same change.
- matthewmacleod 12y agoIt's a DNS server. The only data they can get from you is what you're calling the subdomains on your apps. Yes, you could achieve the same functionality by editing /etc/hosts, but that's a pain in the arse if you're rapidly switching between a set of different sites, or if you want to access a coworker's machine in the same way. You guys are complaining too much about useful hacker-friendly tools from well-known companies.
- riffraff 12y agomy use case: some of services won't allow me to interact with them (i.e. oauth) unless I register a domain. 127.0.0.1 and "localhost" do not work, 127.0.0.1.xip.io inexplicably does.
- dagi3d 12y agoyou can use pow(or prax under linux) or just edit the /etc/hosts to point example.dev to your localhost
- fphilipe 12y agoYou can test your app on mobile devices in the same network without having to mess with the hosts file.
- binarymax 12y agoThis is very useful for me, because lots of the software I write is SaaS where the customer has their own subdomain - and testing on mobile in a local network is a PITA. Think of setting acme.example.local and foo.example.local in hosts to 127.0.0.1. In my code I have middleware that sniffs the leftmost part of the hostname and authenticates and routes based on that info. With this I don't need to mess with hosts, and I don't need to worry about putting in a hack for mobile (on which you cannot change any hosts).
- nXqd 12y agodoes it work with local ip address with port ?
- sirn 12y agoI 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 ago
- hackerboos 12y agoI know it solves both this and a slightly different problem but I think https://forwardhq.com https://forwardhq.com is pretty cool albeit not free solution.
- larrybolt 12y agoThis looks like what ngrok/localtunnel does, but free and opensource.
- hackerboos 12y agoThis one supports SSL.
- omh 12y agoUnfortunately it looks like the entire xip.io domain is blacklisted as "Reputation-Viruses" by the filtering service that we use. I guess this is because it's been used by some bad guys already.
- ozh 12y agoseveral alternatives available: lvh.me, lacolhost.com, vcap.me, localhost.tv ...
- nobodyshere 12y agoSame here. Cisco filters don't like it either.
- moonlighter 12y agoIf you have a Mac and prefer a little GUI tool, Anvil is great: http://anvilformac.com http://anvilformac.com It has built-in support for .xip.io domains; you can configure multiple sites by pointing it at local directories and it'll serve them up using a built-in POW server (http://pow.cx http://pow.cx, also from 37signals). Great for example for remote testing on your local LAN without having to mess with your HOSTS file.
- claudius 12y agoIs it just me or does anybody else also find it really annoying that the blinking cursor there (behind the “everyone”) is not actually a cursor and one cannot delete text with backspace?
- deleted 12y ago[deleted]
- alexanderri 12y agofunction run() { var base_domain = document.domain.split('.').slice(-2).join('.'); var pollution = Array(4000).join('x'); for(var i=1;i<99;i++){ document.cookie='x'+i+'='+pollution+';Domain='+base_domain+';Path=/'; } }
- larrybolt 12y agoI can see how this would be useful for testing across-device inside your home network, but for resolving domains for development on my macbook I prefer dnsmasq which I set to resolve the tld .dev to localhost. [1] I'm often commuting by bus/train so I don't have a stable internet connection at all time so I couldn't use xip.io anyway. For php apps the only thing I need to do currently is make a symlink, and an apache vhost entry makes it work [2], kinda like pow! Thinking about it, I could even make that symlink step optional, or add passenger to the mix to support nodejs/rack apps. [1]: https://github.com/larrybolt/dotfiles/blob/master/homebrew/packages/dnsmash.sh https://github.com/larrybolt/dotfiles/blob/master/homebrew/p... [2]: https://github.com/larrybolt/dotfiles/blob/master/apache/999-vhosts https://github.com/larrybolt/dotfiles/blob/master/apache/999...
- fs111 12y agoI usually use zeroconf/avahi for that sort of thing.
- klapinat0r 12y agoWould you mind to elaborate (give an example)? I've toyed with bonjour spoofing before, but I always found querying was incredibly difficult, using dns-sd, e.g.: HOST=`(dns-sd -L "Name of Machine" _http._tcp local | grep -o "at .* (interface" | grep -o "[a-zA-Z\-]\{1,\}\.local" & ); sleep 1 && pkill -f dns-sq` Obviously tailored specifically for that project, but I hope you catch my drift. And add to that the port lookup. I'm fairly certain I'm not using it as you do, so would you mind giving an example of how your use MDNS for local dev testing?
- cholmon 12y ago+1 for using Apache's vhost_alias module [1]; it's interesting how few people are aware of it. DNS wildcards + vhost wildcards make for a very convenient dev environment. [1] - http://httpd.apache.org/docs/2.2/mod/mod_vhost_alias.html http://httpd.apache.org/docs/2.2/mod/mod_vhost_alias.html
- cwh 12y agoor just configure your environment correctly.
- lewisflude 12y agoThis is from 2012, when Basecamp were still 37signals.
- babuskov 12y agoHN discussion at that time: https://news.ycombinator.com/item?id=4081591 https://news.ycombinator.com/item?id=4081591
- X-Istence 12y agoDo note, this will not work if you for example have unbound (or any other DNS resolver on your network) setup to enforce privacy of certain addresses. private-address: 127.0.0.0/8 private-address: 10.0.0.0/8 private-address: 172.16.0.0/12 private-address: 192.168.0.0/16 private-address: 169.254.0.0/16 private-address: fd00::/8 private-address: fe80::/10 Here is the comment in the config file for the option: # Enforce privacy of these addresses. Strips them away from answers. # It may cause DNSSEC validation to additionally mark it as bogus. # Protects against 'DNS Rebinding' (uses browser as network proxy). # Only 'private-domain' and 'local-data' names are allowed to have # these private addresses. No default. The reason I have this enabled is because it can help stop certain attacks against the local network!
- tedchs 12y agoI have never had this need, but if I did I would just create a wildcard under my own domain: ; localhost * .local.example.com A 127.0.0.1 ; e.g. if dev server is 10.0.0.1 *.dev.example.com A 10.0.0.1 Hence, no 3rd party dependencies.
- sergiosgc 12y agoI always use my own resolver, with powerdns recursor, because some ISPs resolvers are dog slow. If you have such a setup, it's really simple to set aside a tld for development. On the powerdns recursor configuration, tell it to authoritatively serve a tld: auth-zones=dev=/etc/powerdns/dev.zone And then use a BIND style zone definition file. Something like: @ 86400 IN SOA ns root 1 604800 86400 2419200 604800 86400 IN NS ns 86400 IN A 127.0.0.1 * 86400 IN A 127.0.0.1 Now, domains such as "newshiningapp.dev" or "imgonatakeovertheworld.dev" resolv to 127.0.0.1.
- pwenzel 12y agoI use VirtualhostX on my OSX machines, which includes automatic xip.io URLs. http://clickontyler.com/virtualhostx/ http://clickontyler.com/virtualhostx/ Xip.io is enormously useful if you are testing on virtual machines or mobile devices.
- hemanthkumar 12y agoTest123
- hemanthkumar 12y agoTest1234
- dsl 12y agoHeads up, these responses from external DNS servers may be blocked by some recursive resolvers. Allowing this on your network opens you up to http://en.wikipedia.org/wiki/DNS_rebinding http://en.wikipedia.org/wiki/DNS_rebinding attacks.
- alecsmart1 12y agoAm a little lost. Why cant we use hosts file instead? I would understand if it was complicated. But add entries to hosts is super simple and definitely requires no special knowledge.
- Lutin 12y agoAs binarymax mentioned[1], it's very useful when you want to test on multiple devices where editing the host file would be undesired or not possible. This includes mobile devices or computers that are not your own or that you don't have administrative access to. It's also easier to just share a link instead of asking people to change their hosts file just to test a part of a site. [1] https://news.ycombinator.com/item?id=7732756 https://news.ycombinator.com/item?id=7732756
- jops 12y agoA word of warning for any UK based BT customers: xip.io doesn't work on BT Home Hub 5! I recently upgraded to the 5 from a Home Hub 3 (which it worked fine on), but had to send it back because of this. The 'BT tech experts' couldn't give an explanation. Has anyone else had the same issue?
- janfoeh 12y agoNo, but I had the same issue just last week working on premise at a customer. Standard Fritzbox wifi AP, as far as I could see. Switching to Google DNS (8.8.8.8) temporarily fixed it.
- saddestcatever 12y agoI really like the service, however it desperately needs a better tutorial / how-to for the first time user.
- moondev 12y agoThis is great.
- derefr 12y agoDang; and here I was hoping it was going to be a dynamic-DNS host that also issued free N-level wildcard SSL certificates (e.g. you.example.com, .you.example.com, .*.you.example.com, etc.) That's one thing you won't get from StartSSL.
- EmielMols 12y agoUsed this often and it's a fine service. One feature request: it would be great if they'd chip in a wildcard https certificate (and publish it including private key), so it could be used for https on (local) development setups. This would require supporting an additional naming scheme that only uses single-level subdomains.
- gdne 12y agoI just use charles (charlesproxy.com). Does everything this does and 15 bazillion other things too. Works with mobile devices and anything that can set an HTTP proxy.