The Interplanetary File System (IPFS) is a distributed, peer to peer, file system. It’s pretty cool. So, here’s an experimental plugin that adds backend file system support for this protocol for Known. 

Currently this functions as a drop in replacement for the Known file storage system, along the same lines as the S3 plugin. It’ll store photos, profile pictures, and any other stored data to IPFS instead of on the local file system, or in Mongo (if you’re using Mongo).

Usage 

You’ll need an IPFS server to talk to. For development I installed go-ipfs, so you can use that, or one of the public ones.

Next, copy the IPFS directory to your IdnoPlugins directory, and activate it.

By default, the plugin is set up to talk to localhost but you probably don’t want to do that forever, so update your config.ini as follows:

[IPFS]
host = 'servername'
port = 1234
apiport = 5678

Replace the values accordingly, but make sure you keep the [IPFS] section header.

Still to do

At the moment, this is a drop in functional replacement for file storage, and doesn’t go into some of the cooler things you can do with Content-Addressable storage.

As pointed out in this ticket, an obvious improvement would be to cache stuff from the image proxy to IPFS (which already takes place), but to directly reference them via their content hash (which doesn’t currently take place), as this should be more efficient.

Anyway, that’s future development and would require some core hooks. I’ll get to that next, I’m sure.

Anyway, kick the tires and let me know your thoughts. Pull requests more than welcome!

» Visit the project on Github...

So, following on from the theme of other week’s post, this is a very quick plugin which will opportunistically encrypt email sent by Known.

It works in much the same way as the similar WordPress code; if a key for a user is in the keyring, the email is encrypted before it is sent. It is particularly handy when combined with my PGP Signin code, since that will provide key discovery.

I wrote this for my own use, so it’s not perfect. For example, since Known sends all email as HTML (unless my plain text email patch is also applied this patch was merged into core), my plugin currently just strips tags, which at least makes the email somewhat readable.

Anyway, kick it around.

» Visit the project on Github...