On 4/8/08, christooss <[EMAIL PROTECTED]> wrote:
> Flemming Richter Mikkelsen said:
>
> > I will stick to links and go via my proxy server, to remove the spam:)
> > But I know people have different needs. I think we should not say one 
> > option is the only correct one. I would love to see both links and more 
> > advanced browsers being supported over time.
> >
> >
>
> Can you tell me more about using proxy for this stuff. How to configure one?

I am no expert. I have only configured it once, so this is only how I
did it. I assume there is many that has a much better setup, but this
is working:)

Well, first you need a server with public IP. Then you need to run a
proxy server on it. squid is great proxy server that comes with most
Linux distros.
In the proxy config file, everything is well documented.

Secondly you would need a helper script for the proxy server. This is
because you want to replace urls (e.g urls that contain ad.*, *.ad.*,
*.advert*, advert*) with a url to a blank page (the url can be
file:///spam.html and be a local file on your neo, so that you don't
have to download it) to remove the spam from the page. For this you
can use squidguard.

Configure your proxy to filter flash and advertisement with acl rules:

#  TAG: acl
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8

acl advertise1 url_regex ad\. ads\. advertis pagead /adsnew /adframe
acl advertise3 url_regex tearswep/something/adsenseSide2\.html
acl google-analytics url_regex www\.google\-analytics\.com/urchin\.js
acl annoying2 url_regex static\.ak\.facebook\.com/js/swfobject\.js \.adicate\.
acl microsoft_crap1 dstdom_regex live\.com hotmail \.msn\.com
acl microsoft_crap2 dstdomain http://msn.com

#  TAG: http_access
http_access allow manager localhost
http_access deny manager
# Only allow purge requests from localhost
http_access allow purge localhost
http_access deny purge
# Deny requests to unknown ports
http_access deny !Safe_ports

http_access deny advertise1
http_access deny advertise3
http_access deny google-analytics
http_access deny annoying2
http_access deny microsoft_crap1
http_access deny microsoft_crap2

You need to read everything in /etc/squid.conf and check what else you need.
I am not the best person to ask about this, but I hope it gives you an idea.
You also want to play with the cache sizes, etc.
-- 
Please don't send me Word or PowerPoint attachments. See
http://www.gnu.org/philosophy/no-word-attachments.html

Join the FSF as an Associate Member at:
<URL:http://www.fsf.org/register_form?referrer=5774>

_______________________________________________
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community

Reply via email to