EPP (by Ultraspeed)

The EPP gem provides basic functionality for connecting and making requests on EPP (Extensible Provisioning Protocol) servers. Currently, major providers Centralnic and Nominet have been tested.

Installation

If you already have Gemcutter installed, you can install this gem with:

$ gem install epp

Otherwise, a few more steps are involved:

$ gem install gemcutter
$ gem tumble
$ gem install epp

Then, you can require it in your Ruby app:

require "epp"

If you’re using Rails, add the following line to your Rails config/environment.rb:

config.gem "epp", :source => "http://gemcutter.org"

Once you do that, you can install the gem by typing sudo rake gems:install.

Example Usage

First, you must initialize an Epp::Server object to use. This requires the EPP server address, tag/username and password:

server = Epp::Server.new(
  :server => "testbed-epp.nominet.org.uk",
  :tag => "TESTING",
  :password => "testing"
)

If no port is specified, it will be assumed that you will be using port 700.

You would then make an XML request to the server.

xml       = "<?xml ... </epp>"
response  = server.request(xml)

You can build this however you’d like. The process is as follows:

  • Connect to EPP server and receive the <greeting> frame

  • Send a standard <login> request

  • Send your request

  • Send a standard <logout> request

  • Disconnect the socket from the server

The EPP module would then return the XML response as a string. In this example, the response XML would be set equal to response for your usage.

Once the request is complete, it will automatically close the connection. For simplicity purposes, this plug-in will not use a persistent connection to the EPP server. This may change in future releases, as some registries require that persistent connections be supported. Please feel free to email me to collaborate on making this possible.

Bugs/Issues

Please report all issues using the GitHub issue tracker at:

github.com/ultraspeed/epp/issues

Credit

Author: Josh Delsman at Ultraspeed (twitter.com/voxxit) Inspired from: labs.centralnic.com/Net_EPP_Client.php

License

See the LICENSE file.