https://github.com/wolfpup-software/reverse_proxy
a reverse proxy server
https://github.com/wolfpup-software/reverse_proxy
gateway reverse-proxy rust tls
Last synced: over 1 year ago
JSON representation
a reverse proxy server
- Host: GitHub
- URL: https://github.com/wolfpup-software/reverse_proxy
- Owner: wolfpup-software
- License: bsd-3-clause
- Created: 2022-05-14T19:38:37.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2025-01-20T01:40:27.000Z (over 1 year ago)
- Last Synced: 2025-01-20T02:31:05.176Z (over 1 year ago)
- Topics: gateway, reverse-proxy, rust, tls
- Language: Rust
- Homepage:
- Size: 55.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# reverse_proxy
Route requests to local or upstream servers.
## About
A reverse proxy written in rust using [tokio](https://tokio.rs/) and
[hyper](https://hyper.rs/).
`reverse_proxy` forwards incoming encrypted http1 and http2 requests to upstream servers.
## How to use
### Install reverse_proxy
Execute the following to install `reverse_proxy`.
```sh
git clone https://github.com/wolfpup_software/reverse_proxy
cargo install --path reverse_proxy/reverse_proxy
```
### Create a JSON config
A JSON configuration file is required to run `reverse_proxy`.
#### JSON Schema
All filepaths can be absolute or relative to the config filepath.
```JSON
{
"host_and_port": "",
"key_filepath": "",
"cert_filepath": "",
"addresses": [
["", ""]
],
"dangerous_self_signed_addresses": [
["", ""]
]
}
```
A valid configuration example can be found at [`./reverse_proxy.example.json`](./reverse_proxy.example.json`)
#### Properties
| name | definition |
|----------|------------|
| `host_and_port` | the address of the server (ie: 0.0.0.0:3000) |
| `key_filepath` | the filepath of a key from a TLS certificate |
| `cert_filepath` | the filepath of a cert from a TLS certificate |
| `addresses` | A key value map of URIs used to route incoming requests to upstream servers. Only the `host` and `port` of a URI will be used for routing requests. |
| `dangerous_self_signed_addresses` (optional) | allows `reverse_proxy` to make requests to servers with self-signed TLS certificates |
#### Allow self-signed certificates
ONLY USE the `dangerous_self_signed_addresses` property WITH EXTREME CAUTION.
Ideally never.
This optional property is intended to forward requests to servers using self-signed TLS certificates on local networks.
### Run reverse_proxy
```sh
reverse_proxy ./path/to/config.json
```
Open a browser and visit `https://localhost:XXXX`.
## Licence
`reverse_proxy` is released under the BSD 3-Clause License