rust-rpxy/config-example.toml
2022-06-25 10:33:55 -04:00

46 lines
1.5 KiB
TOML

########################################
# #
# rust-rxpy configuration #
# #
########################################
###################################
# Global settings #
###################################
http_port = 8080
https_port = 8443
###################################
# Backend settings #
###################################
[[application]]
app_name = 'localhost' # this should be option, if null then same as server_name
hostname = 'localhost'
https_redirection = true
reverse_proxy = [
# default destination if path is not specified
# TODO: Array for load balancing
{ upstream = [
{ location = 'www.google.com', tls = true },
{ location = 'www.google.co.jp', tls = true },
] },
{ path = '/maps', upstream = [
{ location = 'www.bing.com', tls = true },
{ location = 'www.bing.co.jp', 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'] # 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 = [{ upstream = [{ location = 'www.google.com', tls = true }] }]
tls_cert_path = 'localhost.pem'
tls_cert_key_path = 'localhost.pem'