This is a ruby version of the following f5 proxy script: https://github.com/busterswt/f5