dokipen edited this page Sep 12, 2010 · 9 revisions
Clone this wiki locally

Welcome to dokipen’s mousehole wiki!



dnsruby is a better dns implementation for ruby.

The default implementation does not properly fallback to the secondary dns servers on timeout, which causes issues with mousehole. You can install dnsruby with gem install dnsruby. To use it, pass the --dnsruby option on mousehole invocation.


Ability to rewrite requests in your MouseHole::App.

Sometimes you would like to rewrite reqeust headers or data on the way to the remote server. Sometimes it’s nice to just capture the request information. The ability has been added to my repo. One thing that is still left to be implemented is a rules engine similar to what we have with response rewrites. Instead of using + <url>, we define a request_rewrites? method in our App. The actually rewriting is done in the request_rewrite method. Here is an useless example that would cause all requests to go to the mousehole proxy instead of the remote host.

class StupidRequestRewrite < MouseHole::App
  def request_rewrites? request
  def request_rewrite request
    request.params['HTTP_HOST'] = request.params['SERVER_NAME'] = 'mh'