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.
Command Line¶
harp¶
HTTP Application Runtime Proxy (HARP)
The following commands are available to help you setup and run your HTTP proxy application.
harp [OPTIONS] COMMAND [ARGS]...
db:feature¶
harp db:feature [OPTIONS] {add|remove} [FEATURES]...
Options
- --set <options>¶
Set proxy configuration options (e.g.
--set foo=bar
, can be used multiple times).
- --endpoint <endpoints>¶
Add an endpoint (e.g.
--endpoint httpbin=4000:http://httpbin.org/
, can be used multiple times).
- -f, --file <files>¶
Load configuration from file (configuration format will be detected from file extension, can be used multiple times).
- -e, --example <examples>¶
Load example configuration (can be used multiple times).
- --enable <enable>¶
Enable some applications.
- --disable <disable>¶
Disable some applications.
Arguments
- OPERATION¶
Required argument
- FEATURES¶
Optional argument(s)
db:history¶
harp db:history [OPTIONS]
Options
- --set <options>¶
Set proxy configuration options (e.g.
--set foo=bar
, can be used multiple times).
- --endpoint <endpoints>¶
Add an endpoint (e.g.
--endpoint httpbin=4000:http://httpbin.org/
, can be used multiple times).
- -f, --file <files>¶
Load configuration from file (configuration format will be detected from file extension, can be used multiple times).
- -e, --example <examples>¶
Load example configuration (can be used multiple times).
- --enable <enable>¶
Enable some applications.
- --disable <disable>¶
Disable some applications.
db:migrate¶
harp db:migrate [OPTIONS] {up|down} REVISION
Options
- --set <options>¶
Set proxy configuration options (e.g.
--set foo=bar
, can be used multiple times).
- --endpoint <endpoints>¶
Add an endpoint (e.g.
--endpoint httpbin=4000:http://httpbin.org/
, can be used multiple times).
- -f, --file <files>¶
Load configuration from file (configuration format will be detected from file extension, can be used multiple times).
- -e, --example <examples>¶
Load example configuration (can be used multiple times).
- --enable <enable>¶
Enable some applications.
- --disable <disable>¶
Disable some applications.
- --reset¶
Reset the database (drop all before migrations).
Arguments
- OPERATION¶
Required argument
- REVISION¶
Required argument
db:reset¶
harp db:reset [OPTIONS]
Options
- --set <options>¶
Set proxy configuration options (e.g.
--set foo=bar
, can be used multiple times).
- --endpoint <endpoints>¶
Add an endpoint (e.g.
--endpoint httpbin=4000:http://httpbin.org/
, can be used multiple times).
- -f, --file <files>¶
Load configuration from file (configuration format will be detected from file extension, can be used multiple times).
- -e, --example <examples>¶
Load example configuration (can be used multiple times).
- --enable <enable>¶
Enable some applications.
- --disable <disable>¶
Disable some applications.
server¶
Starts HARP server, using the provided configuration. This is the main process and will be the only process you need on a live server, it will serve both the proxy ports and the compiled frontend assets (dashboard).
harp server [OPTIONS]
Options
- --set <options>¶
Set proxy configuration options (e.g.
--set foo=bar
, can be used multiple times).
- --endpoint <endpoints>¶
Add an endpoint (e.g.
--endpoint httpbin=4000:http://httpbin.org/
, can be used multiple times).
- -f, --file <files>¶
Load configuration from file (configuration format will be detected from file extension, can be used multiple times).
- -e, --example <examples>¶
Load example configuration (can be used multiple times).
- --enable <enable>¶
Enable some applications.
- --disable <disable>¶
Disable some applications.
How to use¶
For PIP and source installs, it will be available as harp in your python environment.
For source installations, you may need to use poetry run harp ….
Docker¶
For Docker installs, the harp CLI being the default command of the container you can pass arguments to the docker run command directly.
docker run -it --rm \
makersquad/harp-proxy \
server --endpoint httpbin=4000:https://httpbin.org
Python package¶
For regular python installations (for example, using pip to install it from PyPI), you’ll find the harp command in your python environment’s path, thus you’ll be able to run:
harp server --endpoint httpbin=4000:https://httpbin.org
Sources¶
For sources installations, the behaviour is similar to installing it from a packaged wheel (python package), but you may need to force using the right environment using poetry.
poetry run harp server --endpoint httpbin=4000:https://httpbin.org
Another way would be to activate the poetry environment and run the command directly:
poetry shell
harp server --endpoint httpbin=4000:https://httpbin.org