aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2015-12-14 09:54:15 -0200
committerRenato Botelho <renato@netgate.com>2015-12-14 09:54:15 -0200
commitc2af83de50861c06434b569a95b75af8da1b21df (patch)
tree02c92a8a8ea838e4cc87c3359da54d4ba3eb7bed
parent4f0db58132b8aeeb483b31b3f35b7fae98b63316 (diff)
parenteeb48a38bb2600a1ab8f37158ebee72a5a737944 (diff)
downloadpfsense-packages-c2af83de50861c06434b569a95b75af8da1b21df.tar.gz
pfsense-packages-c2af83de50861c06434b569a95b75af8da1b21df.tar.bz2
pfsense-packages-c2af83de50861c06434b569a95b75af8da1b21df.zip
Merge pull request #1215 from PiBa-NL/haproxy_pkg0.32
-rw-r--r--config/haproxy-devel/haproxy.xml2
-rw-r--r--config/haproxy-devel/pkg/haproxy.inc9
-rw-r--r--config/haproxy-devel/pkg/haproxy_socketinfo.inc6
-rw-r--r--config/haproxy-devel/www/haproxy_global.php29
-rw-r--r--config/haproxy-devel/www/haproxy_listeners_edit.php16
-rw-r--r--config/haproxy-devel/www/haproxy_pool_edit.php13
-rw-r--r--pkg_config.10.xml2
-rw-r--r--pkg_config.8.xml2
-rw-r--r--pkg_config.8.xml.amd642
9 files changed, 55 insertions, 26 deletions
diff --git a/config/haproxy-devel/haproxy.xml b/config/haproxy-devel/haproxy.xml
index 19b6b577..a096b850 100644
--- a/config/haproxy-devel/haproxy.xml
+++ b/config/haproxy-devel/haproxy.xml
@@ -42,7 +42,7 @@
]]>
</copyright>
<name>haproxy</name>
- <version>0.33</version>
+ <version>0.35</version>
<title>HAProxy</title>
<aftersaveredirect>/pkg_edit.php?xml=haproxy_pools.php</aftersaveredirect>
<include_file>/usr/local/pkg/haproxy.inc</include_file>
diff --git a/config/haproxy-devel/pkg/haproxy.inc b/config/haproxy-devel/pkg/haproxy.inc
index 3d614fe0..8dce42ee 100644
--- a/config/haproxy-devel/pkg/haproxy.inc
+++ b/config/haproxy-devel/pkg/haproxy.inc
@@ -43,7 +43,10 @@ $a_frontendmode = array();
$a_frontendmode['http'] = array('name' => "http / https(offloading)", 'shortname' => "http/https");
$a_frontendmode['https'] = array('name' => "ssl / https(TCP mode)", 'shortname' => "ssl/https");
$a_frontendmode['tcp'] = array('name' => "tcp", 'shortname' => "tcp");
-$a_frontendmode['health'] = array('name' => "health", 'shortname' => "health");
+/*
+ if anyone actually used this what was it good for with recent package versions?
+$a_frontendmode['health'] = array('name' => "health", 'shortname' => "health");
+*/
global $a_acltypes;
$a_acltypes = array();
@@ -1738,8 +1741,8 @@ function haproxy_writeconf($configpath) {
if ($bind['forwardfor']) {
fwrite ($fd, "\toption\t\t\tforwardfor\n");
fwrite ($fd, "\tacl https ssl_fc\n");
- fwrite ($fd, "\treqadd X-Forwarded-Proto:\ http if !https\n");
- fwrite ($fd, "\treqadd X-Forwarded-Proto:\ https if https\n");
+ fwrite ($fd, "\thttp-request set-header\t\tX-Forwarded-Proto http if !https\n");
+ fwrite ($fd, "\thttp-request set-header\t\tX-Forwarded-Proto https if https\n");
}
}
diff --git a/config/haproxy-devel/pkg/haproxy_socketinfo.inc b/config/haproxy-devel/pkg/haproxy_socketinfo.inc
index cbfb131b..7dbb6221 100644
--- a/config/haproxy-devel/pkg/haproxy_socketinfo.inc
+++ b/config/haproxy-devel/pkg/haproxy_socketinfo.inc
@@ -40,14 +40,18 @@ $show_clients_traffic = "YES";
function haproxy_socket_command($command){
$result = array();
if (file_exists("/tmp/haproxy.socket")) {
- $socket = stream_socket_client('unix:///tmp/haproxy.socket', $errno, $errstr);
+ $socket = @stream_socket_client('unix:///tmp/haproxy.socket', $errno, $errstr);
if ($socket) {
fwrite($socket, "$command\n");
while (!feof($socket)) {
$result[] = fgets($socket);
}
fclose($socket);
+ } else {
+ echo "cannot open command socket, haproxy not running? ({$errstr})";
}
+ } else {
+ echo "haproxy command socket does not exist, haproxy not running?";
}
return $result;
}
diff --git a/config/haproxy-devel/www/haproxy_global.php b/config/haproxy-devel/www/haproxy_global.php
index 4902b966..ce6b249e 100644
--- a/config/haproxy-devel/www/haproxy_global.php
+++ b/config/haproxy-devel/www/haproxy_global.php
@@ -425,29 +425,29 @@ function enable_change(enable_change) {
</tr>
<tr>
<td valign="top" class="vncell">
- 'resolver_retries'
+ Retries
</td>
<td class="vtable">
<input name="resolver_retries" type="text" <?if(isset($pconfig['resolver_retries'])) echo "value=\"{$pconfig['resolver_retries']}\"";?> size="50"/><br/>
- Email address to be used as the sender of the emails.
+ Defines the number of queries to send to resolve a server name before giving up. Default value: 3
</td>
</tr>
<tr>
<td valign="top" class="vncell">
- 'resolver_timeoutretry'
+ Retry timeout
</td>
<td class="vtable">
<input name="resolver_timeoutretry" type="text" <?if(isset($pconfig['resolver_timeoutretry'])) echo "value=\"{$pconfig['resolver_timeoutretry']}\"";?> size="50"/><br/>
- Email address to be used as the sender of the emails.
+ Time between two DNS queries, when no response have been received. Default value: 1s
</td>
</tr>
<tr>
<td valign="top" class="vncell">
- 'resolver_holdvalid'
+ Interval
</td>
<td class="vtable">
<input name="resolver_holdvalid" type="text" <?if(isset($pconfig['resolver_holdvalid'])) echo "value=\"{$pconfig['resolver_holdvalid']}\"";?> size="50"/><br/>
- Email address to be used as the sender of the emails.
+ Interval between two successive name resolution when the last answer was valid. Default value: 10s
</td>
</tr>
<tr><td>&nbsp;</td></tr>
@@ -612,13 +612,22 @@ Minimum and default value is: 1024, bigger values might increase CPU usage.<br/>
</div>
</table>
+<?php if(file_exists("/var/etc/haproxy_test/haproxy.cfg")): ?>
+ <div id="testconfiguration" style="display:none; border-style:dashed; padding: 8px;">
+ <b><i>/var/etc/haproxy_test/haproxy.cfg file contents:</i></b>
+ <?php
+ echo "<pre>" . trim(file_get_contents("/var/etc/haproxy_test/haproxy.cfg")) . "</pre>";
+ ?>
+ </div>
+ <div id="showtestconfiguration">
+ <a onClick="new Effect.Fade('showtestconfiguration'); new Effect.Appear('testconfiguration'); setTimeout('scroll_after_fade();', 250); return false;" href="#">Show</a> automatically generated test configuration.
+ </div>
+<?php endif; ?>
<?php if(file_exists("/var/etc/haproxy/haproxy.cfg")): ?>
<div id="configuration" style="display:none; border-style:dashed; padding: 8px;">
- <b><i>/var/etc/haproxy.cfg file contents:</i></b>
+ <b><i>/var/etc/haproxy/haproxy.cfg file contents:</i></b>
<?php
- if(file_exists("/var/etc/haproxy/haproxy.cfg")) {
- echo "<pre>" . trim(file_get_contents("/var/etc/haproxy/haproxy.cfg")) . "</pre>";
- }
+ echo "<pre>" . trim(file_get_contents("/var/etc/haproxy/haproxy.cfg")) . "</pre>";
?>
</div>
<div id="showconfiguration">
diff --git a/config/haproxy-devel/www/haproxy_listeners_edit.php b/config/haproxy-devel/www/haproxy_listeners_edit.php
index 8e6c1c3d..f26341b2 100644
--- a/config/haproxy-devel/www/haproxy_listeners_edit.php
+++ b/config/haproxy-devel/www/haproxy_listeners_edit.php
@@ -532,8 +532,9 @@ $primaryfrontends = get_haproxy_frontends($excludefrontend);
d = document;
for (i = 0; i < 99; i++) {
el = d.getElementById("table_acls" + "expression" + i);
+ row_v = d.getElementById("tr_view_" + i);
row_e = d.getElementById("tr_edit_" + i);
- row_v = d.getElementById("tr_viewdetail_" + i);
+ row_vd = d.getElementById("tr_viewdetail_" + i);
if (!el || !row_e)
continue;
for (j = 0; j < count; j++) {
@@ -543,10 +544,17 @@ $primaryfrontends = get_haproxy_frontends($excludefrontend);
if (row_v) {
Effect.Fade(row_v,{ duration: 1.0 });
}
+ if (row_vd) {
+ Effect.Fade(row_vd,{ duration: 1.0 });
+ }
} else {
- Effect.Appear(row_e,{ duration: 1.0 });
- if (row_v) {
- Effect.Appear(row_v,{ duration: 1.0 });
+ if (!row_v || (row_v && row_v.style.display == "none")) {
+ // only make the edit row appear if the view row is not still on the screen.
+ // (when switching frontend types)
+ Effect.Appear(row_e,{ duration: 1.0 });
+ }
+ if (row_vd) {
+ Effect.Appear(row_vd,{ duration: 1.0 });
}
}
}
diff --git a/config/haproxy-devel/www/haproxy_pool_edit.php b/config/haproxy-devel/www/haproxy_pool_edit.php
index 2b4787f3..54d9031f 100644
--- a/config/haproxy-devel/www/haproxy_pool_edit.php
+++ b/config/haproxy-devel/www/haproxy_pool_edit.php
@@ -491,7 +491,6 @@ foreach($simplefields as $field){
?>
<style type="text/css">
- .tableA_servers_details_visible{display:none;}
.haproxy_stats_visible{display:none;}
.haproxy_check_enabled{display:none;}
.haproxy_check_http{display:none;}
@@ -543,7 +542,12 @@ foreach($simplefields as $field){
function updatevisibility()
{
d = document;
- setCSSdisplay(".tableA_servers_details_visible", server_advanced_options_visible.checked);
+ // IE needs components found into javascript variables
+ stats_enabled = d.getElementById("stats_enabled");
+ persist_cookie_enabled = d.getElementById("persist_cookie_enabled");
+ agent_check = d.getElementById("agent_check");
+ sticky_type_description = d.getElementById("sticky_type_description");
+
setCSSdisplay(".haproxy_stats_visible", stats_enabled.checked);
setCSSdisplay(".haproxy_cookie_visible", persist_cookie_enabled.checked);
@@ -611,7 +615,7 @@ foreach($simplefields as $field){
</td>
</tr>
<tr align="left">
- <td class="vncell" colspan="3"><strong>Server list</strong><input id="server_advanced_options_visible" name="server_advanced_options_visible" type='checkbox' onclick="updatevisibility();">Show advanced options(servers need to first be saved to configure these settings)</input>
+ <td class="vncell" colspan="3"><strong>Server list</strong>
<span style="float:right;">
Toggle serverlist help. <a onclick="toggleCSSdisplay('.haproxy_help_serverlist');" title="<?php echo gettext("Help"); ?>"><img style="vertical-align:middle" src="/themes/<?php echo $g['theme']; ?>/images/icons/icon_help.gif" border="0" alt="help" /></a>
</span>
@@ -893,7 +897,8 @@ foreach($simplefields as $field){
<?
echo_html_select("httpcheck_method",$a_httpcheck_method,$pconfig['httpcheck_method']);
?>
- <br/>OPTIONS is the method usually best to perform server checks, HEAD and GET can also be used
+ <br/>OPTIONS is the method usually best to perform server checks, HEAD and GET can also be used.
+ If the server gets marked as down in the stats page then changing this to GET usually has the biggest chance of working, but might cause more processing overhead on the websever and is less easy to filter out of its logs.
</td>
</tr>
<tr align="left" class="haproxy_check_http">
diff --git a/pkg_config.10.xml b/pkg_config.10.xml
index 2a87a220..b25e68c9 100644
--- a/pkg_config.10.xml
+++ b/pkg_config.10.xml
@@ -172,7 +172,7 @@
</descr>
<website>http://haproxy.1wt.eu/</website>
<category>Services</category>
- <version>0.34</version>
+ <version>0.35</version>
<status>RELEASE</status>
<required_version>2.2</required_version>
<config_file>https://packages.pfsense.org/packages/config/haproxy-devel/haproxy.xml</config_file>
diff --git a/pkg_config.8.xml b/pkg_config.8.xml
index 158cb027..743ade9c 100644
--- a/pkg_config.8.xml
+++ b/pkg_config.8.xml
@@ -177,7 +177,7 @@
Supports ACLs for smart backend switching.]]></descr>
<website>http://haproxy.1wt.eu/</website>
<category>Services</category>
- <version>1.5.3 pkg v 0.33</version>
+ <version>1.5.3 pkg v 0.35</version>
<status>Release</status>
<required_version>2.1</required_version>
<config_file>https://packages.pfsense.org/packages/config/haproxy-devel/haproxy.xml</config_file>
diff --git a/pkg_config.8.xml.amd64 b/pkg_config.8.xml.amd64
index 8c7a21ee..851ee03e 100644
--- a/pkg_config.8.xml.amd64
+++ b/pkg_config.8.xml.amd64
@@ -177,7 +177,7 @@
Supports ACLs for smart backend switching.]]></descr>
<website>http://haproxy.1wt.eu/</website>
<category>Services</category>
- <version>1.5.3 pkg v 0.33</version>
+ <version>1.5.3 pkg v 0.35</version>
<status>Release</status>
<required_version>2.1</required_version>
<config_file>https://packages.pfsense.org/packages/config/haproxy-devel/haproxy.xml</config_file>