[squid-users] Need help with insert code into html body
Hi everyone, I need you help with squid to insert some code to html body returned to clients, for analytic reasons. I searched and read some related info, most of which is about ICAP and eCAP. I wonder if any of you have the experience or guide on this? Thanks! Best, Ronaldo
Re: [squid-users] Need help with insert code into html body
On Sun, Nov 29, 2009 at 4:45 PM, Ronaldo Zhou wrote: > Hi everyone, > > I need you help with squid to insert some code to html body > returned to clients, for analytic reasons. > > Squid is designed that NO change to original HTTP response body, though you can insert some additional headers. Also eCap is squid-3.1's new feature.
RE: [squid-users] Need help with insert code into html body
> Date: Sun, 29 Nov 2009 19:26:47 +0800 > From: lan.messerschm...@gmail.com > To: ronaldo.z...@gmail.com > CC: squid-users@squid-cache.org > Subject: Re: [squid-users] Need help with insert code into html body > > On Sun, Nov 29, 2009 at 4:45 PM, Ronaldo Zhou wrote: >> Hi everyone, >> >> I need you help with squid to insert some code to html body >> returned to clients, for analytic reasons. >> >> > > Squid is designed that NO change to original HTTP response body, > though you can insert some additional headers. How does compressin work? I thought someone said you could compress results in some squid versions? Also, I've been playing with the ad zapper and it clearly modifies results. There is no reason the modified file can't get the target html and do something with it. > Also eCap is squid-3.1's new feature. _ Windows 7: I wanted simpler, now it's simpler. I'm a rock star. http://www.microsoft.com/Windows/windows-7/default.aspx?h=myidea?ocid=PID24727::T:WLMTAGL:ON:WL:en-US:WWL_WIN_myidea:112009
Re: [squid-users] Need help with insert code into html body
On Sun, Nov 29, 2009 at 8:28 PM, Mike Marchywka wrote: > > How does compressin work? I thought someone said you could compress > results in some squid versions? The official squid doesn't do that compression, it's maybe other organization's release, or with an external module. You could modify the source and implement that, go on, nobody will blame you.
RE: [squid-users] Need help with insert code into html body
[ lol, hotmail seems to insist on non-text email which the squid list sanely rejected I guess the setting is specific to a given machine since I had changed it before] > Subject: Re: [squid-users] Need help with insert code into html body > > On Sun, Nov 29, 2009 at 8:28 PM, Mike Marchywka wrote: > >> >> How does compressin work? I thought someone said you could compress >> results in some squid versions? > > The official squid doesn't do that compression, it's maybe other > organization's release, or with an external module. > You could modify the source and implement that, go on, nobody will blame you. Well, adzapper may be a better example then. Presumably the adzapper logic could get the target url and modify it. Right now it just replaces it with a generated image saying "zapped." Note: while waiting for firefox on windoze to stop doing vm and echo even 1 of my last 50 keystrokes, I retyped this message on a debian machine with no hesitations or swearing required to get it to respond. IT looks like the other machine finally came back but it doesn't matter now. In any case, editing may be a bit bad as I transition to something that doesn't need a supercomputer to type text. Hotmail won't run on my mom's Dell desktop without hanging every few messages either. arrggghh. Windows 7: I wanted simpler, now it's simpler. I'm a rock star. _ Bing brings you maps, menus, and reviews organized in one place. http://www.bing.com/search?q=restaurants&form=MFESRP&publ=WLHMTAG&crea=TEXT_MFESRP_Local_MapsMenu_Resturants_1x1
RE: [squid-users] Need help with insert code into html body
On Sun, 29 Nov 2009 08:14:36 -0500, Mike Marchywka wrote: > [ lol, hotmail seems to insist on non-text email > which the squid list sanely rejected I guess the > setting is specific to a given machine since I had > changed it before] > >> Subject: Re: [squid-users] Need help with insert code into html body >> >> On Sun, Nov 29, 2009 at 8:28 PM, Mike Marchywka >> wrote: >> >>> >>> How does compressin work? I thought someone said you could compress >>> results in some squid versions? >> >> The official squid doesn't do that compression, it's maybe other >> organization's release, or with an external module. >> You could modify the source and implement that, go on, nobody will blame >> you. gzip/deflate is a third-party eCAP plugin. chunked is a transmission-level encryption of the content, not an alteration. * the key thing with both is that the visitor gets what they asked for in its original form. ESI requires website administrator alterations. * the key thing here is that the user gets what they asked for as the website operator designed it to be received. It's not that we can't do content alteration with Squid it's that we developers WON'T add it to the main code without very good reasons and clear boundaries. It's a very popular for people to think they'll just 'fix' something by changing the content received. There are a lot of legal, security and neutrality issues involved with altering third-party copyright information without either the content creator or the service users explicit consent. You need to take a close look at your ethics when this idea pops up. http://www.pcpd.org.hk/misc/pamela_chan/tsld003.htm Content alteration violates the 3rd, 4th, 5th, 6th, and 7th UN international consumer rights, to varying degrees. With the exception of Britain and Australia it's illegal to do this in Democratic countries. They have the same digital-rights policy as China. Prohibiting the transmission, viewing or storage of certain unspecified content of 'unsavory' nature. It's a regular sight for oppressive national dictatorships of various forms to do content alteration, but even there its illegal for non-government personnel to do. If you have management pressure to do this here are a few prior examples: http://www.wired.com/threatlevel/2008/05/isp-content-f-1/ http://www.webpronews.com/topnews/2006/02/07/isps-may-face-liability-for-altering-email http://www.wired.com/threatlevel/2007/12/canadian-isps-p/ http://www.ip-watch.org/weblog/2009/02/09/isp-liability-limitations-and-exceptions-top-global-copyright-issues-in-2009/ http://www.wired.com/threatlevel/2007/11/comcast-sued-ov/ http://www.macworld.com/article/132075/2008/02/netneutrality1.html http://www.techcrunch.com/2007/06/23/real-evil-isp-inserted-advertising/ And the things you avoid by not adding your own content to the pages: http://www.out-law.com/page-753 > > Well, adzapper may be a better example then. Presumably the adzapper logic > could get the target url and modify it. Right now it just replaces it with > a generated image saying "zapped." Yes. AdZapper does a simple "access denied" when retrieving the adverts. Providing its own custom error page which the browser displays instead of whatever add content. Squid does this easily with ACL and the deny_info directive. Amos
Re: [squid-users] Need help with insert code into html body
Hi, I read more and found one ICAP project named GreasySpoon ( http://greasyspoon.sourceforge.net/index.html ). I'll try this and update here later. Thanks, On Sun, Nov 29, 2009 at 7:26 PM, lan messerschmidt wrote: > On Sun, Nov 29, 2009 at 4:45 PM, Ronaldo Zhou wrote: >> Hi everyone, >> >> I need you help with squid to insert some code to html body >> returned to clients, for analytic reasons. >> >> > > Squid is designed that NO change to original HTTP response body, > though you can insert some additional headers. > Also eCap is squid-3.1's new feature. >
Re: [squid-users] Need help with insert code into html body
Sorry, wrong reply address: On Tue, Dec 1, 2009 at 8:44 AM, Brian Mearns wrote: > On Tue, Dec 1, 2009 at 3:02 AM, Ronaldo Zhou wrote: >> Hi, >> >> I read more and found one ICAP project named GreasySpoon ( >> http://greasyspoon.sourceforge.net/index.html ). I'll try this and >> update here later. >> >> Thanks, >> >> On Sun, Nov 29, 2009 at 7:26 PM, lan messerschmidt >> wrote: >>> On Sun, Nov 29, 2009 at 4:45 PM, Ronaldo Zhou >>> wrote: Hi everyone, I need you help with squid to insert some code to html body returned to clients, for analytic reasons. >>> >>> Squid is designed that NO change to original HTTP response body, >>> though you can insert some additional headers. >>> Also eCap is squid-3.1's new feature. >>> >> > > Privoxy might be another route. While squid is designed to be a > caching proxy and may have 3rd party modules or patches to make it > change the content, Privoxy is designed from the start to modify > content in certain ways. However, as with the other solutions > mentioned in this thread, this is meant primarily for removing target > content (typically images) more than straight out modification, and as > Amos very nicely illustrated, there is a lot of dirtiness involved in > content modification, especially if you're doing it transparently. > > -Brian -- Feel free to contact me using PGP Encryption: Key Id: 0x3AA70848 Available from: http://keys.gnupg.net