Babcom: Anonymous, Decentral Comment-System for Static Websites
Babcom1 provides Decentralized, Anonymous, Spamresistant comments on Static Websites using Freenet with Sone and some simple Javascript.
Table of Contents
What is this?
Babcom is a commenting system for static websites. It is decentral and enables anonymous and non-anonymous commenters to interact seamlessly without giving free reign to spammers.
Thanks go to digger3 with whom I bounced ideas back and forth which led to the current plan and to Sandy from OpenITP who was really enthusiastic when I told her about this idea.
Why are you doing this?
babcom is the internets last, best hope for peace.2
One of my pages was hacked. Badly. So badly that I had to kill it. See its grave.
I decided to only use static pages for future projects: Unhackable (with a well-maintained host), Fast, Low-maintenance. Suited for the battlefield of the internet today.
But I still want comments. Without Spam. And without subjugating to a centralized service.
Sounds cool! Can I try it?
You already do! (see below)
Do you like it?
Use Node:
⚙ Babcom is trying to load the comments ⚙
This textbox will disappear when the comments have been loaded.
If the box below shows an error-page, you need to install Freenet with the Sone-Plugin or set the node-path to your freenet node and click the Reload Comments button (or return).
If you see something like Invalid key: java.net.MalformedURLException: There is no @ in that URI! (Sone/search.html)
, you need to setup Sone and the Web of Trust
If you had Javascript enabled, you would see comments for this page instead of the Sone page of the sites author.
Note: To make a comment which isn’t a reply visible to others here, include a link to this site somewhere in the comment text.
Link to this site:
I don’t yet run freenet! How does this look?
For me it looks like this:
It might look different for you depending on the theme you choose for freenet. What you see above uses the rabbit-hole theme.
I want that for my site!
Great!
Just copy the following snippet to your site, and you’re good to go. The comments will appear where you pasted the snippet. All the code is inline and pure Javascript, so you can just paste it into any site which accepts HTML.
<!-- Babcom: Decentral Anonymous Spamresistant comments on Static Websites. Copyright: 2014 Arne Babenhauserheide (http://draketo.de) You are free to use this under any license you chose. If you want to be nice, release your changes under free software licenses. --> <style type="text/css"> #babcom-realcomments, #babcom-publicsoneid iframe { /*width: 1024px; height: 400px;*/ width: 1024px; height: 100px; border: solid thin black; } #babcom-needsfreenet { width: 1024px; height: 300px; margin-bottom: -1em; border: solid thin black; } #babcom-needsfreenet p, #babcom-needsfreenet blockquote { padding-left: 0.5em; padding-right: 0.5em; } </style> <!-- TODO: Save the node in a cookie --> <p><button type="button" onclick="loadcomments()">Reload Comments</button> Use Node: <input type="text" name="babcom-node" id="babcom-node" value="http://127.0.0.1:8888" /></p> <div id="babcom-needsfreenet"><blockquote><strong>⚙ Babcom is trying to load the comments ⚙</strong></blockquote> <p>This textbox will disappear when the comments have been loaded.</p> <p>If the box below shows an error-page, you need to install <a href="http://freenetproject.org">Freenet</a> with the <a href="http://freesocial.draketo.de/sone_en.html">Sone-Plugin</a> or set the node-path to your freenet node and click the <tt>Reload Comments</tt> button (or return).</p> <p>If you see something like <code>Invalid key: java.net.MalformedURLException: There is no @ in that URI! (Sone/search.html)</code>, you need to setup <a href="http://freesocial.draketo.de/sone_en.html">Sone</a> and the <a href="http://freesocial.draketo.de/wot_en.html">Web of Trust</a></p></div> <p id="babcom-comments"></p> <p id="babcom-nojswarning">If you had Javascript enabled, you would see comments for this page instead of the Sone page of the sites author.</p> <iframe id="babcom-publicsoneid" src="http://127.0.0.1:8888/Sone/viewSone.html?sone=6~ZDYdvAgMoUfG6M5Kwi7SQqyS-gTcyFeaNN1Pf3FvY"></iframe> <p><em>Note: To make a comment which isn’t a reply visible to others here, include a link to this site somewhere in the comment text.</em></p> <p>Link to this site: <span id="babcom-sitelink"></span></p> <script type="text/javascript" src="babcom.js"></script>
/* @licstart The following is the entire license notice for the JavaScript code within this file (babcom.js). Copyright (C) 2014 Arne Babenhauserheide The JavaScript code in this page is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License (GNU GPL) as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. The code is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU GPL for more details. As additional permission under GNU GPL version 3 section 7, you may distribute non-source (e.g., minimized or compacted) forms of that code without the copy of the GNU GPL normally required by section 4, provided you include this license notice and a URL through which recipients can access the Corresponding Source. As additional permission under GNU GPL version 3 section 7, you may use this code under any other free software license, including permissive licenses like BSD and MIT. @licend The above is the entire license notice for the JavaScript code within this script file. */ function loadcomments() { var freenetnode = document.getElementById("babcom-node").value var sonesearch = "/Sone/search.html?query=" var blacklist = /[^a-zA-Z0-9_\/\-\.]*/g; /* inversed whitelist */ var host = window.location.host; var path = window.location.pathname; host = host.replace(blacklist, ""); path = path.replace(blacklist, ""); var postsanchor = "post-results"; var comments = document.getElementById("babcom-comments"); var publicsone = document.getElementById("babcom-publicsoneid"); var nojswarning = document.getElementById("babcom-nojswarning"); var needsfreenet = document.getElementById("babcom-needsfreenet"); var sitelink = document.getElementById("babcom-sitelink"); var searchquery = host + path + "#" + postsanchor; var iframesource = freenetnode + sonesearch + searchquery; var sitepath = "http://" + host + path; /* when the function gets rerun, replace the realcomments instead of adding.*/ if (document.getElementById("babcom-realcomments")) { var cif = document.getElementById("babcom-realcomments"); cif.src = iframesource; } else { var iframe = document.createElement("iframe"); iframe.setAttribute("id", "babcom-realcomments"); iframe.setAttribute("src", iframesource); comments.parentNode.replaceChild(iframe, comments); } nojswarning.parentNode.replaceChild(document.createElement("p"), nojswarning); publicsone.parentNode.replaceChild(document.createElement("span"), publicsone); sitelink.innerHTML = sitepath; commentsiframe = document.getElementById("babcom-realcomments"); commentsiframe.onload = function(){ needsfreenet.parentNode.replaceChild(document.createElement("p"), needsfreenet); commentsiframe.style.width = "1024px"; commentsiframe.style.height = "400px"; } } loadcomments(); document.getElementById("babcom-node").onkeydown = function(e) { var keyCode = e.keyCode || e.which; if (keyCode === 13) { loadcomments(); } }
How does this work?
The small Javascript above gets the site URL, then it submits a search request on your local Sone instance by creating an iframe with the right URL.
Isn’t this hard?
That’s what I thought. It is the reason, why it took me half a year of planning and thinking before I actually started. Then I chose to take the simple route and just integrate things which already work well. And the first prototype took just 3 hours (thanks to some great advice from Thomas L. - Thank you!).
But actually Freenet is hard. It provides a censorship resistant, decentral, anonymous, global datastore and took 10 years to get it working as well as it does today. Thanks for that go to Matthew Toseland (our former donation-funded full-time developer who’s now studying at Cambridge) and many contributors.
And the Web of Trust for Spam Resistance in Anonymous Networks is hard. It enables seamless communication between anonymous and non-anonymous users without being drowned in Spam. Thanks for that goes to p0s aka xor.
And Sone is hard. Especially making it easy and enjoyable to use is hard. Thanks for that go to David „Bombe“ Roden.
I just connected them to all the websites out there.
Where to go from here?
In its current state, this works pretty well (if you already run Freenet and Sone, it loads faster than Disqus), but there are still lots of things which could be improved.
With babcom
- Provide a simple javascript file for other sites to use with something like
<script src="http://draketo.de/proj/freecom/babcom.js"></script><div id="babcom"></div>
- This script might get a way to store a cookie, to make it remember the location of your node.
- Provide an in-proxy as fallback for users who don’t have Freenet; accessing a read-only instance of Sone.
- Comment everywhere: A Greasemonkey-Script which allows commenting any website.
- Going further: Browser-Plugins, including support for mobile apps with SSH-forwarding of Freenet.
- Using ID-anchors on a site could make it possible to have multiple comment fields.
- Give the babcom-site a better theme - maybe taken from the static site extension.
- Add an “quote in freenet”-button which inserts the selected part of the site into freenet (similar to Medium) and then posts a message with the USK, the title and the original URL. That could be used by authors and would provide strong anonymity for anonymous commenters who write the first real comment. This would require some support from Sone to make it convenient to use.
With Freenet and Sone
- Some changes in Sone can make Babcom much easier to use.
- Add a text field to post a message directly to a search (currently you need to go to your profile page and post from there).
- Precompute Searches for URLs to have almost instant results.
- And then Freenet with the Web of Trust could become easier to setup. If you want to help, plesae see Contribute!
- And integration with the Freemail-plugin would be cool, it could provide an anonymous contact-page, maybe using microformats to find the Freemail address for sending in a way which also allows using external tools.
- Integrate into the Freenet-HTML-Filter, so that all freesite authors can just add
<div class=
"freecom-comments"></div>
to get a comment-field.
Using this from Android?
If you want to access babcom-comments from Android, you currently need a home-server running freenet. Then you can forward port 8888 to your android device using ssh:
ssh -NL 8888:localhost:8888 <yourhost>
Who are you?
I’m Arne Babenhauserheide, I live in Graben (Germany) and I’m currently doing my PhD in physics at Karlsruhe Institute of Technology (KIT).
I work on Babcom along with other free software and free culture projects, because I want to make the world a better place - if not for me than at least for my children.
The fight against censorship and surveillance is a pretty important battle for that. And one I’m equipped to fight (along with the battle for free culture and spreading roleplaying games as a unique synthesis of art and communication).
You can find more of my stuff on draketo.de (my personal site) and 1w6.org (the site of the free roleplaying game I contribute to).
Can I support you?
Sure!
Spread the word:
What a disruptive technology needs the most is getting known!
- Reddit this site:
- Tweet this site: Tweet
- Plus this site:
- Slashdot this site (it is static, it should survive the slashdot effect - and content freenet actually gets faster when more people access it!)
- Dent this site on Quitter or Load Average or one of the other GNU social sites.
- or, well, you know the thing with book in its name.
If you use a news-site which is missing here, please drop me a line! (the comment form is above - you’re already running Freenet with Sone, right?)
(yes, I understand the irony of using centralized systems to spread the word about decentralized systems. Well, we have to start where we are, and if it gets more people to use babcom as decentral, anonymous, spam-resistant commenting system on mostly unhackable static pages, that’s a prize I’m willing to pay. On the upside: If most pages use this system, there won’t be a need to go this way in the future - and that’s a dream worth fighting for!)
Contribute to babcom:
Either simply improve the script and send the new version to arne_bab -ät- web -dot- de, or get Mercurial and clone the full babcom sources via
hg clone http://draketo.de/proj/freecom/repo
Contribute to Freenet development:
Or support me directly:
It pays my server, and if it should be enough one day, it would allow me to spend more time on stuff for which no big company wants to pay a salary
- Buy my free licensed roleplaying book (german) (that’s my main contribution to free culture, so if you do that, you not only support me but also free culture and roleplaying)
Or donate to Freenet:
Freenet is the technology powering all this, and it lives off donations!
Or, most importantly, install Freenet and use Babcom!
See freenetproject.org.
Nowadays Freenet works pretty well, though it still isn’t perfectly polished, so expect some hickups. Let’s close this with the quote which made me start using freenet over ten years ago:
"I worry about my child and the Internet all the time, even though she's too young to have logged on yet. Here's what I worry about. I worry that 10 or 15 years from now, she will come to me and say 'Daddy, where were you when they took freedom of the press away from the Internet?'" — Mike Godwin, Electronic Frontier Foundation
Footnotes:
Freecom got renamed to babcom, because freecom is a registered trademark and it does not help the battle against censorship if this site gets sued offline.
You might recognize this phrase from Babylon 5. There’s a reason for that: If we want all people to be able to publish online without having to succumb to the rules of centralized services, we have to use static websites: Only those can sustainably withstand the constant attacks from crackers. And to have comments in a free internet without subjugating our visitors to centralized sites, we must to use local services. To enable our visitors to speak freely, we must provide anonymous comments. And to make the system resilient against censorship by denial-of-service, we must have a spam-filter. Babcom uses Freenet to provide all this. And it gets defended by many small, coordinated nodes.