Using Squid on Intermittent Connections
Subject:   squid on dial-up
Date:   2003-10-20 17:54:53
From:   jennv
Response to: squid on dial-up

To answer 'how does Squid know where to go', check the paragraph starting:
"The new directive network_interface takes a string parameter, which is the name of the network interface to check."

Also, you've missed how the patch works. All a patched Squid cares about is 'can I connect to a remote site or not?'. If so, it runs in connected mode. If not, in disconnected mode.
A patched Squid does NOT turn the modem on itself, if you want to do that you need to set up dial-on-demand at the OS level, and you DON'T want this patch.

To quote from the article:

"The patch must be able to tell whether or not the connection is up.
If it is connected, it must run as if in standard mode: expiring web pages; replacing stale web pages, if requested; and expiring and removing stale DNS entries.
If disconnected, it must run almost as if in offline mode -- except it must mark old pages and DNS entries as stale, so they can be removed or replaced when Squid is next connected."

If a patched Squid can't reach past your gateway, it (probably) won't trigger a dial-on-demand.

(If this seems nonsensical to you - well, we live in a place where local calls are charged per call. Without having tested it, I assume unpatched Squid will already trigger dial-on-demand if dial-on-demand is set up in the OS; which is useful for people charged per unit time. This patch provides a method of proxying over dialup which is useful for people who are charged per call. Make more sense now?)