没有任何数据可供显示
开源项目社区 | 当前位置 : |
|
www.trustie.net/open_source_projects | 主页 > 开源项目社区 > ruby-pdns |
ruby-pdns
|
0 | 0 | 140 |
贡献者 | 讨论 | 代码提交 |
Ruby development framework for Power DNS Pipe BackendA lot of cases require custom DNS responses based on location, time of day, monitoring status or many other situations, traditional DNS hosting systems makes this very hard. PowerDNS makes this a bit easier for the skilled hacker with it's Pipe Backend but the documentation and implementation details can be quite scary, what if someone made a simple framework to make this easy? This is that framework.
The simplest way to show what it does is by example, here is a record that does Geo Location based responses for www.your.net:
module Pdns
newrecord("www.your.net") do |query, answer|
case country(query[:remoteip])
when "US", "CA"
answer.content "64.xx.xx.245"
when "ZA", "ZW"
answer.content "196.xx.xx.10"
else
answer.content "78.xx.xx.140"
end
end
endPlace this file in /etc/pdns/records/www.your.net.prb and it would get served with full Geo capability. Replace it with a newer version and it will be reloaded and served without any need to restart your pdns server.
The language is Ruby, a number of language extensions and helper functions are provided to do common things like Geo lookups, randomization and so forth and effort has been made to make it intuitive even for non programmer to write simple records, perhaps by using recipes on this site. Being that you have the full power of ruby at your hands right in your nameserver, the possibilities is not just GeoDNS but really anything you can imagine.
This framework allows you to do this and much more. Look at the Introduction page in the wiki for more overview information.
I aim to make this the ideal platform to build Cloud services on, developers and platform managers need fine control over their DNS, traffic and locations of their services.
Current Release: 0.5 fixed issues, Release Notes
Full Changelog