Try the IPFS protocol – the pioneer of the Web 3.0 era.

Original link: http://weepingdogel.github.io/posts/%E8%AF%95%E7%8E%A9ipfs/

Ipfs-logo-1024-ice-text.png

This logo is so pretty.

What is IPFS?

IPFS (InterPlanetary File System) , it sounds like a file system by the name? The translation is Interstellar File System, doesn’t it sound very advanced?

In fact, it can achieve more powerful functions than the file system.

official description
IPFS is a collection of protocols, packages, and specifications that allow computers to send and receive data. Because of this, users can pick and choose which packages to install when using IPFS. And like shoe sizes, there is no one-size-fits -all solution. A developer building network applications will install a different set of tools than someone who wants to store files on IPFS. Pick the one that best suits what you’re here to do.

If you can understand English, it is easy to understand what it is. If you can’t understand it, you can translate it.

IPFS is a collection of protocols, packages, and specifications that allow computers to send and receive data. Therefore, users can choose which packages to install when using IPFS. Like shoe size, there is no one-size-fits-all solution. Developers building web applications will install a different set of tools than people who want to store files on IPFS. Choose what works best for you here.
(Google Translate)

In fact, its principle is similar to BT, and it has a decentralized nature, which may accelerate the process from the Web2.0 era to the Web3.0 era.

It may take the lead in subverting all the development logic in the previous Web2.0 era. Because this is a lower-level protocol than http, it is not only as simple as allowing you to download good health through BT, but it also allows all information to be transmitted in a decentralized manner.

So I’m very interested in it, and I’ll play it today.

How can I play?

For me, who is so good at the moment, I can try the gameplay written in the official document first, 233.

Install

I have to install IPFS first before everything starts.

We can choose from a variety of installation options.

Read the Install section of the official IPFS documentation

Desktop users (such as Windows, Mac, Linux) can use IPFS Desktop, which can be installed and configured by reading the tutorials in the official documentation. Also available for Linux

However, Arch requires aur to install the ipfs-desktop package, so I decided to install the command line version of ipfs.

Tutorial according to the official documentation

We need to download a package called kubo with wget :

  1. Download the Linux binary from dist.ipfs.tech (opens new window).
 1
 wget https://dist.ipfs.tech/kubo/v0.14.0/kubo_v0.14.0_linux-amd64.tar.gz

Then you have to perform a series of tedious operations such as decompression and copying files. However, if we use Arch, don’t eat this set. Because our official warehouse has this package

Open your terminal and use pacman to find this package:

 1
 sudo pacman -Ss kubo

Your terminal will then return something similar to this:

 1 2
 community/kubo 0.14.0-1 A peer-to-peer hypermedia distribution protocol

Put it on and you’re done!

 1
 sudo pacman -S kubo

Then we can happily use ipfs, haha! That’s the advantage of our Arch users! ! !

Then we start to deploy ipfs and use our own machine as the node of ipfs~!

 1
 ipfs init
 1
 ipfs daemon

Next we open the WebUI with the Brave browser: https://ift.tt/E0o5L9a

Then you can see this interface:

Isn’t it super easy!

In addition, it is recommended to use the brave browser to access IPFS services, after all, it supports IPFS gateways natively!

file transfer

In the current Web 2.0 mode, we must transfer files through the commercial network disks of some large companies, and the transfer speed and storage space will be limited to a certain extent.

Using IPFS to transfer files does not suffer from these restrictions, in addition to avoiding a large part of censorship.

Transferring files using IPFS is also very simple, just use the WebUI to operate.

First click on “File”:

Then click Import in the upper right corner:

The sender of the file can click the文件or文件夹to import the file to be shared. At this time, the browser will automatically pop up the directory selector that comes with the system or DE, and just find the file to be shared.

Then click the three dots to the right of the corresponding file:

Select复制CID and send the CID to the recipient.

The recipient clicks来自IPFS 路径.

Copy and paste the CID to import it into the WebUI’s file list.

Graphical operation is very simple.

I randomly found a few files and tested it, and the transfer speed is amazing when the nodes are close.

In the case of long distance, the speed is slightly inferior, but very stable. At least it’s much faster than some commercial network disks, and it’s free.

Web page

IPFS can also be used to display web pages, and it is very simple!

Here is a simple way to play.

First write an HTML file.

 1 2 3 4 5 6 7 8 9 10
 <!DOCTYPE html> < html > < head > < meta charset = "utf-8" > < title > Hello! IPFS! </ title > </ head > < body > < h1 style = "font-size: 100px;" > Hello! IPFS!! </ h1 > </ body > </ html >

Save, import index.html into your IPFS node in the same way as file transfer.

Next, click the three dots on the far right of the file as well. The difference is that this time we want to click the first button to分享链接.

Then use the Brave browser to access the link directly.

The page was successfully opened, and at this time we found that the protocol written at the beginning of the address bar was neither HTTP nor HTTPS, but ipfs://

It can be seen that this webpage is opened through the IPFS protocol:

A website established by a peer-to-peer protocol like this can effectively avoid censorship, and the content will be richer.

What are the implications for the future?

At present, IPFS nodes and users are relatively few, and it is still in an unpopular stage.

But through my trial play, it can be seen that IPFS is very good in terms of file transfer and web page construction.

The only thing I want to say is,

In the current situation of less than 1,000 nodes in the world, the slowest and slowest download speed can be stable at about 1MB/s, while the download speed of a commercial network disk has been operating for more than ten years, but the download speed is only 9kb/s.

I really can’t think of any other reason to reject the embrace of IPFS.

Maybe one day IPFS can become popular and the number of nodes can increase to 7 billion. At that time, the acquisition and sharing of resources will be more free and efficient.

In addition, if IPFS is used to do things that better meet the needs, everything will be decentralized, which will deal a heavy blow to the giants in the Web 2.0 era.

What are you still thinking, hurry up and try to build an IPFS node locally? Maybe you want to do some interesting work with IPFS? Leave a message in the comments section.

Reference link

This article is reprinted from: http://weepingdogel.github.io/posts/%E8%AF%95%E7%8E%A9ipfs/
This site is for inclusion only, and the copyright belongs to the original author.

Leave a Comment