mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
net/haproxy: remove options "http-tunnel" and "forceclose", refs #3026
This commit is contained in:
@@ -7,12 +7,15 @@ Plugin Changelog
|
||||
================
|
||||
|
||||
Changed:
|
||||
* update URLs to HAProxy 2.6 documentation
|
||||
* rename frontend option "Type" to "Connection Mode" (#3026)
|
||||
* update URLs to HAProxy 2.6 documentation (#3026)
|
||||
* migrate options "http-tunnel" and "forceclose" to "http-keep-alive" (#3026)
|
||||
|
||||
Removed:
|
||||
* remove Processes/nbproc option (use Threads/nbthread instead)
|
||||
* remove "Process ID" from CPU Affinity settings (now always 1)
|
||||
* remove "bind-process" option (replaced by the "process" bind keyword)
|
||||
* remove Processes/nbproc option (use Threads/nbthread instead) (#3026)
|
||||
* remove "Process ID" from CPU Affinity settings (now always 1) (#3026)
|
||||
* remove "bind-process" option (replaced by the "process" bind keyword) (#3026)
|
||||
* remove options "http-tunnel" and "forceclose" from "Connection Mode" (#3026)
|
||||
|
||||
3.12
|
||||
|
||||
|
||||
+7
-7
@@ -225,6 +225,13 @@
|
||||
<help><![CDATA[The path where the Prometheus exporter can be accessed.]]></help>
|
||||
<advanced>true</advanced>
|
||||
</field>
|
||||
<field>
|
||||
<id>frontend.connectionBehaviour</id>
|
||||
<label>Connection Mode</label>
|
||||
<type>dropdown</type>
|
||||
<help><![CDATA[By default HAProxy operates in <b>keep-alive</b> mode with regards to persistent connections. Option <b>"httpclose"</b> configures HAProxy to close connections with the server and the client as soon as the request and the response are received. It will also check if a "Connection: close" header is already set in each direction, and will add one if missing. Option <b>"http-server-close"</b> enables HTTP connection-close mode on the server side while keeping the ability to support HTTP keep-alive and pipelining on the client side.]]></help>
|
||||
<advanced>true</advanced>
|
||||
</field>
|
||||
<field>
|
||||
<label>Basic Authentication</label>
|
||||
<type>header</type>
|
||||
@@ -426,13 +433,6 @@
|
||||
<label>Advanced settings</label>
|
||||
<type>header</type>
|
||||
</field>
|
||||
<field>
|
||||
<id>frontend.connectionBehaviour</id>
|
||||
<label>Type</label>
|
||||
<type>dropdown</type>
|
||||
<help><![CDATA[By default HAProxy operates in <b>keep-alive</b> mode with regards to persistent connections. Option <b>"http-tunnel"</b> disables any HTTP processing past the first request and the first response. Option <b>"httpclose"</b> configures HAProxy to work in HTTP tunnel mode and check if a "Connection: close" header is already set in each direction, and will add one if missing. Option <b>"http-server-close"</b> enables HTTP connection-close mode on the server side while keeping the ability to support HTTP keep-alive and pipelining on the client side. With Option <b>"forceclose"</b> HAProxy will actively close the outgoing server channel as soon as the server has finished to respond and release some resources earlier.]]></help>
|
||||
<advanced>true</advanced>
|
||||
</field>
|
||||
<field>
|
||||
<id>frontend.customOptions</id>
|
||||
<label>Option pass-through</label>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<model>
|
||||
<mount>//OPNsense/HAProxy</mount>
|
||||
<version>3.8.0</version>
|
||||
<version>4.0.0</version>
|
||||
<description>the HAProxy load balancer</description>
|
||||
<items>
|
||||
<general>
|
||||
@@ -803,10 +803,8 @@
|
||||
<default>http-keep-alive</default>
|
||||
<OptionValues>
|
||||
<http-keep-alive>http-keep-alive [default]</http-keep-alive>
|
||||
<http-tunnel>http-tunnel</http-tunnel>
|
||||
<httpclose>httpclose</httpclose>
|
||||
<http-server-close>http-server-close</http-server-close>
|
||||
<forceclose>forceclose</forceclose>
|
||||
</OptionValues>
|
||||
</connectionBehaviour>
|
||||
<customOptions type="TextField">
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Copyright (C) 2022 Frank Wall
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
|
||||
* OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
namespace OPNsense\HAProxy\Migrations;
|
||||
|
||||
use OPNsense\Base\BaseModelMigration;
|
||||
|
||||
class M4_0_0 extends BaseModelMigration
|
||||
{
|
||||
public function run($model)
|
||||
{
|
||||
foreach ($model->getNodeByReference('frontends.frontend')->iterateItems() as $frontend) {
|
||||
switch ((string)$frontend->connectionBehaviour) {
|
||||
case 'http-tunnel':
|
||||
$frontend->connectionBehaviour = 'http-keep-alive';
|
||||
break;
|
||||
case 'forceclose':
|
||||
$frontend->connectionBehaviour = 'http-keep-alive';
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user