Internet censorship is the control or suppression of what can be accessed, published, or viewed on the Internet.
I believe in a free and open internet and to help keep it that we're going to learn how to deploy a censorship resistant static website in just a few minutes with a few free tools.
To achieve censorship resistance we're going to use IPFS (Interplanetary File System) a distributed system for storing and accessing files, websites, and data.
You can run your own IPFS node to increase the strength of the network and store your own files but for this tutorial we're going to use a free service to manage our content and more importantly manage our pinned content.
IPFS nodes treat the data they store like a cache, meaning that there is no guarantee that the data will continue to be stored. Pinning tells an IPFS server that the data is important and mustnβt be thrown away.
I'm a fan of using https://pinata.cloud, once you've made an account, select upload and you'll be presented with something like below.
Notice "Upload Directory" is selected and "Preserve directory name" is not checked. Select the directory of your site contents and upload them. Once uploaded, select "Pin Explorer" from the nav menu.
Using the hash provided by IPFS, we now have the address of our deployed directory. In the case of the screenshot above my content is stored at hash QmdFWa8PEruGXistCu8MFRwb2bncH2xAYx34nYqEBaxaVk
. Using a public IPFS gateway we can see the content at the hash address. Here is a list of public gateways and their status'.
https://ipfs.io/ipfs/QmdFWa8PEruGXistCu8MFRwb2bncH2xAYx34nYqEBaxaVk/
It may take a few minutes for the data to propagate through the network but you now have a censorship resistant website!
Enjoyed the post? Let me know! ππ¦π
Top comments (9)
First time I hear about IPFS π² excuse my ignorance, but what happens if internet providers decide to block IPFS gateways -- I imagine it's possible to have a list of the hashes offline (albeit the offline list would be huge).
You can run your own IPFS node which will connect you to the network. You can setup your own IPFS gateway and make that public as well.
IPFS is the future! It can be quite slow if you don't have your own server though. Have you checked out Arweave? It's adding an incentive layer on the top of IFPS.
I havent! I'll take a look. Im not a big fan of incentive layers, if there is no inherent incentive, an extra bolt on layer wont fix it.
Sounds pretty slick!
So an IPFS gateway is the link between IPFS and HTTP?
Do they provide a way to use a custom domain?
There are domain providers, and some tools out there to use custom CRYPTO domains (.eth .zil).
You can always use a domain redirect with a standard DNS provider to point to a IPFS GW address.
In my situation I setup a subdomain (d.jasonschorr.com) that points to ipfs.io/ipfs/
Really nice, I want to study this. Thanks for sharing!
Thanks for the feedback! You're welcome!
Cool. Would be nice if you had explained how IPFS ensures censorship resistance.