Fixie-Wrench Documentation

fixie-wrench is a utility that does port-forwarding, allowing your application to connect to any remote database or service as if it were running locally. Connections are tunneled through Fixie Socks such that every connection comes from a stable set of static IP addresses.

fixie-wrench allows any application to connect to remote hosts via a set of static IP addresses, regardless of language or framework.

Using fixie-wrench

Assuming your FIXIE_SOCKS_HOST enironment variable is set, forwarding a connection is as simple as:

fixie-wrench $localPort:$host:$remotePort

For example, to forward a Postgres database running on port 5432 of my-database.example.com to port 1234 on your application host: fixie-wrench 1234:my-database.example.com:5432. With fixie-wrench running, your application can now connect to the remote database by connecting to localhost:1234.

Installation

The easiest way to install fixie-wrench is to use the installer. In your project directory, run:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/usefixie/fixie-wrench/HEAD/install.sh)"

Alternately, you can install a platform-specific binary or build fixie-wrench from source. For those options, see the README.

Optional command line flags:

  • -v: Verbose mode. In verbose mode, fixie-wrench will print logs for each request to STDERR
  • --socksConnectionString: If set, fixie-wrench will use this connection string instead of the FIXIE_SOCKS_HOST environment variable

An advanced example

fixie-wrench -v 1234:my-first-database.example.com:5432 1235:my-second-database.example.com:5432

This means "using the FIXIE_SOCKS_HOST environment variable, make my-first-database.example.com:5432 available to my application on localhost:1234, and make my-second-database.example.com:5432 available to my application on localhost:1235, and print verbose logs."

Example app

To see fixie-wrench in action, check out the Heroku example app or Koyeb example app

You can also deploy the example app to Heroku with a click:

Deploy to Heroku

You can also deploy the example app to Koyeb with a click:

Deploy to Koyeb

Further reading

fixie-wrench on GitHub

Having issues? Please reach out to our team here.