Skip to content
A little (sneaky) Ruby proxy server that gets shit done. Easily extensible and inherently multithreaded (and parallel if you use an appropriate Ruby).
Ruby
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
README.md
proxy.rb

README.md

Ruby Raccoon

I am currently updating an older proxy to be better in every which way, so this repo might be a mix of old and new for a little while

Ruby Raccoon is a small little (sneaky) proxy server that is meant to intercept requests, possibly meddle with them, possibly not, and then transparently serve them back. Possible uses include caching, redirects, security, filtering, etc.

The Raccoon is built upon Celluloid for fast and sensible concurrency. For true parallelism I reccommend running the server on Rubinius (2.0) or JRuby to leverage the existing concurrency of the server.

The Raccoon accepts a block upon initialization that will be run against all requests, or you can use on of the predefined modes. She also can be used to perform analytics, collect statistics, or scale an architecture.

Motivation

Now you might be thinking, why would I need all that parallelism? Isn't this just a proxy just waiting around for most of it's life? You would be right if this were any old proxy server, but how dare you talk about Ruby (the raccoon, not the language) in that way. She does not just sit idle while things are passed to and fro! Ruby is quite the industrious proxy server and can get real things done (see use cases below) with all those requests she handles (especially when she multitasks).

Fine. Cool. Parallelism. Concurrency. whatever. I'll just use Node, I hear that shiiizz is like awesome. Or better yet a real proxy. And by all means those are fine solutions, but the Raccoon really lets you forage around in web requests!

The Raccoon lets you use Ruby (the language this time) to customize your proxy in a very transparent manner (with some awesome plugin sauce) and have fun with proxies!

Disclaimer: Ruby Raccoon should probably not be used in production since people much smarter than me have implemented much better solutions but the Raccoon is a great way to play around with requests, learn about the internet and its hobbies, and do some meddling of your own

Ruby Raccoon can also easily be distributed (or interact with distributed applications) through its close integration with DCell... it's like Legos! with Ruby (the language again).

Quickstart

ruby proxy.rb [port]

Plugins

  1. Caching (with Redis)
  2. Statistics
  3. Security/Filtering
  4. Cluster
  5. Load-balancer
  6. Write your own!
  7. Inspector
Something went wrong with that request. Please try again.