mirror of
https://github.com/opnsense/plugins.git
synced 2026-05-28 04:34:15 -04:00
Merge pull request #541 from fraenki/haproxy_250
net/haproxy: Release 2.5
This commit is contained in:
commit
f40164b9e3
4 changed files with 25 additions and 3 deletions
|
|
@ -1,7 +1,7 @@
|
|||
PLUGIN_NAME= haproxy
|
||||
PLUGIN_VERSION= 2.4
|
||||
PLUGIN_VERSION= 2.5
|
||||
PLUGIN_COMMENT= Reliable, high performance TCP/HTTP load balancer
|
||||
PLUGIN_DEPENDS= haproxy
|
||||
PLUGIN_DEPENDS= haproxy-devel
|
||||
PLUGIN_MAINTAINER= opnsense@moov.de
|
||||
|
||||
.include "../../Mk/plugins.mk"
|
||||
|
|
|
|||
|
|
@ -31,6 +31,13 @@
|
|||
<help><![CDATA[Define the load balancing algorithm to be used in a Backend Pool. See the <a target="_blank" href="http://cbonte.github.io/haproxy-dconv/1.8/configuration.html#balance">HAProxy documentation</a> for a full description.]]></help>
|
||||
<hint>Choose a load balancing algorithm.</hint>
|
||||
</field>
|
||||
<field>
|
||||
<id>backend.proxyProtocol</id>
|
||||
<label>Proxy Protocol</label>
|
||||
<type>dropdown</type>
|
||||
<help><![CDATA[Enforces use of the PROXY protocol over any connection established to the configured servers. The PROXY protocol informs the other end about the layer 3/4 addresses of the incoming connection, so that it can know the client's address or the public address it accessed to, whatever the upper layer protocol. This setting must not be used if the servers are not aware of the PROXY protocol. See the <a target="_blank" href="http://cbonte.github.io/haproxy-dconv/1.8/configuration.html#send-proxy">HAProxy documentation</a> for a full description.]]></help>
|
||||
<advanced>true</advanced>
|
||||
</field>
|
||||
<field>
|
||||
<id>backend.linkedServers</id>
|
||||
<label>Servers</label>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<model>
|
||||
<mount>//OPNsense/HAProxy</mount>
|
||||
<version>2.1.0</version>
|
||||
<version>2.2.0</version>
|
||||
<description>
|
||||
the HAProxy load balancer
|
||||
</description>
|
||||
|
|
@ -620,6 +620,13 @@
|
|||
<uri>URI Hash (only HTTP mode)</uri>
|
||||
</OptionValues>
|
||||
</algorithm>
|
||||
<proxyProtocol type="OptionField">
|
||||
<Required>N</Required>
|
||||
<OptionValues>
|
||||
<v1>Version 1</v1>
|
||||
<v2>Version 2</v2>
|
||||
</OptionValues>
|
||||
</proxyProtocol>
|
||||
<linkedServers type="ModelRelationField">
|
||||
<Model>
|
||||
<template>
|
||||
|
|
|
|||
|
|
@ -1053,6 +1053,14 @@ backend {{backend.name}}
|
|||
{% elif server_data.source|default("") != "" %}
|
||||
{% do server_options.append('source ' ~ server_data.source) %}
|
||||
{% endif %}
|
||||
{# # PROXY protocol #}
|
||||
{% if backend.proxyProtocol|default("") == "v1" %}
|
||||
{% do server_options.append('send-proxy') %}
|
||||
{% do server_options.append('check-send-proxy') %}
|
||||
{% elif backend.proxyProtocol|default("") == "v2" %}
|
||||
{% do server_options.append('send-proxy-v2') %}
|
||||
{% do server_options.append('check-send-proxy') %}
|
||||
{% endif %}
|
||||
{# # server advanced options #}
|
||||
{% if server_data.advanced|default("") != "" %}
|
||||
{% do server_options.append(server_data.advanced) %}
|
||||
|
|
|
|||
Loading…
Reference in a new issue