aboutsummaryrefslogtreecommitdiffstats
path: root/config/squid-reverse/squid.inc
diff options
context:
space:
mode:
Diffstat (limited to 'config/squid-reverse/squid.inc')
-rw-r--r--config/squid-reverse/squid.inc29
1 files changed, 15 insertions, 14 deletions
diff --git a/config/squid-reverse/squid.inc b/config/squid-reverse/squid.inc
index 03b60f30..7e6acd3a 100644
--- a/config/squid-reverse/squid.inc
+++ b/config/squid-reverse/squid.inc
@@ -1011,11 +1011,12 @@ function squid_resync_reverse() {
$defs = explode("\r\n", ($contents));
foreach ($defs as $def) {
$cfg = explode(";",($def));
- $conf .= "cache_peer {$cfg[1]} parent {$cfg[2]} 0 proxy-only no-query originserver ";
- if($cfg[3] == 'HTTPS')
- $conf .= "login=PASS ssl sslflags=DONT_VERIFY_PEER front-end-https=auto ";
- $conf .= "name={$cfg[0]}\n";
- }}
+ if (($cfg[0]) != '' && ($cfg[1]) != '' && ($cfg[2]) != ''){
+ $conf .= "cache_peer {$cfg[1]} parent {$cfg[2]} 0 proxy-only no-query originserver ";
+ if($cfg[3] == 'HTTPS')
+ $conf .= "login=PASS ssl sslflags=DONT_VERIFY_PEER front-end-https=auto ";
+ $conf .= "name={$cfg[0]}\n";
+ }}}
//ACLs
if (($settings['reverse_owa'] == 'on') && (!empty($settings['reverse_owa_ip']))) {
@@ -1032,19 +1033,18 @@ function squid_resync_reverse() {
$conf .= "extension_methods RPC_IN_DATA RPC_OUT_DATA\n";
}
-
$contents = base64_decode($settings['revrse_uri']);
if(!empty($contents)) {
$conf .= "# -= TESTING AREA =-\n";
$defs = explode("\r\n", ($contents));
foreach ($defs as $def) {
- if (($cfg[0]) != '' && ($cfg[1]) != '')
- $cfg = explode(";",($def));
+ $cfg = explode(";",($def));
+ if (($cfg[0]) != '' && ($cfg[1]) != ''){
$conf .= "# acl {$cfg[0]} url_regex -i {$settings['reverse_external_fqdn']} {$cfg[1]}.*$\n";
// if($cfg[3] == 'HTTPS')
// $conf .= "login=PASS ssl sslflags=DONT_VERIFY_PEER front-end-https=auto ";
// $conf .= "name={$cfg[0]}\n";
- }}
+ }}}
//ACCESS
@@ -1062,11 +1062,12 @@ $conf .= "# -= TESTING AREA =-\n";
$defs = explode("\r\n", ($contents));
foreach ($defs as $def) {
$cfg = explode(";",($def));
- $conf .= "# cache_peer_access {$cfg[0]} allow {$cfg[1]}\n";
- $conf .= "# cache_peer_access {$cfg[0]} deny all\n";
- $conf .= "# never direct allow {$cfg[1]}\n";
- $conf .= "# http_access allow {$cfg[1]}\n";
- }}
+ if (($cfg[0]) != '' && ($cfg[1]) != ''){
+ $conf .= "# cache_peer_access {$cfg[0]} allow {$cfg[1]}\n";
+ $conf .= "# cache_peer_access {$cfg[0]} deny all\n";
+ $conf .= "# never direct allow {$cfg[1]}\n";
+ $conf .= "# http_access allow {$cfg[1]}\n";
+ }}}
$conf .= "\n";