-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #145 from StarfilesFileSharing/alpha
Alpha
- Loading branch information
Showing
16 changed files
with
115 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
# Why Use Hydrafiles Instead of Tor, Bit/WebTorrent, and I2P? | ||
|
||
Hydrafiles was originally designed to replace the traditional client-server relationship when serving files with a peer to peer relationship. | ||
|
||
The problem aimed to solve originally was allowing websites and applications to distribute static files via traditional HTTP rails with privacy and P2P redundancy. Standard BitTorrent can't be used on the web, and WebTorrent comes with many limitations such as a WebRTC dependency and requiring browsers to run JavaScript to download content. | ||
The problem aimed to solve originally was allowing websites and applications to distribute static files via traditional HTTP rails with privacy and P2P redundancy. Standard BitTorrent can't be used on the web, and WebTorrent comes with many | ||
limitations such as a WebRTC dependency and requiring browsers to run JavaScript to download content. | ||
|
||
As of v0.4.0, Hydrafiles now allows nodes to run APIs/backends through the network, using Hydrafiles as a reverse proxy to preserve privacy over vanilla HTTP. This opens up the discussion of, why Hydrafiles over Tor or I2P? | ||
|
||
Let's start with a privacy comparison. With Tor & I2P, if you control x% of the network, you have y% probability of deducing the origin of content. With Hydrafiles, you must control all but one node, to know what he is doing. Even if you control 90% of the network, you don't know where content originates from, just that it came from that 10%. This arguably makes Hydrafiles less traceable than Tor & I2P. | ||
Let's start with a privacy comparison. With Tor & I2P, if you control x% of the network, you have y% probability of deducing the origin of content. With Hydrafiles, you must control all but one node, to know what he is doing. Even if you | ||
control 90% of the network, you don't know where content originates from, just that it came from that 10%. This arguably makes Hydrafiles less traceable than Tor & I2P. | ||
|
||
Next is availability/accessibility. Same as BitTorrent, with Tor & I2P, your users need special software to access the network and retrieve content. With Hydrafiles, clients can leech from the network using normal HTTP requests, optionally running a full node to validate or contribute to the network. | ||
Next is availability/accessibility. Same as BitTorrent, with Tor & I2P, your users need special software to access the network and retrieve content. With Hydrafiles, clients can leech from the network using normal HTTP requests, optionally | ||
running a full node to validate or contribute to the network. | ||
|
||
Finally, there is user privacy. Hydrafiles does not provide any user privacy. Hydrafiles is intended for anonymous distribution of content. It is your users (and your) responsibility to protect their identity if needed. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,24 @@ | ||
## What is a web/full node? | ||
|
||
- **Web nodes** run in your browser. Websites can import the Hydrafiles library and run a web node in your browser. | ||
- **Full nodes** run on your computer like actual applications. | ||
|
||
## Differences | ||
|
||
The browser environment is sandboxed, forcing Hydrafiles to implement some **hacky** solutions. Many of the basic features available to full nodes are impossible normally in browsers. | ||
|
||
The core differences include: | ||
- **No Ports:** Before v0.6, Hydrafiles ran purely on HTTP. All peers were required to run an HTTP server to contribute to the network (seed). As of v0.6, Hydrafiles now supports WebRTC. Hydrafiles full nodes still support HTTP, but both now support WebRTC. This allows for web nodes to contribute to the network (and anonymity-set). Full nodes now also host a WebSocket room to in-house signalling. | ||
|
||
- **No Ports:** Before v0.6, Hydrafiles ran purely on HTTP. All peers were required to run an HTTP server to contribute to the network (seed). As of v0.6, Hydrafiles now supports WebRTC. Hydrafiles full nodes still support HTTP, but both | ||
now support WebRTC. This allows for web nodes to contribute to the network (and anonymity-set). Full nodes now also host a WebSocket room to in-house signalling. | ||
- **No SQLite:** Hydrafiles uses SQLite. SQLite is not supported in browsers. There is also no modern implementation of SQL in the web either. Web nodes now use IndexedDB as the database. | ||
- **No File System:** Websites are unable to access your filesystem. Modern browsers are starting to support FileSystem API, which solves this. But [support is lackluster](https://caniuse.com/?search=showDirectoryPicker) with only chromium-based desktop browsers supporting it. To solve this, we have implemented a virtual file system. Web nodes wraps IndexedDB to make it act like a file system, treating each file write as a row insert, and file read as a row read. | ||
- **No File System:** Websites are unable to access your filesystem. Modern browsers are starting to support FileSystem API, which solves this. But [support is lackluster](https://caniuse.com/?search=showDirectoryPicker) with only | ||
chromium-based desktop browsers supporting it. To solve this, we have implemented a virtual file system. Web nodes wraps IndexedDB to make it act like a file system, treating each file write as a row insert, and file read as a row read. | ||
|
||
| Feature | Full Node | Web Node | | ||
|-------------|-------------|----------------------------------------| | ||
| ----------- | ----------- | -------------------------------------- | | ||
| WebRTC | Seed+Leech | Seed+Leech | | ||
| HTTP | Seed+Leech | Leech Only | | ||
| WebSocket | Seed+Leech | Leech Only | | ||
| Database | SQLite | IndexedDB | | ||
| File System | File System | FileSystem API (or IndexedDB Fallback) | | ||
| File System | File System | FileSystem API (or IndexedDB Fallback) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
# Indexing | ||
|
||
Hydrafiles allows for files in the network to be indexed (searchable). | ||
|
||
Each peer keeps a list of all files it knows about, identified by their hashes. Whenever a peer discovers (or adds) a file, it is added to their list. | ||
|
||
File lists are exchanged between peers periodically. When a peer receives a file list, it will check for specific metadata/columns to add/replace for existing files, as well as new files to add to the list. | ||
|
||
To know how to approximate the importance/relevance of a file, see "Hash Counting". | ||
To know how to approximate the importance/relevance of a file, see "Hash Counting". |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.