mirror of
https://github.com/FAUSheppy/athq-vm-management
synced 2025-12-06 05:41:35 +01:00
feat: proxy timeout option
This commit is contained in:
@@ -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
3
vm.py
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user