Package: squid-deb-proxy
Version: 0.8.9
Severity: normal

Dear Maintainer,

   * What led up to the situation?

I wanted to use a non default port for squid-deb-proxy.
I edited /etc/squid-deb-proxy/squid-deb-proxy.conf
Originally it had a line:

  http_port 8000

I commented that line and added a new one:

  # http_port 8000
  http_port 19302

After restarting squid-deb-proxy, the service was no longer working for any 
hosts. The port wasn't being advertised correctly.

Before the change, I saw:

  $ avahi-browse -kprtf _apt_proxy._tcp | tail -1 | cut -d';' -f6-
  local;chris.local;192.168.1.105;8000;

After the change, I saw:

  $ avahi-browse -kprtf _apt_proxy._tcp | tail -1 | cut -d';' -f6-
  local;chris.local;192.168.1.105;0;

ie. the port was being advertised as 0, not 19302.

I looked into it, to see why this was, and found this in 
/usr/share/squid-deb-proxy/init-common.sh :

  PORT=$(grep http_port /etc/squid-deb-proxy/squid-deb-proxy.conf|cut -d' ' -f2)

That 'grep' is matching both the commented and uncommented lines in the config 
file.

Before my change to the config file:

  $ PORT=$(grep http_port /etc/squid-deb-proxy/squid-deb-proxy.conf|cut -d' ' 
-f2)
  $ echo $PORT
  8000

After my change:

  $ PORT=$(grep http_port /etc/squid-deb-proxy/squid-deb-proxy.conf|cut -d' ' 
-f2)
  $ echo $PORT
  http_port 19302

This is the cause of the problem.

A simple fix would be to do something to ensure that comments in the .conf file 
are ignored:

  PORT=$(grep '^\s*http_port\s' /etc/squid-deb-proxy/squid-deb-proxy.conf|cut 
-d' ' -f2)


-- System Information:
Debian Release: 8.4
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages squid-deb-proxy depends on:
ii  debconf [debconf-2.0]  1.5.56
ii  squid3                 3.4.8-6+deb8u2

Versions of packages squid-deb-proxy recommends:
ii  avahi-utils  0.6.31-5

squid-deb-proxy suggests no packages.

-- Configuration Files:
/etc/squid-deb-proxy/squid-deb-proxy.conf changed [not included]

-- debconf information excluded

Reply via email to