mirror of
https://github.com/FAUSheppy/athq-vm-management
synced 2025-12-06 05:41:35 +01:00
feat: extra content option for stream block
This commit is contained in:
@@ -13,6 +13,10 @@ server {
|
||||
proxy_pass {{ targetip }}:$server_port;
|
||||
{% endif %}
|
||||
|
||||
{% if extra_content %}
|
||||
{{ extra_content }}
|
||||
{% endif %}
|
||||
|
||||
{% if transparent %}
|
||||
proxy_bind $remote_addr:{% if targetportoverwrite %}{{ targetportoverwrite }}{% else %}$remote_port{% endif %} transparent;
|
||||
{% endif %}
|
||||
|
||||
3
vm.py
3
vm.py
@@ -66,6 +66,7 @@ class VM:
|
||||
proto = portStruct.get("proto") or "tcp"
|
||||
isUDP = proto == "udp"
|
||||
proxy_timeout = portStruct.get("proxy_timeout") or "10s"
|
||||
extra_content = portStruct.get("extra-content")
|
||||
|
||||
compositeName = "-".join((self.hostname, name, portstring, proto))
|
||||
|
||||
@@ -74,7 +75,7 @@ class VM:
|
||||
|
||||
component = template.render(targetip=self.ip, udp=isUDP, portstring=portstring,
|
||||
transparent=transparent, proxy_timeout=proxy_timeout,
|
||||
comment=compositeName)
|
||||
comment=compositeName, extra_content=extra_content)
|
||||
components.append(component)
|
||||
|
||||
return components
|
||||
|
||||
Reference in New Issue
Block a user