File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
openvpn/network_manager_networks/files Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -46,21 +46,24 @@ auth={{ vpn_data.pop('auths')|first }}
4646{% - endif %}
4747
4848{% - set remote = vpn_data .pop ('remote' , False ) %}
49- {% - set port = vpn_data .pop ('port' , 1194 ) %}
49+ {% - set port = vpn_data .pop ('port' , False ) %}
5050{% - if remote is iterable and not remote is string %}
5151{% - set remote = remote |first %}
5252{% - endif %}
5353{% - if remote is string %}
5454{% - set remote_pair = remote .split (' ' ) %}
5555{% - set remote = remote_pair |first %}
56- {% - if remote_pair |length > 1 %}
56+ {% - if not port and remote_pair |length > 1 %}
5757{% - set port = remote_pair |last %}
5858{% - endif %}
5959{% - endif %}
60- {% - if remote and port %}
60+ {% - if remote %}
6161remote={{ remote }}
62- port={{ port }}
6362{% - endif %}
63+ {% - if not port %}
64+ {% - set port = 1194 %}
65+ {% - endif %}
66+ port={{ port }}
6467
6568{% - if 'tls_auth' in vpn_data %}
6669ta-dir={{ multipart_param(vpn_data.tls_auth, 1) }}
You can’t perform that action at this time.
0 commit comments