aboutsummaryrefslogtreecommitdiffstats
path: root/config/lightsquid
diff options
context:
space:
mode:
authordoktornotor <notordoktor@gmail.com>2015-10-20 11:00:28 +0200
committerdoktornotor <notordoktor@gmail.com>2015-10-20 11:00:28 +0200
commitdb072559dc851c7d85cf78c0b4b449f3262dd7d9 (patch)
tree782797ed59314021cf01e98654510c674c6e2c6d /config/lightsquid
parent722bf12382aea5e49d49c01b61ac7f830fe86c93 (diff)
downloadpfsense-packages-db072559dc851c7d85cf78c0b4b449f3262dd7d9.tar.gz
pfsense-packages-db072559dc851c7d85cf78c0b4b449f3262dd7d9.tar.bz2
pfsense-packages-db072559dc851c7d85cf78c0b4b449f3262dd7d9.zip
No need to check for loopback with transparent proxy
Diffstat (limited to 'config/lightsquid')
-rw-r--r--config/lightsquid/lightsquid.inc12
1 files changed, 8 insertions, 4 deletions
diff --git a/config/lightsquid/lightsquid.inc b/config/lightsquid/lightsquid.inc
index 6bc4df4b..7decc050 100644
--- a/config/lightsquid/lightsquid.inc
+++ b/config/lightsquid/lightsquid.inc
@@ -456,18 +456,22 @@ function lightsquid_validate_input($post, &$input_errors) {
} else {
$ext_cachemanager = "";
}
- if (strpos($ext_cachemanager, $ifmgr) === FALSE) {
+ if (strpos($ext_cachemanager, $ifmgr) === false) {
$input_errors[] = "Please, add '{$ifmgr}' to Squid - Access Control - External Cache-Managers first.";
}
}
- /* SqStat - check that Squid listens on loopback */
+ /* SqStat - check that Squid listens on loopback unless the proxy is set as transparent (which makes it listen on localhost automatically) */
if (is_array($config['installedpackages']['squid']['config'])) {
$active_interfaces = ($config['installedpackages']['squid']['config'][0]['active_interface'] ?: "");
+ $transparent = ($config['installedpackages']['squid']['config'][0]['transparent_proxy'] == "on" ? true : false);
} else {
$active_interfaces = "";
+ $transparent = false;
}
- if (strpos($active_interfaces, "lo0") === FALSE) {
- $input_errors[] = "Please, configure Squid - General - Proxy Interface(s) to include 'loopback' interface.";
+ if (!$transparent) {
+ if (strpos($active_interfaces, "lo0") === false) {
+ $input_errors[] = "Please, configure Squid - General - Proxy Interface(s) to include 'loopback' interface.";
+ }
}
/* 'Skip URL(s)' validation */