Attention

This is the documentation for HARP Proxy, actually published as an early preview. Both the software and documentation are a work in progress, and although we already use it on various production servers, they may contain inaccuracies, typographical errors, huge mistakes and empty pages. We work hard to eradicate all mistakes and implement stuff, but it is a long and tedious process. We appreciate your patience and understanding. Of course, any help will be greatly appreciated.

Python & PIP

Harp is also installable using a Python package manager (most likely, pip`).

Install with PIP

You need a working Python 3.12 environment with the pip package manager (or another package manager of your choice). To insall it, run:

pip install harp-proxy

Start a proxy

Then, you’ll be able to start the server using:

harp server

This will start the proxy using the default settings (in memory sqlite storage) and by default, the dashboard will be available locally on the 4080 port. This first run is not very interesting, because there are no proxy ports configured. Nothing can get through, yet. Stop this process and run another harp server with the following command:

harp server --endpoint httpbin=4000:http://httpbin.org

This will start a new harp server with an additional port that will proxy requests to httpbin.org. In another terminal, send a few requests through the configured proxy port (you can use your favorite http client for this instead of curl):

curl -X GET "http://localhost:4000/get" -H "accept: application/json"
curl -X POST "http://localhost:4000/post" -H "accept: application/json"
curl -X PUT "http://localhost:4000/put" -H "accept: application/json"

Open the dashboard again, you’ll be able to see the transactions that went through.