This library contains native implementation of RELP protocol in ruby with TLS support. At the moment only server-side is properly implemented and (to some extent) tested.
Add this line to your application's Gemfile:
gem 'relp'
And then execute:
$ bundle
Or install it yourself as:
$ gem install relp
To run server just create instance of Relp::RelpServer.new(port, callback, host, tls_context, logger)
and then call method run on instance of server e.g. server.run
port
callback
host
tls_context
sslContext = OpenSSL::SSL::SSLContext.new
sslContext.cert = OpenSSL::X509::Certificate.new(File.open("path/to/certificate/cert.pem"))
sslContext.key = OpenSSL::PKey::RSA.new(File.open("path/to/key/key.pem"))
sslContext.ca_file = 'path/to/certificate/authority/ca.pem'
sslContext.verify_mode = OpenSSL::SSL::VERIFY_PEER #only if you want verify peer
logger
Logger.new(STDOUT)
with all levels of loggingrun
Start connecting clientsserver_shutdown
Close connection to all clients and shutdown serverComing soon.
After checking out the repo, run bin/setup
to install dependencies. Then, run rake test
to run the tests. You can also run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
.
Bug reports and pull requests are welcome on GitHub at https://github.com/ViaQ/Relp.
The gem is available as open source under the terms of the MIT License.