works almost. todo: config.toml

This commit is contained in:
Jun Kurihara 2022-06-25 09:31:13 -04:00
commit 744b65b738
No known key found for this signature in database
GPG key ID: 48ADFD173ED22B03
6 changed files with 74 additions and 23 deletions

View file

@ -18,21 +18,22 @@ app_name = 'localhost' # this should be option, if null then same as hostname
hostname = 'localhost'
https_redirection = true
reverse_proxy = [
{ path = '*', destination = '192.168.10.0:3000', tls = true },
{ path = '/path/to', destination = '192.168.10.1:4000', tls = true },
# default destination if path is not specified
{ destination = 'www.google.com', tls = true },
{ destination = 'www.bing.com', path = '/maps', tls = true },
]
## List of destinations to send data to.
## At this point, round-robin is used for load-balancing if multiple URLs are specified.
allowhosts = ['127.0.0.1', '::1', '192.168.10.0/24']
denyhosts = ['*']
tls_cert_path = 'localhost1.pem'
tls_cert_key_path = 'localhost1.pem'
# allowhosts = ['127.0.0.1', '::1', '192.168.10.0/24'] # TODO
# denyhosts = ['*'] # TODO
tls_cert_path = 'localhost.pem'
tls_cert_key_path = 'localhost.pem'
[[application]]
app_name = 'locahost_application'
hostname = 'localhost.localdomain'
https_redirection = true
reverse_proxy = [{ path = '/', destination = 'www.google.com', tls = true }]
tls_cert_path = 'localhost2.pem'
tls_cert_key_path = 'localhost2.pem'
reverse_proxy = [{ destination = 'www.google.com', tls = true }]
tls_cert_path = 'localhost.pem'
tls_cert_key_path = 'localhost.pem'