Sometimes you do not have a network traffic interceptor, proxy such as burp or F12 debug tools to inspect requests. This simple reverse proxy is a simple solution to that.
DISCLAIMER: do not use this as a production ready thing, was never designed for this
Sometimes there are is just that one environment where you can't have a debug mode.
If you've mocked an API just to look at the request sent fear no more. This client lets you host a http listener to peek into request details such as bodies, queries, headers and proxy the request to the destination at the same time.
ATM you can install this crate as a cli via cargo
or compile it form source.
To install this crate via cargo
do the following:
sh
cargo install peek-reverse-proxy
``` git clone https://github.com/somehowchris/peek-reverse-proxy.git
cd peek-reverse-proxy
cargo install --path . ```
Once installed, you can run it via:
sh
peek-reverse-proxy
Env variables allow you to configure things to your needs:
- HOST_ADDRESS
: address on which to listen on i.e. 0.0.0.0:8080
- DESTINATION_URL
: destination url including host and scheme i.e. https://www.google.com
- (optional) LOG_LEVEL
: level of logs to log off, debug, normal, critical, defaults to normal
- (optional) PRINT_STYLE
: print style for logs, either json (outputs everything in json style), plain (outputs everything in standard log formats but has no json field formatting), pretty (just as plain, but formats outputs of json fields with serde_jsons pretty option), defaults to pretty
For example:
```sh export HOSTADDRESS="0.0.0.0:8080" export DESTINATIONURL="https://www.google.com" export PRINTSTYLE="json" export LOGLEVEL="normal"
peek-reverse-proxy ```