Project

General

Profile

Actions

Bug #15410

open

cache_object://URL Scheme is removed in Squid-6

Added by Jonathan Lee 2 months ago. Updated 2 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Squid
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Affected Version:
All
Affected Plus Version:
24.03
Affected Architecture:
All

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

Actions #1

Updated by Jonathan Lee 2 months ago

this is part of status_squid.php

Actions #2

Updated by Jonathan Lee 2 months ago

this calls /usr/local/sbin/squidclient with the older URI scheme
to access mgr:info

Actions #3

Updated by Jonathan Lee 2 months 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

Actions #4

Updated by Jonathan Lee 2 months 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

Actions #5

Updated by Jonathan Lee 2 months ago

Test failed it still says no access

Actions #7

Updated by Jonathan Lee 2 months 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

Actions #8

Updated by Jonathan Lee 2 months 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

Actions

Also available in: Atom PDF