暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

使用nip.io完成域名解析

阅后即忘 2017-12-29
6658

昨天小毛同学告诉我说发现一个很流弊的东西叫 nip.io,可以凭域名自动解析为 IP 地址,极大的方便了 kubernetes 中 ingress 部分的测试。在 cmd 中试了一下还真是好用,记录一下~


官方介绍

NIP.IODead simple wildcard DNS for any IP Address NIP.IO allows you to map any IP Address in the following DNS wildcard entries: 10.0.0.1.nip.io maps to 10.0.0.1 app.10.0.0.1.nip.io maps to 10.0.0.1 customer1.app.10.0.0.1.nip.io maps to 10.0.0.1 customer2.app.10.0.0.1.nip.io maps to 10.0.0.1 otherapp.10.0.0.1.nip.io maps to 10.0.0.1 NIP.IO maps <anything>.<IP Address>.nip.io to the corresponding <IP Address>, even 127.0.0.1.nip.io maps to 127.0.0.1 This service is a blatant rip-off of xip.io, with one big difference: NIP.IO is powered by PowerDNS with a simple, custom PipeBackend. So, it actually works :) (no messy, custom DNS server here!) The custom PipeBackend is a single script written in Python and the source can be found on XP-Dev.com. This is a free service provided by Exentrique Solutions (the same guys who run XP-Dev.com which offers Git, Mercurial and Subversion hosting). The infrastructure runs on a couple of Virtual Machines in the US West Coast and Germany. Feedback is appreciated, just drop us a mail at info@exentriquesolutions.com or use this web form.


原来 nip.io 像 xip.io 一样是一个欺骗性的映射,可以方便的把 xxx.192.168.1.1.nip.io 这样的域名解析成 192.168.1.1 ,在 web 测试中十分方便。不必频繁地修改 DNS 或者 hosts 文件即可实现域名和地址的解析关系。 xip.io 和 nip.io 还有一个区别是,nip.io 后端是有 powerDNS ,是实际发生了解析操作。

注意:离线模式下不可用哦~


实测

使用 cmd 对域名进行了简单测试,结果如下:



文章转载自阅后即忘,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论