I'm building a project to manage my own domain names (just for learning purposes). The standard for interfacing with the registry API is to use their EPP server on port 700 with your username, password, and an SSL cert on the client side.
How do I connect to this in node js? Should I open a TLS connection? Their documentation is vague, at best, so if anyone has had any experience doing this, that would help out.
It's also hard testing because I'm not sure if my ip was properly whitelisted. Would like to see a sample code snippet connecting to an EPP server with username, password, and SSL cert, or perhaps just point me in the right direction as I'm most likely overthinking it :p.
Here's where I've started found from the only example online I can find in node.
var fs = require('fs')
var tls = require('tls')
var options = {
cert: fs.readFileSync('cert.pem'),
passphrase: 'passphrase',
username: 'username', // ?
}
var stream = tls.connect(700, 'example.com', options);
stream.setEncoding('utf8')
stream.on('secureConnect', function() {
console.log('client connected')
})
stream.on('data', function(data) {
console.log(data)
})
But that doesn't do anything and won't make the connection.