aboutsummaryrefslogtreecommitdiffstats
path: root/config/squid3/34
diff options
context:
space:
mode:
authordoktornotor <notordoktor@gmail.com>2015-11-08 09:24:20 +0100
committerdoktornotor <notordoktor@gmail.com>2015-11-08 09:24:20 +0100
commit1c239941f483b58d9ad08f5d870e9793bb94feed (patch)
treeec925e858c96fcc194e03c2123a49178906600de /config/squid3/34
parent2d44eb0225d84775fe3dc9ba4c500386aac79ba7 (diff)
downloadpfsense-packages-1c239941f483b58d9ad08f5d870e9793bb94feed.tar.gz
pfsense-packages-1c239941f483b58d9ad08f5d870e9793bb94feed.tar.bz2
pfsense-packages-1c239941f483b58d9ad08f5d870e9793bb94feed.zip
Remove broken dynamic caching patterns
Avast/Symantec have been completely no-op and useless for years since AV updates for those are streamed to clients hundreds time every day. Suspect same story for Avira. The WU refresh_patterns was broken and don't work reliably anyway. People can define their own patterns if needed without maintenance burden for package maintainers.
Diffstat (limited to 'config/squid3/34')
-rwxr-xr-xconfig/squid3/34/squid.inc64
1 files changed, 8 insertions, 56 deletions
diff --git a/config/squid3/34/squid.inc b/config/squid3/34/squid.inc
index 973bbf05..aee85bcd 100755
--- a/config/squid3/34/squid.inc
+++ b/config/squid3/34/squid.inc
@@ -642,6 +642,10 @@ function squid_upgrade_config() {
$settingscache['donotcache'] = base64_encode(implode("\n", explode(",", $settingscache['donotcache'])));
$config['installedpackages']['squidcache']['config'][0]['donotcache'] = $settingscache['donotcache'];
}
+ /* unset broken dynamic caching patterns removed since Squid3 package v0.4.3 */
+ if (!empty($config['installedpackages']['squidcache']['config']['refresh_patterns'])) {
+ unset($config['installedpackages']['squidcache']['config']['refresh_patterns']);
+ }
/* migrate nac settings */
if (!empty($settingsnac['allowed_subnets']) && strstr($settingsnac['allowed_subnets'], ",")) {
@@ -1303,61 +1307,13 @@ function squid_resync_cache() {
if (empty($settings['cache_dynamic_content'])) {
$conf .= 'acl dynamic urlpath_regex cgi-bin \?' . "\n";
$conf .= "cache deny dynamic\n";
- } elseif (preg_match('/youtube/', $settings['refresh_patterns'])) {
-// Broken (Bug #3847) and not working (http://wiki.squid-cache.org/ConfigExamples/DynamicContent/YouTube#Discussion)
-/* $conf .= <<< EOC
-# Break HTTP standard for flash videos. Keep them in cache even if asked not to.
-refresh_pattern -i \.flv$ 10080 90% 999999 ignore-no-cache override-expire ignore-private
-
-# Let the clients favorite video site through with full caching
-acl youtube dstdomain .youtube.com
-cache allow youtube
-
-EOC;
-*/
- }
- if (preg_match('/windows/', $settings['refresh_patterns'])) {
- $conf .= <<< EOC
-
-# Windows Update refresh_pattern
-range_offset_limit -1
-refresh_pattern -i microsoft.com/.*\.(cab|exe|ms[i|u|f]|asf|wm[v|a]|dat|zip) 4320 80% 43200 reload-into-ims
-refresh_pattern -i windowsupdate.com/.*\.(cab|exe|ms[i|u|f]|asf|wm[v|a]|dat|zip) 4320 80% 43200 reload-into-ims
-refresh_pattern -i windows.com/.*\.(cab|exe|ms[i|u|f]|asf|wm[v|a]|dat|zip) 4320 80% 43200 reload-into-ims
-
-EOC;
- }
-
- if (preg_match('/symantec/', $settings['refresh_patterns'])) {
- $conf .= <<< EOC
-
-# Symantec refresh_pattern
-range_offset_limit -1
-refresh_pattern liveupdate.symantecliveupdate.com/.*\.(cab|exe|dll|msi) 10080 100% 43200 reload-into-ims
-refresh_pattern symantecliveupdate.com/.*\.(cab|exe|dll|msi) 10080 100% 43200 reload-into-ims
-
-EOC;
- }
- if (preg_match('/avast/', $settings['refresh_patterns'])) {
- $conf .= <<< EOC
-
-# Avast refresh_pattern
-range_offset_limit -1
-refresh_pattern avast.com/.*\.(vpu|cab|stamp|exe) 10080 100% 43200 reload-into-ims
-
-EOC;
+ } else {
+ if ($settings['custom_refresh_patterns'] != "") {
+ $conf .= sq_text_area_decode($settings['custom_refresh_patterns']) . "\n";
+ }
}
- if (preg_match('/avira/', $settings['refresh_patterns'])) {
- $conf.=<<< EOC
-# Avira refresh_pattern
-range_offset_limit -1
-refresh_pattern personal.avira-update.com/.*\.(cab|exe|dll|msi|gz) 10080 100% 43200 reload-into-ims
-
-EOC;
- }
$refresh_conf = <<< EOC
-
# Add any of your own refresh_pattern entries above these.
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
@@ -1366,10 +1322,6 @@ refresh_pattern . 0 20% 4320
EOC;
- if ($settings['custom_refresh_patterns'] != "") {
- $conf .= sq_text_area_decode($settings['custom_refresh_patterns']) . "\n";
- }
-
$conf .= <<< EOD
cache_mem {$memory_cache_size} MB