Compare commits

...

3 commits

4 changed files with 30 additions and 16 deletions

View file

@ -10,7 +10,7 @@
<variable name="dns_is_only_local" type="boolean" description="DNS resolve only local address" hidden="True"> <variable name="dns_is_only_local" type="boolean" description="DNS resolve only local address" hidden="True">
<value>True</value> <value>True</value>
</variable> </variable>
<variable name="dns_client_address" type="domainname" description="Nom de domaine du serveur DNS" supplier="LocalDNS" hidden="True"/> <variable name="dns_client_address" type="domainname" description="Nom de domaine du serveur DNS" supplier="LocalDNS" hidden="True" mandatory="True"/>
<variable name="ip_dns" type="ip" description="Adresse IP du serveur DNS" hidden="True"/> <variable name="ip_dns" type="ip" description="Adresse IP du serveur DNS" hidden="True"/>
</family> </family>
</variables> </variables>

View file

@ -20,7 +20,7 @@
</variable> </variable>
<variable name="revprox_client_max_body_size" description="Taille maximum du corps" supplier="ReverseProxy:max_body_size"/> <variable name="revprox_client_max_body_size" description="Taille maximum du corps" supplier="ReverseProxy:max_body_size"/>
<variable name="revprox_client_local_location" type="filename" hidden='True'/> <variable name="revprox_client_local_location" type="filename" hidden='True'/>
<variable name="revprox_client_web_address" type="web_address" hidden='True' supplier="ReverseProxy:url"/> <variable name="revprox_client_web_address" type="web_address" hidden='True' supplier="ReverseProxy:url" mandatory="True"/>
<variable name="revprox_http" type="boolean" hidden='True' supplier="ReverseProxy:http"> <variable name="revprox_http" type="boolean" hidden='True' supplier="ReverseProxy:http">
<value>False</value> <value>False</value>
</variable> </variable>
@ -43,10 +43,10 @@
<target>revprox_client_server_ip</target> <target>revprox_client_server_ip</target>
</fill> </fill>
<fill name="calc_web_address"> <fill name="calc_web_address">
<param type="variable">domain_name_eth0</param> <param type="variable" name="domain_name" optional="True">domain_name_eth0</param>
<param type="variable">revprox_client_port</param> <param type="variable" name="port">revprox_client_port</param>
<param type="variable">revprox_client_local_location</param> <param type="variable" name="local_location">revprox_client_local_location</param>
<param type="variable">revprox_client_http</param> <param type="variable" name="http">revprox_client_http</param>
<target>revprox_client_web_address</target> <target>revprox_client_web_address</target>
</fill> </fill>
</constraints> </constraints>

View file

@ -1,7 +1,7 @@
def calc_web_address(domain_name: str, def calc_web_address(domain_name: str=None,
port: str, port: str=None,
local_location: str, local_location: str=None,
http: bool, http: bool=None,
) -> str: ) -> str:
if not domain_name or not port: if not domain_name or not port:
return return

View file

@ -12,9 +12,9 @@
<variables> <variables>
<family name="network" description="Réseau"> <family name="network" description="Réseau">
<variable name="zones_list" mandatory="False" redefine="True"/> <variable name="zones_list" mandatory="False" redefine="True"/>
<variable name="outgoing_ports" redefine="True"> <variable name="first_zone_name" hidden="True"/>
<value>443</value> <variable name="outgoing_ports" redefine="True" mandatory="False"/>
</variable> <variable name="dns_client_address" redefine="True" mandatory="False"/>
</family> </family>
<family name="revprox"> <family name="revprox">
<variable name="revprox_client_server_domainname" redefine="True" mandatory="False"/> <variable name="revprox_client_server_domainname" redefine="True" mandatory="False"/>
@ -25,12 +25,10 @@
<variable name="revprox_client_location" redefine="True"> <variable name="revprox_client_location" redefine="True">
<value>/.well-known/acme-challenge</value> <value>/.well-known/acme-challenge</value>
</variable> </variable>
<!--variable name="revprox_client_local_location" redefine="True">
<value>/</value>
</variable-->
<variable name="revprox_http" redefine="True"> <variable name="revprox_http" redefine="True">
<value>True</value> <value>True</value>
</variable> </variable>
<variable name="revprox_client_web_address" redefine="True" mandatory="False"/>
</family> </family>
<variable name="revprox_client_http" redefine='True'> <variable name="revprox_client_http" redefine='True'>
<value>True</value> <value>True</value>
@ -40,4 +38,20 @@
</variable> </variable>
</family> </family>
</variables> </variables>
<constraints>
<fill name="calc_value">
<param type="variable" optional="True">domain_name_eth0</param>
<param type="nil"/>
<param name="first" type="boolean">True</param>
<target>first_zone_name</target>
</fill>
<fill name="calc_value">
<param type="nil"/>
<param name="default">443</param>
<param name="condition" type="variable">first_zone_name</param>
<param name="expected" type="nil"/>
<param name="multi">True</param>
<target>outgoing_ports</target>
</fill>
</constraints>
</rougail> </rougail>