Serverless static site using IPFS
3r3208. TL; DR [/b] : IPFS allows you to host static sites on a distributed basis, which can be accessed through public caching gates (transparent reverse proxies) on the Internet, without having to install a program for a visitor. Such sites can be distributed without a routable (“white”) static IP address (will work for NAT), they remain operational with a short-term (several hours) absence of distributors, due to the cache on the gates. You can optionally bind your domain to gates, and you can add DNS records to several gates at the same time, to increase reliability and load balancing. The site can download other IPFS users and help with the distribution.
IPFS is great for static blogs, simple websites, file archives (as a Bittorrent replacement), and also just for the one-time transfer of large files without first uploading them to any service.
What is IPFS?IPFS is a decentralized peer-to-peer file transfer system, similar in principle to BitTorrent, but with access via HTTP, for the Web. All files downloaded by the user are temporarily cached by the IPFS daemon and distributed to other users requesting them. Important files can be “attached” (pin) to the IPFS daemon, then they will not disappear from the cache. 3r314.
Files added to IPFS receive global hash identifiers that do not change when the file is added again. Addressing in the network is carried out on 3r3188. Content IDs (CID)
, inside which contains 3r320. multihash
. In the context of IPFS, they indicate a non-changing or changing file, directory, metadata, or symlink.
At the moment of development, the project fully works only with static data, but there is already experimental support for the publisher-subscriber protocol (publish /subscribe), as well as the jаvascript implementation of IPFS running in a browser, which in the long run will allow creating dynamic sites (for example, blogs with comments) with the ability to interact in real time (for example, chats).
One of the major advantages of IPFS in comparison with other similar technologies is access to resources from the Internet through gates that are installed by companies and technology enthusiasts. They allow you to browse sites and download files without installing IPFS on your computer. The biggest gate is 3r330. from Cloudflare
It also allows you to issue a free HTTPS certificate for a domain.
Why do I need IPFS, and where to use it?The network allows to distribute and download data efficiently, distributedly and decently, including from the browser. I see the following real project uses:
3r? 3175. Free homeless hosting of static websites on a home computer, without a dedicated IP address (for NAT), without a domain or with a domain; 3r3176.
3r? 3175. Non-censored hosting of high-risk sites that may be blocked by the state or by third-party companies within the DMCA; 3r3176.
3r? 3175. Distribution of periodically changing or adding data that cannot be efficiently distributed through Bittorrent (you will have to constantly re-create a torrent file and ask all distributors to download it again, which leads to fragmentation of the seed); 3r3176.
3r? 3175. An alternative to a CDN that does not require configuration on the “CDN provider” side. 3r3176.
How to create a site in IPFS?It is easier than with regular hosting! Consider homeless hosting a simple static site.
3r3208. The easiest option [/b] - using the graphical utility Siderus Orion .
Install the utility, launch it, click File → Add Directory, select the directory with the site files.
After some time, a window will appear with the information of the imported content: 3r33239.
Go to the “Files” tab, right-click on the hash → Open in browser:
If everything was done correctly, the site will open through the gate siderus.com:
This is all, your static site is available to other users, while you keep the program running, or while it remains in the gate cache.
3r3208. Alternative console version [/b] - Download the official client 3r3103. go-ipfs
, unpack, initialize and run as written on the website 3r33242. :
Next, add our directory with the site files:
ipfs add -r ./www.uncleoutrage.com
added QmXdaairbPoSGV98sQ3GsEuevVTE1EBUzZ4PhbLfKVh1nX www.uncleoutrage.com/images/fanart
added QmdFbHdzzB4qBBkn8UsyHnjg1BKEtm9d5LaTyv5aZd8bbE www.uncleoutrage.com/images/gigs/thumbs
added QmVPJ3Mr8gZL5x15A9XARC1uHASqb2JMsKTT7mWs37UmBo www.uncleoutrage.com/images/gigs
added Qmd3AbVwMVE9W6ZSEuax96Xnymbnic4XVCdNEKBPZcWi5c www.uncleoutrage.com/images/live/thumbs
added QmebUfmT2wmZMbJcAmSMS4cZJr4guTqV67xNJ3hiQGsLYx www.uncleoutrage.com/images/live
added QmaEVaRiUUXfDnjjuXHGGsg7jDaFrCaxS7wi6q83q4N1uu www.uncleoutrage.com/images/misc/thumbs
added QmW2ZivQF5eh5LHSLet298AhKCHiQsFV6rvUFvMcCkLopo www.uncleoutrage.com/images/misc
added QmZXXn7abBvj7SvYJoYMAXUeajP6A1UABKENrNwuhKqofk www.uncleoutrage.com/images/promo/thumbs
added Qmcx6bMKur4Anzh91bJC6o5vMPftzocSMmd7iYxoGwQrNX www.uncleoutrage.com/images/promo
added QmW8P3ZnvKUytCWJF6y6wvBD8XAkk4bvJoVK8j3apokzLS www.uncleoutrage.com/images
added QmXG1QjfpCjErQBGZvF6VWBryXe9WFLPqhrsGWtikACVwR www.uncleoutrage.com/js
added QmYGXwLJBnqXwWYGKVtjZtmwncgwNoqNmnYqo1NTinTGBp www.uncleoutrage.com/theband/misc/pages
added QmWg4JyZ4ox9hcHt6JGBfzUm5CqWsb6DixUksamFvbirH4 www.uncleoutrage.com/theband/misc
added QmPtn9XBhWqe7A1z3ikktWExSPSM27LTzUL3US9N5xcAPB www.uncleoutrage.com/theband/redsaug21/pages
added QmaGV6kfLdL1bKGBBHYJLDVstiejAANayBZt16NMF9g9j9 www.uncleoutrage.com/theband/redsaug21
added QmScmcUAdC5pinMxaoLuXSy3FDUAX5E68dADnGjYZbPUiY www.uncleoutrage.com/theband
added QmU8rJjkXbfkPqEE3Dr8GiUMKF1vPnnNUKWdaB5DsZDfJ7 www.uncleoutrage.com
The last hash is the directory hash, and we need it.
We make a link to open the directory via the gate manually, like:
https: //domain /ipfs /hash
For example: 3r33939.
How to bind an IPFS hash to a domain?To make a website accessible by domain https://uncleoutrage.com/ and not on a long and ugly link, you need to add several DNS records:
3r? 3175. A and AAAA records pointing to the gateway IP address, or CNAME record pointing to the gateway's domain name; 3r3176.
3r? 3175. TXT-record "_dnslink", with the contents of the form "dnslink = /ipfs /HASH". 3r3176.
In my case, I added A and AAAA records pointing to the IP addresses of cloudflare-ipfs.com, and the TXT record "_dnslink.uncleoutrage.com":
uncleoutrage.com. IN A ???.167
uncleoutrage.com. IN A ???.167
uncleoutrage.com. IN AAAA 2400: cb00: 2048: 1 :: 6812: fda7
uncleoutrage.com. IN AAAA 2400: cb00: 2048: 1 :: 6812: 40a8
_dnslink.uncleoutrage.com. IN TXT "dnslink = /ipfs /QmU8rJjkXbfkPqEE3Dr8GiUMKF1vPnnNUKWdaB5DsZDfJ7"
You can get an HTTPS certificate for an associated domain from Cloudflare, you need to request it for A special certificate receipt page .
If you do not need HTTPS support, you can add several A /AAAA records to different gates at once, the current list of working gates is available 3r3197. on the project forum 3r33242. .
In the case of updating the site, you will have to update the TXT-domain record.
How not to update TXT-record when updating the site?IPFS allows you to generate a special static hash identifier that points to a changing hash - IP 3r3208. N [/b] S . In the graphical client, it is enough to click File → Publish to IPNS, and indicate in the link or in the TXT records of the domain your peer ID, and not the hash obtained when adding the directory. For example: 3r33939.
However, the IPNS record needs to be updated (published) every few hours manually, and they are much slower /rezolvitsya /ipfs /.
Conclusion 3r32424. If you want to learn more about IPFS, read 3r33232. cycle of excellent articles 3-33242. ivan386 . They are geeky, and they almost do not tell why an ordinary person might need IPFS (otherwise this article would not exist).
Do you want to help in the distribution of IPFS-sites, or to be informed that the domain is bound to an IPFS-gate? Install a browser add-on (for Firefox , For Chrome ), Redirecting IPFS sites to your local node.
Anti-ban For several months, he has been distributing a terabyte of PAC files per day via IPFS, using the Gateflare gate. It works stably, significantly saves server traffic.
It may be interesting
With deadlines getting tighter and closer together, and the constant onslaught of assignment after assignment, sometimes, it can feel like life is passing you by. That the world is moving on without you. You might find yourself sitting at your desk night after night trying to keep up with your workload, and wondering when you will ever have a life outside of your dorm room again.
Our essay writing service will be glad to assist you with academic or business writing. https://payforessay.net/buy-essay
Brilliant stuff! this is to an awesome degree a bearable article I am telling you a quick outcome of this website check and more information.
Jaipur Escorts || Jaipur Escort || Escorts in Jaipur || Escort in Jaipur || Jaipur Escorts Service || Set 4