feat: proxy timeout option

This commit is contained in:
2022-12-24 01:52:29 +01:00
parent f35969021a
commit 973d0fda6f
2 changed files with 3 additions and 2 deletions

View File

@@ -3,7 +3,7 @@ server {
# {{ comment }}
listen {{ portstring }} {% if udp %} udp {% endif %}{% if ssl %} ssl {% endif %};
proxy_timeout 10s;
proxy_timeout {{ proxy_timeout }};
proxy_responses 1;
proxy_pass {{ targetip }}:$server_port;

3
vm.py
View File

@@ -43,11 +43,12 @@ class VM:
transparent = portStruct.get("transparent")
proto = portStruct.get("proto") or "tcp"
isUDP = proto == "udp"
proxy_timeout = portStruct.get("proxy_timeout") or "10s"
compositeName = "-".join((self.hostname, name, portstring, proto))
component = template.render(targetip=self.ip, udp=isUDP, portstring=portstring,
transparent=transparent)
transparent=transparent, proxy_timeout=proxy_timeout)
components.append(component)
return components