aboutsummaryrefslogtreecommitdiffstats
path: root/config/lightsquid
diff options
context:
space:
mode:
authordoktornotor <notordoktor@gmail.com>2015-10-20 10:41:22 +0200
committerdoktornotor <notordoktor@gmail.com>2015-10-20 10:41:22 +0200
commit722bf12382aea5e49d49c01b61ac7f830fe86c93 (patch)
tree30b2d336de966686c76c26be32ed6cce73763a30 /config/lightsquid
parent7a289c0e10b6c47c4646e04e9bceae8b3f808f49 (diff)
downloadpfsense-packages-722bf12382aea5e49d49c01b61ac7f830fe86c93.tar.gz
pfsense-packages-722bf12382aea5e49d49c01b61ac7f830fe86c93.tar.bz2
pfsense-packages-722bf12382aea5e49d49c01b61ac7f830fe86c93.zip
Remove broken IP detection code and force localhost
Diffstat (limited to 'config/lightsquid')
-rw-r--r--config/lightsquid/sqstat.php21
1 files changed, 1 insertions, 20 deletions
diff --git a/config/lightsquid/sqstat.php b/config/lightsquid/sqstat.php
index 18fa2d25..5d3a0e83 100644
--- a/config/lightsquid/sqstat.php
+++ b/config/lightsquid/sqstat.php
@@ -355,23 +355,14 @@ function sqstat_loadconfig() {
$squidclass->sqstat_version = SQSTAT_VERSION;
- /* Load config from pfSense */
$iface = '127.0.0.1';
+ /* Load config from pfSense and find proxy port */
$iport = 3128;
if (is_array($config['installedpackages']['squid']['config'][0])) {
$squid_settings = $config['installedpackages']['squid']['config'][0];
} else {
$squid_settings = array();
}
-
- // Squid interface IP & port
- $realif = array();
- $iface = ($squid_settings['active_interface'] ? $squid_settings['active_interface'] : 'lan');
- $iface = explode(",", $iface);
- foreach ($iface as $i => $if) {
- $realif[] = sqstat_get_real_interface_address($if);
- $iface = $realif[$i][0] ? $realif[$i][0] : '127.0.0.1';
- }
$iport = $squid_settings['proxy_port'] ? $squid_settings['proxy_port'] : 3128;
$squidclass->squidhost = $iface;
@@ -391,14 +382,4 @@ function sqstat_loadconfig() {
return $squidclass->errno;
}
-function sqstat_get_real_interface_address($iface) {
- global $config;
-
- $iface = convert_friendly_interface_to_real_interface_name($iface);
- $line = trim(shell_exec("ifconfig $iface | grep inet | grep -v inet6"));
- list($dummy, $ip, $dummy2, $netmask) = explode(" ", $line);
-
- return array($ip, long2ip(hexdec($netmask)));
-}
-
?>