[squid-users] Is it possible to modify cached object?

boruc baborucki at gmail.com
Mon Feb 6 22:27:21 UTC 2017


Hi again,

So I've installed squid 3.5.12, libecap 1.0.1 and sample adapter 1.0.0. I
was able to test a simple "the -> a" replacement shown in  documentation
<http://www.e-cap.org/Documentation>  . Next I tried some HTML injection,
also from documentation. However, it didn't work and I got error like below:

2017/02/06 17:56:30 kid1| Loading Squid module from
'/usr/local/lib/ecap_adapter_modifying.so'
2017/02/06 17:56:30 kid1| Squid plugin modules loaded: 1
2017/02/06 17:56:30 kid1| Adaptation support is on
2017/02/06 17:56:30 kid1| ERROR: failed to start essential eCAP service:
ecap://e-cap.org/ecap/services/sample/modifying:
Modifying Adapter: configuration error: unsupported configuration parameter:
replacement-src
2017/02/06 17:56:30 kid1| FATAL: dying from an unhandled exception:
Modifying Adapter: configuration error: unsupported configuration parameter:
replacement-src

What is more, when I try regular text replacement and I use space in
replacement text I get no error message in cache.log, but browser says that
"proxy server is refusing connections" and executing command "squid -k
check" gives me this:

2017/02/06 19:11:11| /etc/squid/squid.conf:84: Duplicate option "uri" in
adaptation service definition
FATAL: /etc/squid/squid.conf:84: malformed adaptation service configuration
Squid Cache (Version 3.5.12): Terminated abnormally.

I managed to find a  bugfix <https://bugs.launchpad.net/ecap/+bug/1634621>  
to *replacement-src* problem in  this thread
<https://answers.launchpad.net/ecap/+question/402946>  , but how should I
appy this? Just add lines with "+" at the beginning and recompile sources
one more time?

Will it work with spaces in replacement text? My main goal is to add a
paragraph to requested page, with link or image, but tags for those require
spaces in string. Or maybe I have to write my own adapter to this?

Thank you for your time.



--
View this message in context: http://squid-web-proxy-cache.1019090.n4.nabble.com/Is-it-possible-to-modify-cached-object-tp4681073p4681483.html
Sent from the Squid - Users mailing list archive at Nabble.com.


More information about the squid-users mailing list