Content / Message JS Injection for HTTP Pages Only

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Content / Message JS Injection for HTTP Pages Only

Norbert Naveen

Hello Squid Admins

Squid 3.5 acts as HTTP Proxy only and does not allow any other kind of Traffic

For Such a Setup where only HTTP traffic flows through Squid

I want to Insert a Banner / Java Script based Dynamic Page in the HTTP response , to notify the users or alert the users based on their usage

 

Would like to know how to go about the same

Should I use ICAP or ECAP or any other suggestions ?

Has anybody set up anything similar to this ?

Any words of advice is welcome

 

Thanks

Naveen


_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Content / Message JS Injection for HTTP Pages Only

Eliezer Croitoru
Hey Naveen,

ECAP and ICAP been in use for such things very long ago.
This is one of the reasons for the movement in the network to encrypt
traffic and also to pin certificates in the applications.
You will need to choose to go either with ECAP or ICAP and from there the
direction is pretty simple.
I was thinking of publishing an example using an ICAP service which is based
on this example:
https://github.com/elico/icap/blob/master/example/redirect.go

But I am not sure if it would be a good idea to do so.
I believe that if you will be able to grasp the example you would be able to
mangle it a bit to act as "proxy" in a way and then to inject content into
the body of the response.
You will need some skills and experimentation with the GoLang language and
concepts to make it work.
It's not a beginner task so don't expect it to be accomplished in one week.

Let me know if you need some more guidance.

Eliezer

----
http://ngtech.co.il/lmgtfy/
Linux System Administrator
Mobile: +972-5-28704261
Email: [hidden email]


From: squid-users [mailto:[hidden email]] On
Behalf Of Norbert Naveen
Sent: Monday, June 12, 2017 8:49 PM
To: [hidden email]
Subject: [squid-users] Content / Message JS Injection for HTTP Pages Only

Hello Squid Admins
Squid 3.5 acts as HTTP Proxy only and does not allow any other kind of
Traffic
For Such a Setup where only HTTP traffic flows through Squid
I want to Insert a Banner / Java Script based Dynamic Page in the HTTP
response , to notify the users or alert the users based on their usage

Would like to know how to go about the same
Should I use ICAP or ECAP or any other suggestions ?
Has anybody set up anything similar to this ?
Any words of advice is welcome

Thanks
Naveen

_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Content / Message JS Injection for HTTP Pages Only

Norbert Naveen
Hello Eliezer
  Thanks for your response shall have a look at it and revert
  Between ECAP & ICAP which one is optimal ?
  Something I have for reference is  below
  http://wiki.squid-cache.org/SquidFaq/ContentAdaptation#Summary
 Kindly suggest

Thanks
Naveen

-----Original Message-----
From: Eliezer Croitoru [mailto:[hidden email]]
Sent: Tuesday, June 13, 2017 2:07 AM
To: [hidden email]
Cc: [hidden email]
Subject: RE: [squid-users] Content / Message JS Injection for HTTP Pages
Only

Hey Naveen,

ECAP and ICAP been in use for such things very long ago.
This is one of the reasons for the movement in the network to encrypt
traffic and also to pin certificates in the applications.
You will need to choose to go either with ECAP or ICAP and from there the
direction is pretty simple.
I was thinking of publishing an example using an ICAP service which is based
on this example:
https://github.com/elico/icap/blob/master/example/redirect.go

But I am not sure if it would be a good idea to do so.
I believe that if you will be able to grasp the example you would be able to
mangle it a bit to act as "proxy" in a way and then to inject content into
the body of the response.
You will need some skills and experimentation with the GoLang language and
concepts to make it work.
It's not a beginner task so don't expect it to be accomplished in one week.

Let me know if you need some more guidance.

Eliezer

----
http://ngtech.co.il/lmgtfy/
Linux System Administrator
Mobile: +972-5-28704261
Email: [hidden email]


From: squid-users [mailto:[hidden email]] On
Behalf Of Norbert Naveen
Sent: Monday, June 12, 2017 8:49 PM
To: [hidden email]
Subject: [squid-users] Content / Message JS Injection for HTTP Pages Only

Hello Squid Admins
Squid 3.5 acts as HTTP Proxy only and does not allow any other kind of
Traffic For Such a Setup where only HTTP traffic flows through Squid I want
to Insert a Banner / Java Script based Dynamic Page in the HTTP response ,
to notify the users or alert the users based on their usage

Would like to know how to go about the same Should I use ICAP or ECAP or any
other suggestions ?
Has anybody set up anything similar to this ?
Any words of advice is welcome

Thanks
Naveen

_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Content / Message JS Injection for HTTP Pages Only

Amos Jeffries
Administrator
In reply to this post by Eliezer Croitoru
On 13/06/17 08:36, Eliezer Croitoru wrote:

> Hey Naveen,
>
> ECAP and ICAP been in use for such things very long ago.
> This is one of the reasons for the movement in the network to encrypt
> traffic and also to pin certificates in the applications.
> You will need to choose to go either with ECAP or ICAP and from there the
> direction is pretty simple.
> I was thinking of publishing an example using an ICAP service which is based
> on this example:
> https://github.com/elico/icap/blob/master/example/redirect.go
>
> But I am not sure if it would be a good idea to do so.
> I believe that if you will be able to grasp the example you would be able to
> mangle it a bit to act as "proxy" in a way and then to inject content into
> the body of the response.
> You will need some skills and experimentation with the GoLang language and
> concepts to make it work.
> It's not a beginner task so don't expect it to be accomplished in one week.
>
> Let me know if you need some more guidance.
>
> Eliezer

And don't forget that the content going through is often copyrighted by
someone else. Being publicly accessible does not make it any less
proprietary or restricted by its owners. Under copyright legislation
altering other peoples content can be a form of theft.

Naveen: please get some legal advice about the above before going any
further. This idea of injecting JS banners and notices into other
peoples pages has a history lined with companies having major PR fallout
or collapsing into bankruptcy in a few cases as a direct result of
consumer and copyrigth content owners reaction to the injection.

Amos


> ----
> http://ngtech.co.il/lmgtfy/
> Linux System Administrator
> Mobile: +972-5-28704261
> Email: [hidden email]
>
>
> From: squid-users [mailto:[hidden email]] On
> Behalf Of Norbert Naveen
> Sent: Monday, June 12, 2017 8:49 PM
> To: [hidden email]
> Subject: [squid-users] Content / Message JS Injection for HTTP Pages Only
>
> Hello Squid Admins
> Squid 3.5 acts as HTTP Proxy only and does not allow any other kind of
> Traffic
> For Such a Setup where only HTTP traffic flows through Squid
> I want to Insert a Banner / Java Script based Dynamic Page in the HTTP
> response , to notify the users or alert the users based on their usage
>
> Would like to know how to go about the same
> Should I use ICAP or ECAP or any other suggestions ?
> Has anybody set up anything similar to this ?
> Any words of advice is welcome
>
> Thanks
> Naveen
>
> _______________________________________________
> squid-users mailing list
> [hidden email]
> http://lists.squid-cache.org/listinfo/squid-users

_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Content / Message JS Injection for HTTP Pages Only

babajaga
This post has NOT been accepted by the mailing list yet.
This post was updated on .
In reply to this post by Norbert Naveen
>Has anybody set up anything similar to this ? <
Yes. As a stand-alone proxy, the performance of which is enhanced when used together with squid.
Works for http only; doing content-injection on-the-fly (_not_ buffering full page).

Note possible legal implications for your country.
Loading...