bittorrent
In December of 2014, Bittorrent announced Project Maelstrom – a way to power the internet by means of torrents. A truly decentralized internet in which the websites you view are hosted by other users of the internet – not a central server.
2014年12月, Bittorrent宣布了Maelstrom项目 -一种通过torrent推动互联网发展的方式。 真正分散的Internet,您查看的网站由Internet的其他用户(而不是中央服务器)托管。
![Vortice in mare](https://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2015/04/1428773682Fotolia_70432421_Subscription_Monthly_M-copy.jpg)
Other portals have already reposted their most recent announcement – a public beta for Windows users, so I won’t dwell on that. Rather, I’d like to focus on the technical side – actually using the browser, learning how it works, and developing for it. Note that a Mac beta is coming soon.
其他门户网站已经重新发布了它们的最新公告– Windows用户的公开测试版 ,所以我不再赘述。 相反,我想专注于技术方面–实际使用浏览器,了解其工作原理,并为此进行开发。 请注意,Mac Beta版即将推出。
它是如何工作的? (How does it work?)
When using torrents to share files, you get file fragments from various other machines who already have those fragments (we call these machines seeders). The torrent client (software like Deluge, Transmission, or uTorrent, etc) knows where to find these fragments with the help of a special .torrent
file, and pulls in data from all those various locations by comparing hash signatures. What’s more, it compares the various fragments coming from one source to their counterparts coming from another source, so you know you’re always getting the file you wanted. Additionally, many torrents include a hash string via which you can verify their integrity manually, if you so choose.
当使用torrent共享文件时,您会从其他具有这些碎片的其他机器上获得文件碎片(我们称这些机器为seeder )。 torrent客户端(如Deluge,Transmission或uTorrent之类的软件)知道如何在特殊的.torrent
文件的帮助下找到这些片段,并通过比较哈希签名从所有这些位置提取数据。 而且,它会将来自一个来源的各种片段与来自另一个来源的对应片段进行比较,因此您知道总是可以得到想要的文件。 此外,许多torrent都包含一个哈希字符串,您可以选择通过该哈希字符串手动验证其完整性。
With Maelstrom, which is nothing but a heavily customized fork of Chromium (so it works with regular websites, too), you browse the Maelstrom-specific internet via the exact same means as torrenting. To host a website, all you need is a .torrent
file for your content and once people click or input its Magnet link or Bittorrent link (more on that later), the contents will be fetched from everyone who already has them. Naturally, this means the younger your content (web page) is, the slower the fetching – because at that point very few people have it. The more it spreads, the more people can be used as seeders, and the faster a new visitor will download it, thus becoming a new seeder as well.
使用Maelstrom,它只不过是大量定制的Chromium分支(因此它也可以与常规网站配合使用),因此您可以通过与洪流完全相同的方式浏览Maelstrom特定的互联网。 要托管一个网站,您需要的是一个.torrent
文件作为您的内容,一旦人们单击或输入其Magnet链接或Bittorrent链接(稍后会详细介绍),该内容将从已经拥有它们的所有人中获取。 自然,这意味着您的内容(网页)越年轻,获取的速度就越慢–因为那时很少有人拥有它。 它传播的越多,可以用作播种者的人就越多,新访客下载它的速度就越快,因此也成为新的播种者。
In short, Maelstrom reads in websites from people who already downloaded them, bypassing hosting companies and central servers. It’s distributed, decentralized, free hosting – but only for static sites, for obvious reasons.
简而言之,Maelstrom绕过托管公司和中央服务器,从已经下载了网站的人那里读取网站。 它是分布式的,分散的,免费的托管 -但出于明显的原因,仅适用于静态站点。
正在安装 (Installing)
To install Maelstrom, you (currently) need to be on a Windows platform (this post will be updated accordingly once the Mac version is out) and download the app.
要安装Maelstrom,(当前)您需要在Windows平台上(一旦Mac版本发布,此帖子将相应更新)并下载该应用程序。
Note that if you have a running version of Chromium installed, it’s highly likely that the installation will fail and instead summon the installed version of Chromium when executed. I hope Bittorrent will fix their client installation soon, but in the meanwhile, you’ll need to remove Chromium before installing Maelstrom. Also note that Maelstrom, as it is right now, is a severely outdated version of Chromium (37 at the time of writing), so don’t think you can replace your main browser with it – it’s experimental tech still, at best.
请注意,如果您安装的是Chromium的运行版本,则安装很可能会失败,而在执行时会调用Chromium的已安装版本。 我希望Bittorrent能够尽快修复其客户端安装,但是与此同时,您需要在安装Maelstrom之前删除Chromium。 还要注意,Maelstrom(目前)是Chromium的严重过时版本(在撰写本文时为37),所以不要以为可以替换您的主浏览器-充其量只是实验性技术。
Once opened, the browser greets you with a home page which is, in itself, a torrent hosted page, and contains links to other such websites (inspecting the links will reveal that they begin with the magnet
protocol).
打开后,浏览器将为您提供一个主页,该主页本身就是一个洪流托管页面,并且包含指向其他此类网站的链接(检查链接将发现它们以magnet
协议开头)。
磁链 (Magnet Links)
In the past, when you wanted to torrent something, you needed to download a .torrent
file, open it in a client, and the fetching process would begin after your clients parsed the data inside it. Nowadays, it’s possible to use Magnet links. Magnet links contain all the metadata a .torrent
file usually would, avoiding the need for centralized trackers (torrent sites) to host them, like ThePirateBay. This helps these trackers avoid legal trouble, as they no longer actually host anything, and it helps the distribution effort – all you need to do is share a Magnet link with someone and they can hook up with the sharing network immediately, without downloading any additional files.
过去,当您要洪流某些内容时,您需要下载一个.torrent
文件,然后在客户端中打开它,然后在客户端解析了其中的数据后开始提取过程。 如今,可以使用磁铁链接。 磁力链接包含.torrent
文件通常包含的所有元数据,从而避免了使用集中跟踪器(torrent站点)托管它们的需要,例如ThePirateBay。 这可以帮助这些跟踪器避免法律麻烦,因为它们不再实际托管任何内容,并且可以帮助分发工作–您所需要做的就是与某人共享一个磁力链接,他们可以立即与共享网络建立连接,而无需下载任何其他附件文件。
You can read more about Magnet links here.
The Maelstrom project uses Magnet links to navigate from site to site. When you click on a tile in the greeting page of the browser, you are, in fact, clicking on a magnet link which reads in the data of a .torrent
file present on Amazon’s S3 hosting.
Maelstrom项目使用磁铁链接在站点之间导航。 实际上,当您在浏览器的问候页面中单击一个图块时,您实际上是在单击一个磁链,该磁链会读取Amazon S3托管中存在的.torrent
文件的数据。
Try and install the browser if you’re on Windows, click a link or two, see it at work. Here’s a gif of how it works for me:
如果您使用的是Windows,请尝试安装浏览器,单击一个或两个链接,即可正常使用。 这是它对我的运作方式的影响:
![](https://i.imgur.com/45aJo0W.gif)
You can see it’s a bit slow on first load, but all subsequent ones are faster because it’s, in essence, just a static site that you now have on your machine.
您可以看到它在第一次加载时有点慢,但是所有后续加载都更快,因为从本质上讲,它只是您现在在计算机上拥有的静态站点。
空间问题 (Space Issues)
During regular torrenting, you download files into a folder from which they are then served until they are deleted and you effectively stop being a seeder. This folder takes space, of course, and can grow to immense sizes, which is why few people are long-term seeders.
在常规种子下载过程中,您将文件下载到一个文件夹中,然后从该文件中获取文件,直到将其删除为止,从而实际上不再成为种子。 当然,此文件夹占用空间,并且可以增长到巨大的大小,这就是为什么很少有人是长期播种者的原因。
When Maelstrom downloads websites, it has its own internal cache into which it saves the data and from which it seeds for others. The size of this cache can be modified in the Settings, under Torrents, and even cleared. Naturally, the more stuff there is, the slower things get, so one cannot expect to have the entire web fetched in there eventually – the storage amount is limited. This also means that:
当Maelstrom下载网站时,它拥有自己的内部缓存,该缓存将数据保存到该缓存中,并从中为其他用户提供种子。 可以在“设置”中的“洪流”下修改此缓存的大小,甚至清除该大小。 自然,那里的东西越多,东西的速度就越慢,因此不能指望最终将整个Web都放入那里-存储量是有限的。 这也意味着:
- Bigger sites with streaming content like images, movies and music will take this space up much faster than the rest. 包含图像,电影和音乐等流媒体内容的大型站点将比其他站点更快地占用此空间。
- Eventually, some pages will drop off the grid as they lose popularity and thus, seeders. Their caches will be cleared, the less used sites will go first, and they’ll stop being requested. This torrent-powered “internet” will obviously be highly dynamic and volatile in content. 最终,某些页面会因为失去人气而无法获得种子,从而脱离网格。 它们的缓存将被清除,使用较少的站点将排在最前面,并且它们将不再被请求。 这个由洪流驱动的“互联网”显然将具有高度的动态性和可变性。
发展 (Developing)
To develop static sites for use in Maelstrom, one can follow these instructions. They’re quite specific, but that’s what a beta is for – ironing out the kinks and improving the process to make it more user friendly.
要开发用于Maelstrom的静态站点,可以遵循以下说明 。 它们非常具体,但这就是beta的目的-消除缺陷,并改进流程以使其更加用户友好。
Unfortunately, Python 2.7 is required, but it can be installed easily. Then, you build a static website as usual, with all the CSS and JS bells and whistles. For our example, we’ll use this simple two-page “site”.
不幸的是,Python 2.7是必需的,但可以轻松安装。 然后,像往常一样建立一个静态网站,并包含所有CSS和JS内容。 对于我们的示例,我们将使用这个简单的两页“ site” 。
If you’d like to follow along, clone the torrent web tools and the simple site, each into its own folder. The site is nothing but the default HTML 5 boilerplate with the HTML and CSS slightly edited to provide a different color scheme and links.
如果您想继续,请将torrent网络工具和简单站点克隆到各自的文件夹中。 该网站不过是默认HTML 5样板,对HTML和CSS进行了略微编辑以提供不同的配色方案和链接。
Once this is done, we run the generator.py
script on the entire folder which contains the site. It takes over from there and in less than a second, the .torrent
file is ready in the folder where the script was run.
完成此操作后,我们将在包含该站点的整个文件夹上运行generator.py
脚本。 它从那里接管,并在不到一秒钟的时间内,在运行脚本的文件夹中准备好.torrent
文件。
![02](https://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2015/04/142877253602.png)
Note that the other arguments you can use with the generator are explained in their Github README file.
请注意,生成器可以使用的其他参数在其Github自述文件中进行了说明。
Now all that remains is getting this page to people. To do that, we need to add it to either uTorrent or BitTorrent, currently the only two officially supported clients for spreading Maelstrom sites.
现在剩下的就是将这个页面发布给人们。 为此,我们需要将其添加到uTorrent或BitTorrent中 , uTorrent或BitTorrent是目前仅有的两个官方支持的用于传播Maelstrom网站的客户端。
Note that you need to point the torrent to the location of the files, rather than your typical download location, so that it automatically enters seed mode.
请注意,您需要将torrent指向文件的位置,而不是通常的下载位置,以便它自动进入种子模式。
![02](https://i-blog.csdnimg.cn/blog_migrate/cf9e706296d9031fa47001904ca5f4f1.gif)
The website will be accessible once enough people have it downloaded. To speed this process up, you can send your friends the torrent file or its Magnet URI while you’re seeding it, and tell them to select “skip hash check” when adding it into their torrent client to speed things up – that way their client won’t wait to get 4 or more peers on board to verify the site’s contents hash before downloading it. This is unsafe in already popular torrents, but necessary when you’re just starting to spread yours. Note that this is only necessary if you want your friends to help you spread your site – visitors to the actual site through Maelstrom won’t have to add any torrents into their clients or select any options. They’ll be able to access it as usual.
一旦有足够的人下载,便可以访问该网站。 为了加快这一过程,您可以在种子文件发送时向您的朋友发送洪流文件或其磁力URI,并告诉他们在将其添加到洪流客户端中时选择“跳过哈希检查”以加快处理速度–这样,他们的客户将不会等到让4个或更多对等方加入后才能在下载网站之前验证该网站的内容哈希。 对于已经很流行的种子来说,这是不安全的,但是当您刚刚开始传播它们时,这是必须的。 请注意,只有在希望您的朋友帮助您扩展网站时才需要这样做-通过Maelstrom访问实际网站的访问者无需向他们的客户添加任何洪流或选择任何选项。 他们将能够照常访问它。
We can try to access the website through Maelstrom, using the link that generator.py
output for us: bittorrent://b1d5524d5ff428ccd50449691e1b740660b6a2de?dn=simplesite
. The docs say the magnet link magnet:?dn=simplesite&xt=urn%3Abtih%3Ab1d5524d5ff428ccd50449691e1b740660b6a2de
should work, too, but for me it didn’t work immediately – I had to wait until at least 4 people had become seeders of the site through uTorrent.
我们可以使用generator.py
为我们输出的链接尝试通过Maelstrom访问该网站: bittorrent://b1d5524d5ff428ccd50449691e1b740660b6a2de?dn=simplesite
。 文档说磁铁链接magnet:?dn=simplesite&xt=urn%3Abtih%3Ab1d5524d5ff428ccd50449691e1b740660b6a2de
应该起作用,但对我而言却无法立即起作用–我不得不等待至少4个人通过uTorrent成为该站点的播种者。
Again, note that Maelstrom works just like a regular client in that it also verifies the hash. Thus, it needs more than one or two seeders. To actually be able to access the site in your browser, you’ll have to spread it around somehow as noted above – ask a friend or two who have uTorrent installed to help you seed. After several people have begun seeding, the website should become publicly accessible.
同样,请注意,Maelstrom就像常规客户端一样工作,它还可以验证哈希。 因此,它需要一个或两个以上的播种机。 要实际上能够在浏览器中访问该网站,您必须如上所述以某种方式散布该网站–请一个或两个安装了uTorrent的朋友来帮助您播种。 几个人开始播种后,该网站应该可以公开访问。
结论 (Conclusion)
Is this a fad? Maybe, but only in as much as Bitcoin is. It all depends on people’s adoption rates.
这是一种时尚吗? 也许可以,但仅限于比特币。 这完全取决于人们的采用率。
One important thing to note is that Maelstrom is very useful for net neutrality. The government fatcats are already at work on new appeals to the recent net neutrality victory, but this approach would, at least for static websites, alleviate that concern – if we’re sharing websites among each other, they can pound on servers all they want – we’re not there.
需要注意的重要一件事是,漩涡对网络中立性非常有用。 政府的顽固分子已经开始努力争取最近的网络中立性胜利,但是这种方法至少对于静态网站而言,可以减轻这种担忧–如果我们彼此共享网站,它们可以在他们想要的所有服务器上运行–我们不在那里。
Have you tried Maelstrom? How do you feel about this project? Let us know!
你尝试过漩涡吗? 您对此项目有何感想? 让我们知道!
翻译自: https://www.sitepoint.com/bittorrents-maelstrom-using-torrents-host-websites/
bittorrent