[Privoxy-users] Could i use privoxy for copying cache to ipfs storage?
Fred
frenault at linkeo.com
Mon Jan 10 13:05:36 UTC 2022
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?
>
> Fabian
>
Hi Fabian,
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?
What do you think?
Fred
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 236 bytes
Desc: OpenPGP digital signature
URL: <https://lists.privoxy.org/pipermail/privoxy-users/attachments/20220110/fcf10246/attachment.bin>
More information about the Privoxy-users
mailing list