📜 ⬆️ ⬇️

Experience using Freenet

image

I have been following 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 will talk about how to use it, and how I got around some problems when posting content.

Overview


There are no dynamic servers in 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 anyone who has the key. Freenet, in fact, is a large distributed hash table.
')
Network nodes reserve disk space and users choose which data to store by key. Placing data in the repository distributes them to different nodes, and usually the data is not stored on your node. The data request is sent to the network, and the data is transferred to your site. Uses a system that allows you to recover data. 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 a single key.

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

KSK @ somewhere

KSK-key is selected for those who add data. 'somewhere' can take any value. It allows you to create keys using phrases or words that you can remember. The downside is that you can re-enter other data with these keys. The data 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 on the CHK key is gone from the network, you can always “cure” it by inserting the same file. It is as if the Internet could fix the error "404" by downloading the desired page again.

SSK @ ...

SSK-key - crypto keys that are obtained different with each data entry. They cannot be “cured” when the data has left the network. New insert will generate a new key.

USK @ ... / foo / 1

USK-key allows you to update the content. The number at the end is incremented 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 updateable content.

Customization


For maximum efficiency, freenet software should work around the clock. I followed the instructions from the offsite on installing it on the server, and accessing the network from client machines via an SSH tunnel. The following command configures 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 occupied by the message system, if installed. Port 9481 is used for the jSite interface API

The new node starts working several hours after installation. Initially, it works slowly, but gradually accelerates.

Freenet social networks


The network has the opportunity for social networks. There is a web of trust, distributed anonymous email, microblogging, forums and IRC. About their installation is written in the instructions. Setting up a 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 connected with the activities there. But if you wish, you can remain anonymous.

Sites


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

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

Problems with mirroring a blog in freenet included the presence in the texts of absolute links to other pages. Direct copying to freenet would not have worked in this case - the key on the network 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. Internal link starting with / will not work. because it does not have the prefix USK. As a result, I followed this advice 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 my internal links have a baseurl prefix. For example:

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


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

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

Sites with lots of pictures


According to the key USK @ 2LK9z-pdZ9kWQfw ~ GfF-CXKC7yWQxeKvNf9kAAXOumU4,1eA8o ~ L ~ -mIo9Hk7ZK9B53UKY5Vuki6p4I4lqMQPxyw, AQACAAfending system is in the form of a search for a search by means of a search. The problem with it is how to save the pictures and prevent them from falling out of the network.
If there are thumbnails on the main page, then they remain accessible, because they are accessed. Unfortunately, full pictures periodically fall out of the network. In this case, it is recommended to insert a large image into the page, simply by changing its apparent 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 method of hidden DIV at the end of the page, which contains all the full-size images. They are not visible, but they are pumped up when visiting. The disadvantage is that the browser informs about the page loading, although all the visible content is already loaded. I hope that in the future, problems with handling preloads in CSS will be solved.

Total


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

Here you can look at the PDF with a detailed description of the network for the participants.

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

Source: https://habr.com/ru/post/253127/


All Articles