aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBBcan177 <bbcan177@gmail.com>2014-12-07 18:30:22 -0500
committerBBcan177 <bbcan177@gmail.com>2014-12-07 18:30:22 -0500
commita6ec0dd240d2c5df10e121cff0550b9c326f70eb (patch)
tree16ad1ad46cad7b181914392f9b618f02fb1b1627
parentf51fcf2745bbff493b026d00354642b2fcb562bb (diff)
parentde77645ca39ecd6b86bea62617ebf9081c07aea1 (diff)
downloadpfsense-packages-a6ec0dd240d2c5df10e121cff0550b9c326f70eb.tar.gz
pfsense-packages-a6ec0dd240d2c5df10e121cff0550b9c326f70eb.tar.bz2
pfsense-packages-a6ec0dd240d2c5df10e121cff0550b9c326f70eb.zip
Merge branch 'master' of https://github.com/pfsense/pfsense-packages into pfBlockerNG_Beta_0.99
-rw-r--r--config/imspector/imspector.inc5
-rwxr-xr-xconfig/openvpn-client-export/openvpn-client-export.inc7
-rwxr-xr-xconfig/openvpn-client-export/openvpn-client-export.xml4
-rw-r--r--config/varnish3/varnish.inc139
-rw-r--r--config/varnish3/varnish_backends.xml5
-rw-r--r--config/varnish3/varnish_custom_vcl.xml5
-rw-r--r--config/varnish3/varnish_lb_directors.xml16
-rw-r--r--config/varnish3/varnish_settings.xml5
-rw-r--r--config/varnish3/varnish_sync.xml1
-rw-r--r--config/varnish3/varnish_view_config.php9
-rw-r--r--config/varnish3/varnishstat.php47
-rw-r--r--pkg_config.10.xml42
-rw-r--r--pkg_config.8.xml22
-rw-r--r--pkg_config.8.xml.amd6422
14 files changed, 190 insertions, 139 deletions
diff --git a/config/imspector/imspector.inc b/config/imspector/imspector.inc
index 2d672e87..89fbda2b 100644
--- a/config/imspector/imspector.inc
+++ b/config/imspector/imspector.inc
@@ -35,9 +35,8 @@
require_once("service-utils.inc");
/* IMSpector */
-
define('IMSPECTOR_RCFILE', '/usr/local/etc/rc.d/imspector.sh');
- define('IMSPECTOR_ETC', '/usr/local/etc/imspector');
+ define('IMSPECTOR_ETC', "/usr/pbi/imspector-" . php_uname("m") . "/local/etc/imspector");
define('IMSPECTOR_CONFIG', IMSPECTOR_ETC . '/imspector.conf');
function imspector_warn ($msg) { syslog(LOG_WARNING, "imspector: {$msg}"); }
@@ -543,4 +542,4 @@ function imspector_do_xmlrpc_sync($sync_to_ip, $password) {
}
}
-?>
+?> \ No newline at end of file
diff --git a/config/openvpn-client-export/openvpn-client-export.inc b/config/openvpn-client-export/openvpn-client-export.inc
index 44604a90..f635bbd0 100755
--- a/config/openvpn-client-export/openvpn-client-export.inc
+++ b/config/openvpn-client-export/openvpn-client-export.inc
@@ -39,12 +39,13 @@ require_once("util.inc");
require_once("pfsense-utils.inc");
global $current_openvpn_version, $current_openvpn_version_rev;
-$current_openvpn_version = "2.3.5";
+$current_openvpn_version = "2.3.6";
$current_openvpn_version_rev = "01";
function openvpn_client_export_install() {
+ global $current_openvpn_version;
conf_mount_rw();
- $tarpath = "/usr/local/pkg/openvpn-client-export.tgz";
+ $tarpath = "/usr/local/pkg/openvpn-client-export-{$current_openvpn_version}.tgz";
$phpfile = "vpn_openvpn_export.php";
$ovpndir = "/usr/local/share/openvpn";
$workdir = "{$ovpndir}/client-export";
@@ -57,6 +58,7 @@ function openvpn_client_export_install() {
}
function openvpn_client_export_deinstall() {
+ global $current_openvpn_version;
conf_mount_rw();
$phpfile = "vpn_openvpn_export.php";
$phpfile2 = "vpn_openvpn_export_shared.php";
@@ -65,6 +67,7 @@ function openvpn_client_export_deinstall() {
unlink_if_exists("/usr/local/www/{$phpfile}");
unlink_if_exists("/usr/local/www/{$phpfile2}");
+ unlink_if_exists("/usr/local/pkg/openvpn-client-export-{$current_openvpn_version}.tgz");
exec("/bin/rm -r {$workdir}");
conf_mount_ro();
}
diff --git a/config/openvpn-client-export/openvpn-client-export.xml b/config/openvpn-client-export/openvpn-client-export.xml
index f96336b3..15986428 100755
--- a/config/openvpn-client-export/openvpn-client-export.xml
+++ b/config/openvpn-client-export/openvpn-client-export.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<packagegui>
<name>OpenVPN Client Export</name>
- <version>1.2.14</version>
+ <version>1.2.15</version>
<title>OpenVPN Client Export</title>
<include_file>/usr/local/pkg/openvpn-client-export.inc</include_file>
<backup_file></backup_file>
@@ -27,7 +27,7 @@
<additional_files_needed>
<prefix>/usr/local/pkg/</prefix>
<chmod>077</chmod>
- <item>https://files.pfsense.org/packages/openvpn-client-export/openvpn-client-export.tgz</item>
+ <item>https://files.pfsense.org/packages/openvpn-client-export/openvpn-client-export-2.3.6.tgz</item>
</additional_files_needed>
<additional_files_needed>
<prefix>/usr/local/www/</prefix>
diff --git a/config/varnish3/varnish.inc b/config/varnish3/varnish.inc
index bca02203..50b37990 100644
--- a/config/varnish3/varnish.inc
+++ b/config/varnish3/varnish.inc
@@ -36,14 +36,14 @@ $shortcut_section = "varnish";
$pfs_version = substr(trim(file_get_contents("/etc/version")),0,3);
if (is_dir('/usr/pbi/varnish-' . php_uname("m"))) {
- if ($pfs_version == 2.2)
- define('VARNISH_LOCALBASE', '/usr/pbi/varnish-' . php_uname("m")."/local");
- else
define('VARNISH_LOCALBASE', '/usr/pbi/varnish-' . php_uname("m"));
} else {
define('VARNISH_LOCALBASE','/usr/local');
}
+define('VARNISH_DIRTYPATH',"{$g['varrun_path']}/varnish.conf.dirty");
+define('VARNISH_CONFFILE','/var/etc/default.vcl');
+
function varnish_settings_post_validate($post, &$input_errors) {
if( !is_numeric($post['storagesize']))
$input_errors[] = "A valid number is required for the field 'Storage size'";
@@ -113,6 +113,17 @@ function varnish_backends_post_validate($post, &$input_errors) {
function varnish_install() {
create_varnish_rcd_file();
+
+ if (file_exists(VARNISH_LOCALBASE . '/local/lib/varnish/libvarnish.so')) {
+ @symlink(VARNISH_LOCALBASE . '/local/lib/varnish/libvarnish.so',
+ VARNISH_LOCALBASE . '/local/lib/libvarnish.so');
+ @symlink(VARNISH_LOCALBASE . '/local/lib/varnish/libvarnishcompat.so',
+ VARNISH_LOCALBASE . '/local/lib/libvarnishcompat.so');
+ @symlink(VARNISH_LOCALBASE . '/local/lib/varnish/libvcl.so',
+ VARNISH_LOCALBASE . '/local/lib/libvcl.so');
+ @symlink(VARNISH_LOCALBASE . '/local/lib/varnish/libvgz.so',
+ VARNISH_LOCALBASE . '/local/lib/libvgz.so');
+ }
}
function varnish_deinstall() {
@@ -122,12 +133,49 @@ function varnish_deinstall() {
function text_area_decode($text){
return preg_replace('/\r\n/', "\n",base64_decode($text));
}
-function varnish_start() {
+
+function varnish_check_config(){
+ global $savemsg,$config;
+
+ if (!isset($config['installedpackages']['varnishsettings']['config'][0]['enablevarnish']))
+ return;
+
+ $path = '/usr/bin/env PATH=' . VARNISH_LOCALBASE . '/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin';
+ exec($path . " " . VARNISH_LOCALBASE."/bin/varnishd -C -f ".VARNISH_CONFFILE." 2>&1",$output,$return);
+ if ($return == 0){
+ if (isset($_REQUEST['apply'])){
+ varnish_start(true);
+ return;
+ }
+
+ if (file_exists(VARNISH_DIRTYPATH))
+ $savemsg="Varnish configuration has been changed.<br>You must apply in order to take effect.<br>";
+ }
+ else{
+ $savemsg.= implode("<br>",$output);
+ $savemsg.= "<br>Daemon will not be restarted.";
+ return 1;
+ }
+ return 0;
+}
+
+
+function varnish_start($force_start=false) {
global $g, $config;
+
+ if ($force_start){
+ mwexec("/usr/local/etc/rc.d/varnish.sh");
+ unlink_if_exists(VARNISH_DIRTYPATH);
+ return;
+ }
+
if ($config['installedpackages']['varnishsettings']['config'][0]['enablevarnish']){
exec("chmod +x /usr/local/etc/rc.d/varnish.sh");
- mwexec("/usr/local/etc/rc.d/varnish.sh");}
- else{
+ if (varnish_check_config() == 0 || $force_start){
+ unlink_if_exists(VARNISH_DIRTYPATH);
+ mwexec("/usr/local/etc/rc.d/varnish.sh");
+ }
+ }else{
exec("chmod -x /usr/local/etc/rc.d/varnish.sh");
mwexec("/usr/bin/killall varnishd");}
}
@@ -165,6 +213,13 @@ function varnish_get_url_mappings_txt() {
$urlmappings .= "if (req.http.host $fieldtype ".'"'.$url['directorurl'].'"'." && req.url $fieldtype ".'"^'.$url['directorurl2'].'") {'."\n";
$urlbackend = "\t\t\tset req.backend = ".$url['directorname'].";";
+ // check force ssl option
+ if ($url['forcessl']){
+ $urlmappings .="\t\t#Force ssl for this host/director\n";
+ $urlmappings .="\t\tif((req.http.X-Forwarded-Proto !~ \"(?i)https\" ) && !(client.ip ~ SslOffloadServers)){\n";
+ $urlmappings .="\t\t\tset req.http.x-redir-url = \"https://\" + req.http.host + req.url;\n";
+ $urlmappings .="\t\t\terror 750 req.http.x-redir-url;\n\t\t\t}\n";
+ }
// check rewrite options
if ($url['rewritehost'])
$urlmappings .= "\t\t\tset req.http.host = regsub(req.http.host, ".'"'.$url['directorurl'].'",'.'"'.$url['rewritehost'].'")'.";\n";
@@ -254,6 +309,8 @@ function create_varnish_rcd_file() {
}
}
$fd = fopen("/usr/local/etc/rc.d/varnish.sh", "w");
+ $conf_file=VARNISH_CONFFILE;
+ $bin_path=VARNISH_LOCALBASE . '/bin';
$rc_file = <<<EOF
#!/bin/sh
mkdir -p /var/varnish
@@ -264,8 +321,7 @@ sysctl kern.ipc.somaxconn=16384
sysctl kern.maxfiles=131072
sysctl kern.maxfilesperproc=104856
sysctl kern.threads.max_threads_per_proc=4096
-/usr/bin/env \
-PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
+export PATH={$bin_path}:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
/usr/local/bin/php -q -d auto_prepend_file=config.inc <<ENDOFF
<?php
require_once("globals.inc");
@@ -273,14 +329,14 @@ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
require_once("pkg-utils.inc");
require_once("varnish.inc");
sync_package_varnish();
- #varnish_start();
+ unlink_if_exists(VARNISH_DIRTYPATH);
?>
ENDOFF
/usr/local/sbin/varnishd \
{$listeningport} \
- -f /var/etc/default.vcl \
+ -f {$conf_file} \
{$storage_type} \
-w {$minworkers},{$maxworkers},{$timeoutworkers} \
{$advancedstartup}
@@ -409,6 +465,12 @@ EOFA;
function sync_package_varnish() {
global $config, $g;
+
+ if (isset($_POST["apply"])){
+ varnish_start();
+ unlink_if_exists(VARNISH_DIRTYPATH);
+ return;
+ }
if (is_array($config['installedpackages']['varnishcustomvcl']['config'])) {
foreach($config['installedpackages']['varnishcustomvcl']['config'] as $vcl) {
if ($vcl['vcl_recv_early'])
@@ -425,11 +487,23 @@ function sync_package_varnish() {
$vcl_pipe_late = text_area_decode($vcl['vcl_pipe_late']);
}
}
- $vcl_recv_set_basic='#BASIC VCL RULES SETTING'."\n";
- $vcl_recv_action_basic='#BASIC VCL RULES ACTIONS'."\n";
- #$plataform=posix_uname();
- if (is_array($config['installedpackages']['varnishsettings']['config']))
- foreach($config['installedpackages']['varnishsettings']['config'] as $vcl) {
+
+ $vcl_recv_set_basic='#BASIC VCL RULES SETTING'."\n";
+ $vcl_recv_action_basic='#BASIC VCL RULES ACTIONS'."\n";
+ #$plataform=posix_uname();
+ if (is_array($config['installedpackages']['varnishsettings']['config']))
+ foreach($config['installedpackages']['varnishsettings']['config'] as $vcl) {
+ if ($vcl['ssloffload']){
+ $vcl_acls="acl SslOffloadServers {\n\t\"localhost\";";
+ $sslservers= split (" ",$vcl['ssloffload']);
+ foreach ($sslservers as $sslserver){
+ if (preg_match("/(\S+)\/(d+)/",$sslserver,$sslm))
+ $vcl_acls.="\n\t\"{$sslm[1]}\"/{$sslm[2]};";
+ else
+ $vcl_acls.="\n\t\"{$sslserver}\";";
+ }
+ $vcl_acls.="\n\t}\n";
+ }
if ($vcl['streaming'])
$vcl_fetch_stream="set beresp.do_stream = true;\n";
if ($vcl['fixgzip']) {
@@ -466,15 +540,6 @@ function sync_package_varnish() {
$vcl_recv_set_basic .= "\tset req.http.X-Forwarded-For = req.http.X-Forwarded-For + \",\" + client.ip;\n\n";
break;
case 'create':
- $vcl_acls="acl SslOffloadServers {\n\t\"localhost\";";
- $sslservers= split (" ",$vcl['ssloffload']);
- foreach ($sslservers as $sslserver){
- if (preg_match("/(\S+)\/(d+)/",$sslserver,$sslm))
- $vcl_acls.="\n\t\"{$sslm[1]}\"/{$sslm[2]};";
- else
- $vcl_acls.="\n\t\"{$sslserver}\";";
- }
- $vcl_acls.="}\n";
$vcl_recv_set_basic .= "\tif (req.http.X-Forwarded-For && client.ip ~ SslOffloadServers){\n\t\t";
$vcl_recv_set_basic .= "set req.http.X-Forwarded-Varnish = req.http.X-Forwarded-For;\n\t}";
$vcl_recv_set_basic .= "else{\n\t\tset req.http.X-Forwarded-Varnish = client.ip;\n\n\t}";
@@ -574,13 +639,19 @@ $varnish_config_file = <<<EOF
# Varnish configuration file
# Automatically generated by the pfSense package system
-# This file is located in /var/etc/default.vcl
+# This file is located in {$conf_file}
sub vcl_error {
- if (obj.status == 503 && req.restarts < {$vcl_restarts}) {
- return(restart);
+ if (obj.status == 503 && req.restarts < {$vcl_restarts}) {
+ return(restart);
}
+ if (obj.status == 750) {
+ set obj.http.Location = obj.response;
+ set obj.status = 301;
+ return(deliver);
+ }
+
set obj.http.Content-Type = "text/html; charset=utf-8";
synthetic {"<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
@@ -668,20 +739,22 @@ sub vcl_fini {
}
EOF;
- file_put_contents("/var/etc/default.vcl",$varnish_config_file,LOCK_EX);
- $cc_file="/usr/local/bin/cc";
+ file_put_contents(VARNISH_CONFFILE,$varnish_config_file,LOCK_EX);
+ touch(VARNISH_DIRTYPATH);
+ varnish_sync_on_changes();
+
+ $cc_file=VARNISH_LOCALBASE."/bin/cc";
foreach (glob(VARNISH_LOCALBASE."/bin/gcc*") as $bin_file) {
+ if (strpos($bin_file, '.pbiopt') != FALSE)
+ continue;
$gcc_file=$bin_file;
}
if (!file_exists($cc_file) && file_exists($gcc_file)){
symlink($gcc_file,$cc_file);
}
- $fd = fopen("/var/etc/default.vcl", "w");
- fwrite($fd, $varnish_config_file);
- fclose($fd);
+ create_varnish_rcd_file();
- varnish_sync_on_changes();
}
/* Uses XMLRPC to synchronize the changes to a remote node */
diff --git a/config/varnish3/varnish_backends.xml b/config/varnish3/varnish_backends.xml
index dd93eba5..95248cb9 100644
--- a/config/varnish3/varnish_backends.xml
+++ b/config/varnish3/varnish_backends.xml
@@ -293,16 +293,13 @@
varnish_install();
</custom_php_install_command>
<custom_php_command_before_form>
+ varnish_check_config();
</custom_php_command_before_form>
<custom_delete_php_command>
sync_package_varnish();
- create_varnish_rcd_file();
- varnish_start();
</custom_delete_php_command>
<custom_php_resync_config_command>
sync_package_varnish();
- create_varnish_rcd_file();
- varnish_start();
</custom_php_resync_config_command>
<custom_php_validation_command>
varnish_backends_post_validate($_POST, $input_errors);
diff --git a/config/varnish3/varnish_custom_vcl.xml b/config/varnish3/varnish_custom_vcl.xml
index 7c940f40..4950c6ed 100644
--- a/config/varnish3/varnish_custom_vcl.xml
+++ b/config/varnish3/varnish_custom_vcl.xml
@@ -169,11 +169,12 @@
<encoding>base64</encoding>
</field>
</fields>
+ <custom_php_command_before_form>
+ varnish_check_config();
+ </custom_php_command_before_form>
<custom_php_validation_command>
</custom_php_validation_command>
<custom_php_resync_config_command>
sync_package_varnish();
- create_varnish_rcd_file();
- varnish_start();
</custom_php_resync_config_command>
</packagegui> \ No newline at end of file
diff --git a/config/varnish3/varnish_lb_directors.xml b/config/varnish3/varnish_lb_directors.xml
index e3cd8c04..c8868ec4 100644
--- a/config/varnish3/varnish_lb_directors.xml
+++ b/config/varnish3/varnish_lb_directors.xml
@@ -130,6 +130,10 @@
<fieldname>grace</fieldname>
</columnitem>
<columnitem>
+ <fielddescr>SSL</fielddescr>
+ <fieldname>forcessl</fieldname>
+ </columnitem>
+ <columnitem>
<fielddescr>Failover</fielddescr>
<fieldname>failover</fieldname>
</columnitem>
@@ -197,6 +201,13 @@
<type>input</type>
<size>5</size>
</field>
+ <field>
+ <fielddescr>Force SSL</fielddescr>
+ <fieldname>forcessl</fieldname>
+ <description><![CDATA[Redirect to ssl if request does not came from ssl offload servers.]]></description>
+ <type>checkbox</type>
+ <size>5</size>
+ </field>
<field>
<fielddescr>Additions options</fielddescr>
<fieldname>customapping</fieldname>
@@ -261,16 +272,13 @@
</field>
</fields>
<custom_php_command_before_form>
+ varnish_check_config();
</custom_php_command_before_form>
<custom_delete_php_command>
sync_package_varnish();
- create_varnish_rcd_file();
- varnish_start();
</custom_delete_php_command>
<custom_php_resync_config_command>
sync_package_varnish();
- create_varnish_rcd_file();
- varnish_start();
</custom_php_resync_config_command>
<custom_php_validation_command>
varnish_lb_directors_post_validate($_POST, $input_errors);
diff --git a/config/varnish3/varnish_settings.xml b/config/varnish3/varnish_settings.xml
index 99e29663..accfaae8 100644
--- a/config/varnish3/varnish_settings.xml
+++ b/config/varnish3/varnish_settings.xml
@@ -283,10 +283,13 @@
<encoding>base64</encoding>
</field>
</fields>
+ <custom_php_command_before_form>
+ varnish_check_config();
+ </custom_php_command_before_form>
+
<custom_php_resync_config_command>
sync_package_varnish();
create_varnish_rcd_file();
- varnish_start();
</custom_php_resync_config_command>
<custom_php_validation_command>
varnish_settings_post_validate($_POST, $input_errors);
diff --git a/config/varnish3/varnish_sync.xml b/config/varnish3/varnish_sync.xml
index eb908afe..c5b4b69c 100644
--- a/config/varnish3/varnish_sync.xml
+++ b/config/varnish3/varnish_sync.xml
@@ -136,5 +136,6 @@
</custom_php_resync_config_command>
<custom_php_command_before_form>
unset($_POST['temp']);
+ varnish_check_config();
</custom_php_command_before_form>
</packagegui> \ No newline at end of file
diff --git a/config/varnish3/varnish_view_config.php b/config/varnish3/varnish_view_config.php
index b02e5c88..30765756 100644
--- a/config/varnish3/varnish_view_config.php
+++ b/config/varnish3/varnish_view_config.php
@@ -28,7 +28,7 @@
*/
require("guiconfig.inc");
-
+require("varnish.inc");
$pf_version=substr(trim(file_get_contents("/etc/version")),0,3);
if ($pf_version < 2.0)
$one_two = true;
@@ -44,7 +44,7 @@ include("head.inc");
<p class="pgtitle"><?=$pgtitle?></font></p>
<?php endif; ?>
-<?php if ($savemsg) print_info_box($savemsg); ?>
+<?php varnish_check_config();if ($savemsg) print_info_box($savemsg); ?>
<form action="varnishstat_view_config.php" method="post">
@@ -71,8 +71,9 @@ include("head.inc");
<td class="tabcont" >
<textarea id="varnishlogs" rows="50" cols="100%">
<?php
- $config_file = file_get_contents("/var/etc/default.vcl");
- echo $config_file;
+ $config_file = file("/var/etc/default.vcl");
+ foreach ($config_file as $l => $v)
+ echo ($l+1)." - {$v}";
?>
</textarea>
</td>
diff --git a/config/varnish3/varnishstat.php b/config/varnish3/varnishstat.php
index 9e4e2f3d..aa6827a8 100644
--- a/config/varnish3/varnishstat.php
+++ b/config/varnish3/varnishstat.php
@@ -1,8 +1,9 @@
<?php
/*
- varnishstat_view_logs.php
+ varnishstat.php
part of pfSense (https://www.pfsense.org/)
Copyright (C) 2006 Scott Ullrich <sullrich@gmail.com>
+ Copyright (C) 2014 Marcello Coutinho
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -28,11 +29,45 @@
*/
require("guiconfig.inc");
-
+require("varnish.inc");
+function open_table(){
+ echo "<table style=\"padding-top:0px; padding-bottom:0px; padding-left:0px; padding-right:0px\" width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
+ echo" <tr>";
+}
+function close_table(){
+ echo" </tr>";
+ echo"</table>";
+ echo "<br>";
+}
if($_REQUEST['getactivity']) {
- $varnishstatlogs = `varnishstat -1`;
+ //$varnishstatlogs = `varnishstat -1`;
+ $backends=exec("varnishstat -1",$debug);
echo "<h2>VarnishSTAT Server logs as of " . date("D M j G:i:s T Y") . "</h2>";
- echo $varnishstatlogs;
+ open_table();
+ print "<td class=\"vncellt\" width=30%><strong>Description</strong></td>";
+ print "<td class=\"vncellt\" width=15%><strong>Count</strong></td>";
+ print "<td class=\"vncellt\" width=15%><strong></strong></td>";
+ print "<td width=20%></td><td width=20%></td></tr>";
+ foreach ($debug as $line){
+ if (!preg_match("/^VBE/",$line,$lm) &&
+ preg_match("/(\S+)\s+(\S+)\s+(\S+)\s+(.*)/",$line,$lm))
+ $varnish_stats[]=$lm;
+ }
+ unset($debug);
+ if (is_array($varnish_stats)){
+ foreach ($varnish_stats as $v){
+ print "<td class=\"listlr\"> $v[4] ($v[1])</td>";
+ print "<td class=\"listlr\" align=\"Right\">". @number_format($v[2]) ."</td>";
+ print "<td class=\"listlr\" align=\"Right\">$v[3]</td>";
+ print "<td>&nbsp;</td><td>&nbsp;</td></tr>";
+ }
+ }
+ else{
+ print "<td class=\"listlr\">No traffic</td><td class=\"listlr\"></td><td class=\"listlr\"></td></tr>";
+ }
+
+close_table();
+ //echo $varnishstatlogs;
exit;
}
@@ -70,7 +105,7 @@ include("head.inc");
<p class="pgtitle"><?=$pgtitle?></font></p>
<?php endif; ?>
-<?php if ($savemsg) print_info_box($savemsg); ?>
+<?php varnish_check_config();if ($savemsg) print_info_box($savemsg); ?>
<div id="mainlevel">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
@@ -93,7 +128,7 @@ include("head.inc");
<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="tabcont" >
- <form action="varnishstat_view_logs.php" method="post">
+ <form action="varnishstat.php" method="post">
<div id="varnishstatlogs">
<pre>One moment please, loading VarnishSTAT...</pre>
</div>
diff --git a/pkg_config.10.xml b/pkg_config.10.xml
index f9aa1438..81bcd9d3 100644
--- a/pkg_config.10.xml
+++ b/pkg_config.10.xml
@@ -569,15 +569,15 @@
<website>http://varnish-cache.org</website>
<pkginfolink>https://doc.pfsense.org/index.php/Varnish_package</pkginfolink>
<category>Services</category>
- <version>3.0.5_3 pkg v.0.2.1</version>
+ <version>3.0.5_3 pkg v.0.2.4</version>
<status>RC</status>
<required_version>2.2</required_version>
<config_file>https://packages.pfsense.org/packages/config/varnish3/varnish_backends.xml</config_file>
<configurationfile>varnish_backends.xml</configurationfile>
<depends_on_package_pbi>varnish-3.0.5_3-##ARCH##.pbi</depends_on_package_pbi>
<build_pbi>
- <ports_before>lang/gcc</ports_before>
<port>www/varnish</port>
+ <ports_after>lang/gcc</ports_after>
</build_pbi>
<build_options>gcc_UNSET_FORCE=JAVA</build_options>
</package>
@@ -600,22 +600,6 @@
<after_install_info></after_install_info>
</package>
<package>
- <name>phpSysInfo</name>
- <website>http://phpsysinfo.sourceforge.net/</website>
- <descr>PHPSysInfo is a customizable PHP Script that parses /proc, and formats information nicely. It will display information about system facts like Uptime, CPU, Memory, PCI devices, SCSI devices, IDE devices, Network adapters, Disk usage, and more.</descr>
- <category>System</category>
- <version>2.5.4</version>
- <status>Beta</status>
- <required_version>2.2</required_version>
- <depends_on_package_pbi>mbmon-205_6-##ARCH##.pbi</depends_on_package_pbi>
- <build_pbi>
- <port>sysutils/mbmon</port>
- </build_pbi>
- <config_file>https://packages.pfsense.org/packages/config/phpsysinfo/phpsysinfo.xml</config_file>
- <configurationfile>phpsysinfo.xml</configurationfile>
- <noembedded>true</noembedded>
- </package>
- <package>
<name>dns-server</name>
<descr>pfSense version of TinyDNS which features failover host support</descr>
<website>http://cr.yp.to/djbdns.html</website>
@@ -1081,7 +1065,7 @@
<depends_on_package_pbi>zip-3.0_1-##ARCH##.pbi p7zip-9.20.1_2-##ARCH##.pbi</depends_on_package_pbi>
<build_port_path>/usr/ports/archivers/p7zip</build_port_path>
<build_port_path>/usr/ports/archivers/zip</build_port_path>
- <version>1.2.14</version>
+ <version>1.2.15</version>
<status>RELEASE</status>
<required_version>2.2</required_version>
<config_file>https://packages.pfsense.org/packages/config/openvpn-client-export/openvpn-client-export.xml</config_file>
@@ -1237,31 +1221,13 @@
<configurationfile>mailreport.xml</configurationfile>
</package>
<package>
- <name>zebedee</name>
- <descr><![CDATA[Zebedee is a simple program to establish an encrypted, compressed "tunnel" for TCP/IP or UDP data transfer between two systems.<br />
- This allows traffic such as telnet, ftp and X to be protected from snooping as well as potentially gaining performance over low-bandwidth networks from compression.]]>
- </descr>
- <category>Services</category>
- <version>1.2.2</version>
- <status>BETA</status>
- <website>http://www.winton.org.uk/zebedee/</website>
- <maintainer>jorgelustosa@gmail.com marcellocoutinho@gmail.com</maintainer>
- <required_version>2.2</required_version>
- <depends_on_package_pbi>zebedee-2.5.3-##ARCH##.pbi</depends_on_package_pbi>
- <config_file>https://packages.pfsense.org/packages/config/zebedee/zebedee.xml</config_file>
- <configurationfile>zebedee.xml</configurationfile>
- <build_pbi>
- <port>security/zebedee</port>
- </build_pbi>
- </package>
- <package>
<name>Quagga OSPF</name>
<descr>OSPF routing protocol using Quagga -- WARNING! Installs files to the same place as OpenBGPD. Installing both will break things.</descr>
<maintainer>jimp@pfsense.org</maintainer>
<version>0.99.22.3.1_2 v0.6.2</version>
<category>Routing</category>
<status>BETA</status>
- <depends_on_package_pbi>quagga-0.99.22.3.1_2-##ARCH##.pbi</depends_on_package_pbi>
+ <depends_on_package_pbi>quagga-0.99.23.1_2-##ARCH##.pbi</depends_on_package_pbi>
<config_file>https://packages.pfsense.org/packages/config/quagga_ospfd/quagga_ospfd.xml</config_file>
<build_pbi>
<port>net/quagga</port>
diff --git a/pkg_config.8.xml b/pkg_config.8.xml
index 0771244e..0b07a441 100644
--- a/pkg_config.8.xml
+++ b/pkg_config.8.xml
@@ -728,7 +728,7 @@
<website>http://varnish-cache.org</website>
<pkginfolink>https://doc.pfsense.org/index.php/Varnish_package</pkginfolink>
<category>Services</category>
- <version>3.0.4 pkg v.0.2.1</version>
+ <version>3.0.4 pkg v.0.2.4</version>
<status>RC</status>
<required_version>2.0</required_version>
<config_file>https://packages.pfsense.org/packages/config/varnish3/varnish_backends.xml</config_file>
@@ -1377,7 +1377,7 @@
<depends_on_package_pbi>zip-3.0-i386.pbi p7zip-9.20.1-i386.pbi</depends_on_package_pbi>
<build_port_path>/usr/ports/archivers/p7zip</build_port_path>
<build_port_path>/usr/ports/archivers/zip</build_port_path>
- <version>1.2.14</version>
+ <version>1.2.15</version>
<status>RELEASE</status>
<required_version>2.0</required_version>
<config_file>https://packages.pfsense.org/packages/config/openvpn-client-export/openvpn-client-export.xml</config_file>
@@ -1593,24 +1593,6 @@
<configurationfile>mailreport.xml</configurationfile>
</package>
<package>
- <name>zebedee</name>
- <descr><![CDATA[Zebedee is a simple program to establish an encrypted, compressed "tunnel" for TCP/IP or UDP data transfer between two systems.<br />
- This allows traffic such as telnet, ftp and X to be protected from snooping as well as potentially gaining performance over low-bandwidth networks from compression.]]>
- </descr>
- <category>Services</category>
- <version>1.2.2</version>
- <status>BETA</status>
- <website>http://www.winton.org.uk/zebedee/</website>
- <maintainer>jorgelustosa@gmail.com marcellocoutinho@gmail.com</maintainer>
- <required_version>2.0</required_version>
- <depends_on_package_base_url>https://files.pfsense.org/packages/8/All/</depends_on_package_base_url>
- <depends_on_package>zebedee-2.5.3.tbz</depends_on_package>
- <depends_on_package_pbi>zebedee-2.5.3-i386.pbi</depends_on_package_pbi>
- <config_file>https://packages.pfsense.org/packages/config/zebedee/zebedee.xml</config_file>
- <configurationfile>zebedee.xml</configurationfile>
- <build_port_path>/usr/ports/security/zebedee</build_port_path>
- </package>
- <package>
<name>OpenVPN tap Bridging Fix</name>
<descr>Patch to fix OpenVPN tap bridging on 2.0.x. WARNING! Cannot be uninstalled.</descr>
<category>System</category>
diff --git a/pkg_config.8.xml.amd64 b/pkg_config.8.xml.amd64
index 9f008209..b69713af 100644
--- a/pkg_config.8.xml.amd64
+++ b/pkg_config.8.xml.amd64
@@ -715,7 +715,7 @@
<website>http://varnish-cache.org</website>
<pkginfolink>https://doc.pfsense.org/index.php/Varnish_package</pkginfolink>
<category>Services</category>
- <version>3.0.4 pkg v.0.2.1</version>
+ <version>3.0.4 pkg v.0.2.4</version>
<status>RC</status>
<required_version>2.0</required_version>
<config_file>https://packages.pfsense.org/packages/config/varnish3/varnish_backends.xml</config_file>
@@ -1364,7 +1364,7 @@
<depends_on_package_pbi>zip-3.0-amd64.pbi p7zip-9.20.1-amd64.pbi</depends_on_package_pbi>
<build_port_path>/usr/ports/archivers/p7zip</build_port_path>
<build_port_path>/usr/ports/archivers/zip</build_port_path>
- <version>1.2.14</version>
+ <version>1.2.15</version>
<status>RELEASE</status>
<required_version>2.0</required_version>
<config_file>https://packages.pfsense.org/packages/config/openvpn-client-export/openvpn-client-export.xml</config_file>
@@ -1580,24 +1580,6 @@
<configurationfile>mailreport.xml</configurationfile>
</package>
<package>
- <name>zebedee</name>
- <descr><![CDATA[Zebedee is a simple program to establish an encrypted, compressed "tunnel" for TCP/IP or UDP data transfer between two systems.<br />
- This allows traffic such as telnet, ftp and X to be protected from snooping as well as potentially gaining performance over low-bandwidth networks from compression.]]>
- </descr>
- <category>Services</category>
- <version>1.2.2</version>
- <status>BETA</status>
- <website>http://www.winton.org.uk/zebedee/</website>
- <maintainer>jorgelustosa@gmail.com marcellocoutinho@gmail.com</maintainer>
- <required_version>2.0</required_version>
- <depends_on_package_base_url>https://files.pfsense.org/packages/8/All/</depends_on_package_base_url>
- <depends_on_package>zebedee-2.5.3.tbz</depends_on_package>
- <depends_on_package_pbi>zebedee-2.5.3-amd64.pbi</depends_on_package_pbi>
- <config_file>https://packages.pfsense.org/packages/config/zebedee/zebedee.xml</config_file>
- <configurationfile>zebedee.xml</configurationfile>
- <build_port_path>/usr/ports/security/zebedee</build_port_path>
- </package>
- <package>
<name>OpenVPN tap Bridging Fix</name>
<descr>Patch to fix OpenVPN tap bridging on 2.0.x. WARNING! Cannot be uninstalled.</descr>
<category>System</category>