Skip to content

Instantly share code, notes, and snippets.

@dportalesr
Created July 18, 2014 21:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dportalesr/694d80758f85321041c2 to your computer and use it in GitHub Desktop.
Save dportalesr/694d80758f85321041c2 to your computer and use it in GitHub Desktop.
em-proxy
Proxy.start(:host => "0.0.0.0", :port => 81) do |conn|
conn.server :production, :host => '127.0.0.1', :port => 8080
conn.server :ey_cloud, :host => '204.236.225.141', :port => 81
conn.on_data do |data|
data
end
conn.on_response do |server, resp|
resp if server == :production
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment