Bug #15410
opencache_object://URL Scheme is removed in Squid-6
0%
Description
Hello fellow pfSense Squid Proxy Users can you please help?
I am so happy 6.6 is part of pfSense 24 however some small changes are made in 6.6
cache_object://URL Scheme is not removed in Squid-6
cache_object://hostname/request@password
Is used to check status inside the pfSense GUI for this package
It has been replaced with
http://hostname/squid-internal-mgr URL-prefix.
Therefore it will now say access denied when checking status
The status page needs to be updated to reflect the new URL scheme
I spoke with Squid user support and they have confirmed the new URL scheme
Ref:
https://wiki.squid-cache.org/Features/CacheManager/CacheObjectScheme
Files
Updated by Jonathan Lee about 1 month ago
this calls /usr/local/sbin/squidclient with the older URI scheme
to access mgr:info
Updated by Jonathan Lee about 1 month ago
@function squid_status() {
if (is_service_running('squid')) {
init_config_arr(array('installedpackages', 'squidcache','config'));
$proxy_ifaces = explode(",", config_get_path('installedpackages/squid/config/0/active_interface', ''));
foreach ($proxy_ifaces as $iface) {
if (get_interface_ip($iface)) {
$ip = get_interface_ip($iface);
$lip = '127.0.0.1';
} else {
$ip = get_interface_ipv6($iface);
$lip = '::1';
}
exec("/usr/local/sbin/squidclient -l " . escapeshellarg($lip) .
" -h " . escapeshellarg($ip) . " mgr:info", $result);
}
} else {
return(gettext('Squid Proxy is not running.'));
}
$i = 0;
$matchbegin = "Squid Object Cache";
foreach ($result as $line) {
if (preg_match("/{$matchbegin}/", $line)) {
$begin = $i;
}
$i++;
}
$output = "";
$i = 0;
foreach ($result as $line) {
if ($i >= $begin) {
$output .= $line . "\n";
}
$i++;
}
return $output;
} @
this is using the old version here with mgr:info
Updated by Jonathan Lee about 1 month ago
squidclient mgr:info
no longer works this should be changed to reflect the new use with
squidclient -h 127.0.0.1 -p 3128 mgr:info shows access denined
@
You do have direct proxy (and thus manager) access via the 192.168.1.1:3128 so this URL should work:
http://192.168.1.1:3128/squid-internal-mgr/menu
.. or substitute the raw-IP for the visible_hostname setting if that hostname actually resolves to that IP.
HTH
Amos@
I think this should be
should be changed to reflect squid-internal-mgr:info
I am going to test
Updated by Jonathan Lee about 1 month ago
Test failed it still says no access
Updated by Jonathan Lee about 1 month ago
Testing
Updated by Jonathan Lee about 1 month ago
I can access the cachemgr.cgi if you are using it within the lightsquid area however.
I will find my issue and post a pull still researching
Updated by Jonathan Lee about 1 month ago
Sorry This is the issue I am researching on how to resolve do to the cache_object change
I just have to find the line of code that references cache_object and replace it with the new URI scheme use