foreground = yes

%{ for target in local_targets ~}
[server-${target.listen_port}]
accept = 0.0.0.0:${target.listen_port}
connect = ${target.target_host}:${target.target_port}
cert = /etc/ssl/certs/private/tls.crt
key = /etc/ssl/certs/private/tls.key
%{ endfor ~}

%{ for target in remote_targets ~}
[client-${target.listen_port}]
client = yes
accept = 0.0.0.0:${target.listen_port}
connect = ${target.target_host}:${target.target_port}
%{ endfor ~}