Search squid archive

Re: Strange problem with Monkey HTTP Daemon, Squid 3 and localhost

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 El 06/10/10 01:42, Amos Jeffries escribiÃ:

Thanks by response.
I forgot to say that I use squid in my home, it's for personal use. My unique intention to install Squid in my PC is to speed up my surfing with: cache (Squid), Precatching (squid-prefetch) and block advertising banners (bannerfilter).
On Tue, 05 Oct 2010 16:13:12 +0200, SimÃn<simon@xxxxxxxxxxxx>  wrote:
Hi,
      I have installed Squid 3.1.8 compiled from sources + Squid-Prefetch
+ Bannerfilter (http://phroggy.com/bannerfilter/) + Monkey HTTP Daemon
(http://www.monkey-project.com/) on Ubuntu 10.04 32 bits.
      My squid config is:
ââââââââââââââââââââââââââââââ

     acl manager proto cache_object
     acl localhost src 127.0.0.0/8
     acl localnet src 192.168.1.0/24

     acl to_localhost dst 127.0.0.1
     acl to_router dst 192.168.1.1

     acl Safe_ports port 80

     http_access allow manager localhost
     http_access deny manager

     http_access allow localnet
     http_access allow localhost
Hmm, localnet and localhost unrestricted access.
It's for personal use.

     http_port 3128 transparent

     cache_mem 512 MB
     cache_dir ufs /var/cache/squid 20480 16 256
     coredump_dir /var/cache/squid

     url_rewrite_program /etc/squid/bannerfilter/redirector.pl
     url_rewrite_children 10

     half_closed_clients off
     server_persistent_connections off
     client_persistent_connections off

ââââââââââââââââââââââââââââââ

Monkey HTTP Daemon listen petitions at 127.0.0.1:80
Bannerfilter is configured to serve its replacement files (to replace
the ads) from http://127.0.0.1/bannerfilter/
Well, this works but, and this is the strange, it works even if "Monkey
HTTP Daemon" is closed!! O_O
Are you getting the replacement banners? or the original ones?
Replacement banners. Purpose of bannerfilter script: "This script blocks advertising banners on the Web. If you have a slow Internet connection, it will speed up your surfing, since the banners are not downloaded from the Internet at all. "
Are you sure the URL re-writer is producing valid URLs? I just fixed a bug
where 3.x would not warn when it was dropping invalid URI.
Yes, the browser displays the replacement banners.
And most importantly where is your contract with the website owner(s)
which permits you to alter their hosting service AUP?
This is not the issue, but can't I decide what my browser downloads or not from a website in my PC?
Repeat: I use squid in my home, it's for personal use.
I have cleared the Squid cache with:
ââââââââââââââââââââââââââââââ

     sudo service squid stop
     sudo rm -Rf /var/cache/squid/*
     sudo squid -z
     sudo service squid start

ââââââââââââââââââââââââââââââ
But it still works without webserver!
After, I have reset the PC (disabling "Monkey HTTP Daemon" start) and
Squid still works with Bannerfilter but without webserver!
Moreover, I have modified several HTML files, in directory containing
the HTML and graphics files of Bannerfilter, but Squid shows the old
files!
I don't understand nothing. How can be this possible!?
web browser cache?
No, it was cleared too. It's cleared every time that I close the browser.
You are running "Monkey HTTP Daemon" on your web browser local host?
Yes, everything (squid, webserver, browser, etc...) is in the same PC.
By other hand, I can't access to localhost directly from browser (with
or without "Monkey HTTP Daemon").
Of course. You are using a "transparent" interception proxy. "localhost"
and "127.0.0.1" and "[::1]" in the browser address bar on these setups
means the machine your browser runs on
Ok, but it's the same machine.
They only ever mean the proxy machine when the browser is configured to
pass requests to the proxy. Without performing it's own DNS on the URI
which would resolve them to itself.
I don't understand this at all (sorry, my english isn't very good).

My questions:
1) How can Squid serves objects (images, html pages, etc...) from http://localhost if there isn't any webserver running? 2) Why the browser can't access directly to the webserver (when the webserver is up)? This question isn't very important, it's only curiosity.

Regards.


[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux