mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
security/stunnel: Fix connect format for IPv6 addresses (#2852)
The current code generates conf line: ``` connect = [::1]:53 ``` will end up producing the following: ``` Error resolving "[::1]": Neither nodename nor servname known (EAI_NONAME) ``` stunnel(8) states that an address parameter of an option may be either: > ... > A colon-separated pair of IP address (either IPv4, IPv6, or domain name) and port number. > ... which means there should not be special treatment on IPv6 addresses.
This commit is contained in:
@@ -18,7 +18,7 @@ logId = unique
|
||||
; **************************************************************************
|
||||
[{{service['@uuid']}}]
|
||||
accept = {% if service.accept_address %}{{service.accept_address}}:{% endif %}{{service.accept_port}}
|
||||
connect = {% if service.connect_address.find(":") > -1 %}[{{service.connect_address}}]{% else %}{{service.connect_address}}{% endif %}:{{service.connect_port}}
|
||||
connect = {{service.connect_address}}:{{service.connect_port}}
|
||||
{% if service.protocol %}
|
||||
protocol = {{service.protocol}}
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user