Surrogate is an HTTP proxy functioning in both forward and reverse proxy modes. It is written in Erlang OTP and uses stream filters for inspecting and modifying data as it passes through the proxy. Additional stream filters can be implemented by writing modules that implement the filter_stream behavior. Reverse proxy features include load balancing. Additional balancer methods can be specified by implementing modules with the gen_balancer behavior. Forward proxy features include gzip compression to end servers, CONNECT support, and an HTTP proxy with authentication that can use MySQL or Mnesia backends. There is also a SOCKS 4/5 proxy listener.