diff options
author | metamuffin <metamuffin@disroot.org> | 2023-02-12 00:33:04 +0100 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2023-02-12 00:33:04 +0100 |
commit | f7d989c8785bb83bfd02a0fa7287b8bf4e383ac6 (patch) | |
tree | 240967f1337d625cfc765cf3718ee11de3859643 /readme.md | |
parent | 851ae4926fba296098fa5f08f99ba64622232ed2 (diff) | |
download | gnix-f7d989c8785bb83bfd02a0fa7287b8bf4e383ac6.tar gnix-f7d989c8785bb83bfd02a0fa7287b8bf4e383ac6.tar.bz2 gnix-f7d989c8785bb83bfd02a0fa7287b8bf4e383ac6.tar.zst |
usage and license
Diffstat (limited to 'readme.md')
-rw-r--r-- | readme.md | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -2,3 +2,28 @@ a simple stupid reverse proxy +## Usage + +Run the binary with the a path to the configuration as the first argument. The +configuration file is written in TOML and could look like this: + +```toml +# Both the [http] and [https] sections are optional +[http] +bind = "127.0.0.1:8080" + +[https] +bind = "127.0.0.1:8443" +tls_cert = "ssl/cert.pem" +tls_key = "ssl/key.pem" # only accepts pkcs8 for now + +# this is a lookup table from hostnames to backend address +# in this case, requests for `testdomain.local` are forwarded to 127.0.0.1:3000 +[hosts] +"testdomain.local" = { backend = "127.0.0.1:3000" } +"secondomain.local" = { backend = "1.2.3.4:5678" } +``` + +# License + +AGPL-3.0-only; see [COPYING](./COPYING) |