Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
EventMachine proxies for performance, monitoring and scale
branch: master

This branch is 91 commits behind igrigorik:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
examples
lib
README.rdoc
em-proxy.gemspec

README.rdoc

EM-Proxy

EventMachine Proxy DSL:

Simple port forwarding proxy

Proxy.start(:host => "0.0.0.0", :port => 80) do |conn|
  conn.server :srv, :host => "127.0.0.1", :port => 81

  # modify / process request stream
  conn.on_data do |data|
    p [:on_data, data]
    data
  end

  # modify / process response stream
  conn.on_response do |backend, resp|
    p [:on_response, backend, resp]
    resp
  end
end
Something went wrong with that request. Please try again.