]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
manager: datamodel: PROXYv2 option renamed
authorAleš Mrázek <ales.mrazek@nic.cz>
Wed, 27 Apr 2022 10:30:48 +0000 (12:30 +0200)
committerAleš Mrázek <ales.mrazek@nic.cz>
Wed, 27 Apr 2022 10:30:48 +0000 (12:30 +0200)
manager/knot_resolver_manager/datamodel/network_schema.py
manager/knot_resolver_manager/datamodel/templates/network.lua.j2

index b7bdd298f8dedfd5d4d81ddc3735d6a104d2aaf2..9bc970807a290896805b510416c1f4fd213918d9 100644 (file)
@@ -134,7 +134,7 @@ class ListenSchema(SchemaNode):
             )
 
 
-class PROXYv2Schema(SchemaNode):
+class ProxyProtocolSchema(SchemaNode):
     """
     PROXYv2 protocol configuration.
 
@@ -159,7 +159,7 @@ class NetworkSchema(SchemaNode):
     edns_buffer_size: Maximum EDNS payload size advertised in DNS packets. Different values can be configured for communication downstream (towards clients) and upstream (towards other DNS servers).
     address_renumbering: Renumbers addresses in answers to different address space.
     tls: TLS configuration, also affects DNS over TLS and DNS over HTTPS.
-    proxy_v2: PROXYv2 protocol configuration.
+    proxy_protocol: PROXYv2 protocol configuration.
     listen: List of interfaces to listen to and its configuration.
     """
 
@@ -172,7 +172,7 @@ class NetworkSchema(SchemaNode):
     edns_buffer_size: EdnsBufferSizeSchema = EdnsBufferSizeSchema()
     address_renumbering: Optional[List[AddressRenumberingSchema]] = None
     tls: TLSSchema = TLSSchema()
-    proxy_v2: Union[Literal[False], PROXYv2Schema] = False
+    proxy_protocol: Union[Literal[False], ProxyProtocolSchema] = False
     listen: List[ListenSchema] = [
         ListenSchema({"interface": "127.0.0.1"}),
         ListenSchema({"interface": "::1", "freebind": True}),
index 2297775349bf886797517bb3ba1382707a8dcaf6..60b09652c26aaf3ccefacc9a81e5015cc1ef26a9 100644 (file)
@@ -84,10 +84,10 @@ modules.load('http')
 {{ http_config(cfg.network.tls,"doh_legacy") }}
 {% endif %}
 
-{% if cfg.network.proxy_v2 %}
--- network.proxy-v2
+{% if cfg.network.proxy_protocol %}
+-- network.proxy-protocol
 net.proxy_allowed({
-{% for item in cfg.network.proxy_v2.allow %}
+{% for item in cfg.network.proxy_protocol.allow %}
 '{{ item }}',
 {% endfor %}
 })