Re: Could i use privoxy for copying cache to ipfs storage?
Fabian Keil <[email protected]> Mon, 10 Jan 2022 15:41:06 +0100
| Newsgroups | gmane.comp.web.privoxy.user |
|---|---|
| Message-ID | <[email protected]> |
Fred <[email protected]> wrote on 2022-01-10 at 14:05:36: > Le 10/01/2022 à 12:14, Fabian Keil a écrit : > > Fred <[email protected]> wrote on 2021-12-29 at 16:46:04: > > > >> I would like to add a (post) treatment on proxy cache, extracting all > >> http:// links to add ressource to IPFS. Then replace URL with > >> corresponding ipfs gateway One. > >> > >> I wonder if this could ne done with privoxy? > >> > >> Have a great year. > >> > >> PS: feel free to ask about ipfs if you wish > > I don't completely understand what exactly you want Privoxy to do. > > Can you be more specific, for example by providing an example URL > > and describing how Privoxy is supposed to modify parts of it? > Any file copied in IPFS is accessible through its hash. > To "migrate" web site, any link to a static resource in a web page are > rewritten > > Here is an example for processing http://www.eautarcie.org/ > this line of html code is rewritten like this: > > <div class="last"><a href="*de/index.html*" class="cta" title="KLICKEN > SIE HIER">Klicken Sie Hier</a></div> > > IPFS transformation. > > ``` > > wget http://www.eautarcie.org/de/index.html > > ipfs add -w index.html > > added QmSVS5DjuVw2VCvHTQGX5fvLfjt6yEugtKY8gKP2XAhisg index.html > added QmVpazeFPeB66TrDwUCz1sJ9Q7oxPAu7zqAjUDTrvz353P > > ``` > > HTML code modification > > <div class="last"><a > href="*/ipfs/**QmVpazeFPeB66TrDwUCz1sJ9Q7oxPAu7zqAjUDTrvz353P**/index.html*" > class="cta" title="KLICKEN SIE HIER">Klicken Sie Hier</a></div> > > I could use htttrack, wget, grep, awk to do it. > Then I wonder if this treatment could be fired from provoxy rules and > actions? Privoxy has experimental support for external filters which can be written in any programming language your system supports: https://www.privoxy.org/user-manual/actions-file.html#EXTERNAL-FILTER https://www.privoxy.org/user-manual/filter-file.html#EXTERNAL-FILTER-SYNTAX If external filters work on your operating system you should be able to use them to achieve your goal. You can check <http://p.p/show-status> to see if FEATURE_EXTERNAL_FILTERS has been compiled in. Fabian _______________________________________________ Privoxy-users mailing list [email protected] https://lists.privoxy.org/mailman/listinfo/privoxy-users
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEETzbBfzgWkTZUoehQaRgikYuiNxwFAmHcRYMACgkQaRgikYui NxyP7A/9Fkj1mw02th+4cMwdx05Cws7X9+vfhusmKJkozponTHsBSKglRagOnxlY Di11WVHQyUpKtfy05aBh4LG/pBkimcO1VMs7j0ZejEFVIIkhSUOdCVcw+UEvd/y0 Pe483FOMc/87UjxiGwV4MxNfKauTpaGeQfOC/tvIR0TPSRxbXKNjVbGeb7yspLy1 ad8VX9NOYsnxnTXWNX0rTkjm6b0s5j6m+NC4R0S3Z1md4SrZYnns41t2NgqLKt/6 76+1cZe3a5AJNJyi+b6HbKYBwNjR0PNejkeVoc6muvYTs3NR5cZBVd+PY62K5Ssf Aj2/+kC5kb4UweRthVmcR6LcVDVih3++vWzAqWvfRVOM8jZfKRerTyZZXGXWN08W eDLsDkAWTqr1PvCqjYAdcBm0h45gTKxsHwzgzhTEBVQ0HSNcqwcqpKxvFA8ATpBK M6QUqWFqAdK1WP7U0UkIOgTAA5mgOPaTbLGQEZ/5kwpD/yb5Y3bm6yRX+4VS4ZBp YIl8E/wjZDcDw97rNPv1mT4SszsI+THsyaDnh/J7F9BhXDDuWhxV/XnnZM/nB243 j3fNRH+EsBQJMOe9QW8wJm6eHHWAkFAwdNKfJlptdXxhKE83yDEJbmKmSGX5qHBV w7VRRWn0Luxjhuhxf2xc/2Tt0yDMaAIrWoqzWmEQV/iE8JgEQ28= =TaCW -----END PGP SIGNATURE-----