Experience using Freenet

Published on March 15, 2015

Experience using Freenet

Original author: Chris Double
  • Transfer
image

I followed the development of the Freenet project for many years, periodically returning to it. The last time I launched it a month ago, and after a month of use, I can say that it works much faster than before. Now I’ll talk about how to use it, and how I got around some problems when posting content.

Overview


There are no dynamic servers on the Freenet network and no one hosts sites. This is a data warehouse in which users place data, after which this data is available to everyone who has a key. Freenet is essentially a large distributed hash table.

Hosts reserve disk space and users select which data to store by key. Placing data in a warehouse distributes it across different nodes, and usually the data is not stored on your node. A data request is sent to the network, and the data goes to your node. A system is used that allows data recovery. Even if M of the total N data segments are lost, they can still be recovered. Data enters the network and the least used data disappears from it. Data in the repository cannot be edited. While they are in storage, they are always associated with one key.

Data requests from Freenet occur by key. There are several types of keys:

KSK @ somewhere

KSK-key is selected by those who add data. 'somewhere' can take any value. This allows you to create keys using phrases or words that you can remember. The downside is that with these keys you can re-enter other data. The data that you receive for a particular key depends on what data was entered using this key.

CHK @ ...

CHK keys have a part after @, which is calculated based on the content. The same data has the same keys. If the data stored by the CHK-key is gone from the network, you can always “cure” it by inserting the same file. It is as if on the Internet it was possible to fix the "404" error by downloading the desired page again.

SSK @ ...

SSK-key - cryptographic keys that are different for every data entry. They cannot be "cured" when the data has left the network. A new insert will spawn a new key.

USK @ ... / foo / 1

The USK key allows you to update content. The number at the end increases each time the data is updated. When requesting data, the data with the highest number is searched and returned. This is useful for web-hosted blogs with updated content.

Customization


For maximum efficiency, freenet software should work around the clock. I followed the instructions from offsite to install it on the server, and access the network from client machines through an SSH tunnel. The following command configures the tunnels through local ports to the server so that they can be accessed locally:

ssh -L 8888:127.0.0.1:8888 -L 8080:127.0.0.1:8080 -L 9481:127.0.0.1:9481 me@myserver.local


Port 8888 is for a proxy through which you access data from a browser. Port 8080 is busy with the messaging system, if installed. Port 9481 is used for the API interface that jSite uses.

A new node starts working a few hours after installation. Initially, it works slowly, but gradually accelerates.

Social networks on Freenet


The network has the opportunity for social networks. There is web of trust, distributed anonymous email, microblogging, forums and IRC. About their installation is written in the instructions. Setting up web of trust and installing Sone for microblogging is a good start for using Freenet for social purposes.

You can create as many identifiers as you like and switch between them. I use Freenet non-anonymously, and my person is related to the activities there. But if you wish, you can remain anonymous.

Sites


Sites are usually stored using USK keys so that they can be updated. The easiest way is to use special software that inserts a directory containing HTML files using a USK key. I am using jSite. My blog is mirrored on freenet with the key USK @ 1ORdIvjL2H1bZblJcP8hu2LjjKtVB-rVzp8mLty ~ 5N4,8hL85otZBbq0geDsSKkBK4sKESL2SrNVecFZz9NxGVQ / AQACder.

Note the negative number at the end. This leads to the fact that when searching the network starts the search with revision 7, and from there it already counts down in search of the newest update. Sites can be bookmarked in the freenet proxy, and they will be updated automatically.

Problems mirroring the blog on freenet included the presence of absolute links to other pages in the texts. Direct copying to freenet in this case would not work - on the network, the key is part of the URL. Therefore, the link to the page looks like /USK@longhash/bluishcoder/7/2014/12/17/changing-attributes-in-self-objects.html. An internal link starting with / will not work. because it does not have the USK prefix. As a result, I followed this tip with github. My _config.yml file contains the following settings:

baseurl: "file:///some/path/bluishcoder/_site"
#baseurl: /USK@longlonghash/bluishcoder/7
#baseurl: "http://bluishcoder.co.nz"


All of my internal links have a baseurl prefix. For example:

[link to a video]({{site.baseurl}}/self/self_comment.webm)


When generating a blog, this is replaced with the baseurl entry from _config.yml. I generate my blog with the appropriate baseurl, copy it to the web server, and then generate the blog with baseurl suitable for freenet and upload it to the network via jSite. Pretty tiring, but it works.

I’ll clarify that sites on freenet cannot use JavaScript, and part of the content is filtered for security reasons. Pure HTML and CSS work best.

Sites with lots of pictures


By the key USK @ 2LK9z-pdZ9kWQfw ~ GfF-CXKC7yWQxeKvNf9kAXOumU4,1eA8o ~ L ~ -mIo9Hk7ZK9B53UKY5Vuki6p4I4lqMQPxyw, AQACAAE / me has 3 pair. The problem with it is how to save photos and prevent them from falling out of the network.
If there are previews on the main page, then they remain available because they are accessed. Unfortunately, full pictures periodically drop out of the network. In this case, it is recommended to insert a large picture into the page, simply changing its visible size through the attributes of the IMG tag.

I tried to find a compromise approach. Unfortunately, preloading images in CSS does not work well with the freenet content filter. As a result, I developed a hidden DIV method at the end of the page, which contains all full-size pictures. They are not visible, but they are pumped up when visiting. The downside is that the browser informs about the loading of the page, although all visible content has already been loaded. I hope that in the future problems with CSS preload processing will be resolved.

Total


So far, I have just mirrored my blog on the web. I also met the program “Bitcoin via freenet”, which mirrors the chain of blocks in the network and allows you to make transactions. It seems that freenet will be useful for some things that Tor is used for, without having to maintain some kind of server that can be covered.

Here you can see a PDF with a detailed description of the network for the intruders.

My interest in it was to study the issue of encrypted and serverless storage of alternatives for services such as Twitter, Facebook, electric mail, etc. If you are not very worried about the long response and change of mind associated with the gradual departure of unused data, then you may like this project. Interestingly, what else can be implemented on this network.