Skip to content
This repository has been archived by the owner on Dec 16, 2021. It is now read-only.

Use IPFS to circumvent Discord file restrictions #161

Closed
n4n0GH opened this issue Oct 5, 2019 · 0 comments
Closed

Use IPFS to circumvent Discord file restrictions #161

n4n0GH opened this issue Oct 5, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@n4n0GH
Copy link

n4n0GH commented Oct 5, 2019

What do you want

Like we talked before; using an external provider for file uploads would enable users to circumvent the restrictions that Discord has on file uploads.
I would like to use IPFS for that.

What is IPFS?

IPFS, an abbreviation for "InterPlanetary File System" is a self described peer-to-peer hypermedia protocol to make the web faster, safer, and more open.
It relies on users operating so called nodes to distribute server load and content storage across multiple machines with a certain level of redundancy.
Nodes will keep stored content as long as the node has the content "pinned". If the content gets unpinned it will be purged from the node once no more requests for that content are made to preserve storage space. Users can set up their own nodes and require them to replicate data from another node they specify. That way a network can be established with redundancy and low latency connections.
Users can interact with IPFS either through the use of a command line interface, desltop or mobile applications, or by using a web interface.
More on IPFS can be read in their whitepaper as well as in their documentation

Content distribution

TL;DR content is located on a single IPFS node. However, the pointer to that file which is a Base58 encoded hash with two additionaly bytes that declare the hashing algorithm as well as some other parameters, is written to a distributed hash table, which other nodes use to look up files should they themselve not have the requested file.
A node can either replicate the file a user requested and host it on it's own storage, or just forward the request. That behaviour can be decided by the operator of the node.
Depending on the node's connection speed, the serving of a requested file can be as quick as you'd expect from a bigshot CDN, or very slow. This is something to consider.

Why

Users could share anything they wanted to share, regardless of filesize or -type.

Implementation hints

Files stored on IPFS are not private by default, nor are they encrypted. A mechanic to encrypt and decrypt the files on the fly needs to be put in place to protect users from accidentally hosting highly questionable material, should someone start trolling the network.
IPFS has a lot of GOLANG libraries available so an integration with the current codebase should be a feasible approach.
However, users would have to host their own nodes, which requires additional setup. I'm fairly sure that people using cordless are a level above tech-illiterates, but to get nodes fully running can still be a daunting task for many. So this is something to consider as well.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants