stunnel: add protocol support to stunnel (#2022)

This commit is contained in:
fhloston
2020-09-24 17:00:15 +02:00
committed by GitHub
parent caf52376d7
commit a56b2acd3e
4 changed files with 19 additions and 2 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
PLUGIN_NAME= stunnel
PLUGIN_VERSION= 1.0.1
PLUGIN_VERSION= 1.0.2
PLUGIN_COMMENT= stunnel TLS proxy
PLUGIN_MAINTAINER= ad@opnsense.org
PLUGIN_DEPENDS= stunnel
@@ -29,6 +29,12 @@
<type>text</type>
<help>The port to forward traffic to.</help>
</field>
<field>
<id>service.protocol</id>
<label>Protocol</label>
<type>dropdown</type>
<help>The application protocol to negotiate TLS.</help>
</field>
<field>
<id>service.servercert</id>
<label>Certificate</label>
@@ -1,6 +1,6 @@
<model>
<mount>//OPNsense/Stunnel</mount>
<version>1.0.1</version>
<version>1.0.2</version>
<description>
Stunnel TLS encryption proxy
</description>
@@ -45,6 +45,14 @@
<ValidationMessage>port needs to be an integer value between 1 and 65535</ValidationMessage>
<Required>Y</Required>
</connect_port>
<protocol type="OptionField">
<OptionValues>
<imap>IMAP</imap>
<pop3>POP3</pop3>
<smtp>SMTP</smtp>
</OptionValues>
<Required>N</Required>
</protocol>
<cacert type="CertificateField">
<Required>N</Required>
<multiple>Y</multiple>
@@ -19,6 +19,9 @@ 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}}
{% if service.protocol %}
protocol = {{service.protocol}}
{% endif %}
cert = /usr/local/etc/stunnel/certs/{{service['@uuid']}}.crt
{% if service.cacert|default('') != '' %}
CAfile = /usr/local/etc/stunnel/certs/{{service['@uuid']}}.ca