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 }}
46
46
{% - endif %}
47
47
48
48
{% - set remote = vpn_data .pop ('remote' , False ) %}
49
- {% - set port = vpn_data .pop ('port' , 1194 ) %}
49
+ {% - set port = vpn_data .pop ('port' , False ) %}
50
50
{% - if remote is iterable and not remote is string %}
51
51
{% - set remote = remote |first %}
52
52
{% - endif %}
53
53
{% - if remote is string %}
54
54
{% - set remote_pair = remote .split (' ' ) %}
55
55
{% - set remote = remote_pair |first %}
56
- {% - if remote_pair |length > 1 %}
56
+ {% - if not port and remote_pair |length > 1 %}
57
57
{% - set port = remote_pair |last %}
58
58
{% - endif %}
59
59
{% - endif %}
60
- {% - if remote and port %}
60
+ {% - if remote %}
61
61
remote={{ remote }}
62
- port={{ port }}
63
62
{% - endif %}
63
+ {% - if not port %}
64
+ {% - set port = 1194 %}
65
+ {% - endif %}
66
+ port={{ port }}
64
67
65
68
{% - if 'tls_auth' in vpn_data %}
66
69
ta-dir={{ multipart_param(vpn_data.tls_auth, 1) }}
You can’t perform that action at this time.
0 commit comments