HTTP Proxy

Derek Broughton news at pointerstop.ca
Mon Apr 21 15:31:39 UTC 2008


Florian Diesch wrote:

> Derek Broughton <news at pointerstop.ca> wrote:
> 
>> I have a satellite modem, and it's not uncommon for me to have no
>> connection to the Internet (eg, this won't be going out for some time, as
>> we haven't had a network connection for a week).
>>
>> I want an HTTP proxy that is smart enough to return cached pages any time
>> it can't find the Internet, but all the proxies I've tried either need to
>> be manually switched to "offline",
> 
> If it first tries to fetch the page from the net that means you have
> to wait for the DNS timeout on every page when you don't have
> net. IMHO that's close to unusable.

Huh?  That's what it should be doing anyway - and it _is_ unusable, now,
because what I get is a long wait for a DNS timeout, and then _no_ page
rather than the cache page.
> 
>> As a last resort, I could run a cron job that would set the proxy offline
>> if it couldn't get a DNS result, but that's work ...
> 
> Something like
> 
>  if ping -c1 $IP_ADRESS_OF_YOUR_NAMESERVER; then
>    wwwoffle -online
>    wwwoffle -fetch
>  else
>    wwwoffle -offline
>  fi
> 
> would do the job. And wwwoffle will fetch any page you requested
> offline as soon as you have net.

Thanks - I particularly like that -fetch option.  Very kewl.
-- 
derek





More information about the ubuntu-users mailing list