Skip to content

Ruby Gem. TCP(HTTP) server that serves SSL(TLS) connections and forwards them to the target

Notifications You must be signed in to change notification settings

artyomb/ssl_gate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SSL_Gate

This gem allows to start TCP(HTTP) server that serves SSL(TLS) connections and forwards them to the target.
HTTP requests are recreated and responses are send back while TCP connections are coupled and each data packets are forwarded both directions asynchronously.

Installation

To install the gem

$ gem install ssl_gate

Usage

Create the file SSLGate which describes the gates

google:
  bind_port: 9001
  target: https://www.google.com
  private_key_file: "../test/ssl/server.key"
  cert_chain_file: "../test/ssl/server.crt"

Then run in the current directory

$ ssl_gate

This will start the HTTPS server on the 0.0.0.0:9001 with the SSL Certificate specified. Each request will spawn the corresponding one to the target server and response will be send back.

Local Gate

More practical example is to setup server gates to secure local services access. Suppose you have Wiki server, RestAPI server and Jabber server running locally. Then you can setup three gates to provide SSL access to these services from outside.

The SSLGate file may looks as follows

wiki:
  bind_port: 80
  target: http://127.0.0.1:8080
  private_key_file: "server.key"
  cert_chain_file: "server.crt"
rest_api:
  bind_port: 90
  target: http://127.0.0.1:9090
  private_key_file: "rest_server.key"
  cert_chain_file: "rest_server.crt"
jabber:
  bind_port: 6222
  target: tcp://127.0.0.1:5222
  private_key_file: "xmpp_server.key"
  cert_chain_file: "xmpp_server.crt"

To start the gates simply run ssl_gate in the SSLGate file directory

About

Ruby Gem. TCP(HTTP) server that serves SSL(TLS) connections and forwards them to the target

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published