rust-rpxy/config-example.toml
2022-06-27 16:10:23 -04:00

44 lines
1.4 KiB
TOML

########################################
# #
# rust-rxpy configuration #
# #
########################################
###################################
# Global settings #
###################################
# Both or either one of http/https ports must be specified
listen_port = 8080
listen_port_tls = 8443
max_concurrent_streams = 128
max_clients = 512
###################################
# Backend settings #
###################################
[application]
[apps.localhost]
server_name = 'localhost'
reverse_proxy = [
# default destination if path is not specified
# 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 },
] },
]
tls = { https_redirection = true, tls_cert_path = 'localhost.pem', tls_cert_key_path = 'localhost.pem' }
## 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
[apps.another_localhost]
server_name = 'localhost.localdomain'
reverse_proxy = [{ upstream = [{ location = 'www.google.com', tls = true }] }]