Project

dynacord

0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Update DNS A records based on current public IP address.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 2.0
~> 10.0
 Project Readme

Dynacord

Dynacord is a Ruby gem, designed to give you an easy interface to updating an A record based on the public IP address from where it's used. It is designed in a way to work with multiple DNS providers, and to be easily expanded.

Installation

Add this line to your application's Gemfile:

gem 'dynacord'

And then execute:

$ bundle

Or install it yourself as:

$ gem install dynacord

Usage

To get the current public IP address (from the host where the call is made):

require 'dynacord'
ipaddr = Dynacord::Address.get

This method also accepts a single parameter as the host to use for determining the IP address:

require 'dynacord'
ipaddr = Dynacord::Address.get('http://myiplookup.example.com')

The mechanism for updating an A record with this IP address varies, based on the provider that you're using for DNS.

Providers

Providers are DNS providers, that Dynacord can use to update an A record. Each provider has different requirements, so see the class for the provider you're using to get more specific details.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/sedunne/dynacord.

License

The gem is available as open source under the terms of the MIT License.

Todo

  • Add more providers
  • Add provider-independent interface for common values (domain, apikey, record, etc)
  • Tests
  • Refactor address.rb to use net/http
  • ???