Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Simple EM multiplexing TCP proxy developed for Loto
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.gitignore
README.markdown
lotoproxy.rb

README.markdown

SUMMARY

LotoProxy is a simple TCP multiplexing proxy for Loto. It connects with single connection to server and waits for clients. Data received from a client is transfered to server without any modification. Data received from a server is broadcasted to all clients.

Requirements

  • Ruby (any version)
  • RubyGems
  • EventMachine gem

USAGE

    lotoproxy.rb [listen_ip]:listen_port connect_to_ip:connect_to_port

Simple test case

  1. Clone the git repo

    git clone git://github.com/slayer/lotoproxy.git
    
  2. Run fake server

    while sleep 1; do echo "---server restart---"; nc -l 1111; done
    
  3. Run several fake clients

    while sleep 1; do echo "---connecting---"; nc 127.0.0.1 2222; done
    
  4. Run proxy

    ruby lotoproxy.rb 127.0.0.1:2222 127.0.0.1:1111
    
  5. Enjoy

Something went wrong with that request. Please try again.