[Privoxy-users] Could i use privoxy for copying cache to ipfs storage?
Fabian Keil
fk at fabiankeil.de
Mon Jan 10 14:41:06 UTC 2022
Fred <frenault at linkeo.com> wrote on 2022-01-10 at 14:05:36:
> Le 10/01/2022 à 12:14, Fabian Keil a écrit :
> > Fred <frenault at linkeo.com> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.privoxy.org/pipermail/privoxy-users/attachments/20220110/5ee20dcd/attachment.bin>
More information about the Privoxy-users
mailing list