Compare commits
10 Commits
3330afbd99
...
8a1410bd9b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8a1410bd9b | ||
|
|
f2101b1bfe | ||
|
|
80c3ba4c60 | ||
|
|
942b96071a | ||
|
|
adfeecb610 | ||
|
|
50083bfe65 | ||
|
|
7703b8009d | ||
|
|
818a0e8ef2 | ||
|
|
91356d4c77 | ||
|
|
0a4eb16c29 |
56
README.md
56
README.md
@ -1,48 +1,54 @@
|
||||
# FLO_Torrent
|
||||
FLO_Torrent is a decentralized platform for torrent storage with verification of uploader
|
||||
# FLO Torrent
|
||||
FLO Torrent is a decentralized platform for torrent storage with verification of the uploader
|
||||
|
||||
### Live URL for FLO Torrent:
|
||||
*https://ranchimall.github.io/flotorrent/*
|
||||
|
||||
## Mission statement
|
||||
The torrent technology is widely used by millions of people to share the files without the need for a centralized server.
|
||||
Torrent technology is widely used by millions of people to share files without the need for a centralized server.
|
||||
But yet, the torrent file itself is required to be stored in a website (server) for the users to spread the torrent.
|
||||
Thus its not completely decentralized and any torrent can be removed by the torrent website provider.
|
||||
Once a torrent is been removed from the torrent search websites, no client users can download that torrent anylonger.
|
||||
Hence it is required to store the torrent file in a decentralized medium so that no once can remove the torrent's existance.
|
||||
Thus it's not completely decentralized and any torrent can be removed by the torrent website provider.
|
||||
Once a torrent is been removed from the torrent search websites, no client users can download that torrent any longer.
|
||||
Hence it is required to store the torrent file in a decentralized medium so that no one can remove the torrent's existence.
|
||||
|
||||
This project allows the torrent uploader to permanently store the torrent file in the decentralized blockchain.
|
||||
Any torrent users can download the torrent files from the blockchain without the use of centralized server.
|
||||
Any torrent user can download torrent files from the blockchain without the use of a centralized server.
|
||||
|
||||
Since the Torrent file is stored in blockchain, no one can remove it from the blockchain.
|
||||
Thus any torrent file uploaded by users will be stored permantly and can be accessed by other users at anytime.
|
||||
Since the Torrent file is stored in the blockchain, no one can remove it from the blockchain.
|
||||
Thus any torrent file uploaded by users will be stored permanently and can be accessed by other users at any time.
|
||||
|
||||
Another issue is to prevent fake uploaders to use the name of reputed uploader to upload the torrent pretending to them.
|
||||
Another issue is to prevent fake uploaders to use the name of the reputed uploaders to upload the torrent pretending to be them.
|
||||
In the FLO Torrent Project, the FLO_ID is used to upload the torrent to the blockchain.
|
||||
Hence the transaction is verifed for the signature of the valid FLO_ID user and no fake uploaders can use the FLO_ID of reputed torrent uploaders
|
||||
Thus the uploader ID is verified as well as the idendity of the uploader is anonymous.
|
||||
Hence the transaction is verified for the signature of the valid FLO_ID user and no fake uploaders can use the FLO_ID of reputed torrent uploaders
|
||||
Thus the uploader ID is verified as well as the identity of the uploader is anonymous.
|
||||
|
||||
## Download torrent files
|
||||
1. Access the home page of the FLO Torrent app https://ranchimall.github.io/flotorrent/
|
||||
2. Search for the file (movies, music, documentary, games, etc)
|
||||
3. The user can also select the files listed in the home page
|
||||
4. Click on the "Get Torrent" button
|
||||
5. This will download the torrent file for the selected item
|
||||
6. Use a torrent client such as BitTorrent or µTorrent to open the downloaded torrent file
|
||||
7. For each torrent file, the indexed entry on the blockchain can be checked by clicking "see the index entry on blockchain" under the torrent file
|
||||
|
||||
|
||||
## FLO Torrent Uploader
|
||||
FLO_torrentUploader is used to upload the torrent file to the blockchain.
|
||||
FLO_torrentUploader is used to upload the torrent file to the blockchain.
|
||||
|
||||
### Requirements to Upload
|
||||
1. A valid FLO ID (Public Address and Private Key Pair)
|
||||
2. Minimal fee to upload the torrent (Scales with the file of the torrent file)
|
||||
3.
|
||||
### Instructions to Upload
|
||||
1. Open the `FLO_torrentUploader.html` in a Web Browser
|
||||
2. Enter Uploader's FLO_ID (FLO address)
|
||||
3. Browse/Select the torrent file from the local storage.
|
||||
4. Enter the Torrent name, type, description and tags in the respective fields
|
||||
4. Enter the Torrent name, type, description, and tags in the respective fields
|
||||
5. Click the `Upload torrent` button
|
||||
6. The balance of the FLO_ID and the fee required to upload the will be displayed in alert box.
|
||||
6. The balance of the FLO_ID and the fee required to upload will be displayed in the alert box.
|
||||
7. Confirm and Enter the Private key of the FLO_ID when prompted.
|
||||
8. The torrent file will be uploaded to the blockchain and the reference txid will be displayed.
|
||||
|
||||
## FLO Torrentz
|
||||
FLO_torrentz is used to view the list of torrents uploaded to the blockchain
|
||||
### Instructions
|
||||
1. Open the `FLO_Torrentz.html` in a web browser.
|
||||
2. The torrent list will be retrived from the blockchain using API and stored in IDB (local browser storage).
|
||||
3. Click on the Torrent which you wish to download. (The uploader FLO_ID will also be shown).
|
||||
4. The Torrent file will be retrived from the blockchain using API and then you can open/save the torrent file.
|
||||
5. Open the torrent file in any torrent client apps (such as Bittorrent) and download the files.
|
||||
|
||||
## Android
|
||||
Android users can directly download the FLO_Torrent.apk and Install the app.
|
||||
To download the apk : Click [View raw](https://github.com/ranchimall/FLO_Torrent/blob/master/FLO_Torrent.apk?raw=true)
|
||||
To download the apk: Click [View raw](https://github.com/ranchimall/FLO_Torrent/blob/master/FLO_Torrent.apk?raw=true)
|
||||
|
||||
23
css/main.css
23
css/main.css
@ -250,6 +250,10 @@ ul {
|
||||
grid-auto-flow: column;
|
||||
}
|
||||
|
||||
.gap-0-3 {
|
||||
gap: 0.3rem;
|
||||
}
|
||||
|
||||
.gap-0-5 {
|
||||
gap: 0.5rem;
|
||||
}
|
||||
@ -339,10 +343,12 @@ ul {
|
||||
}
|
||||
|
||||
.ripple {
|
||||
height: 8rem;
|
||||
width: 8rem;
|
||||
position: absolute;
|
||||
border-radius: 50%;
|
||||
transform: scale(0);
|
||||
background: rgba(var(--text-color), 0.16);
|
||||
background: radial-gradient(circle, rgba(var(--text-color), 0.3) 0%, rgba(0, 0, 0, 0) 50%);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
@ -559,7 +565,7 @@ theme-toggle {
|
||||
.torrent-container {
|
||||
padding: 1.5rem 0;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
|
||||
grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
|
||||
gap: 0.8rem;
|
||||
padding-bottom: 4rem;
|
||||
}
|
||||
@ -599,18 +605,23 @@ theme-toggle {
|
||||
}
|
||||
.torrent-card__tags, .torrent-card__uploader {
|
||||
font-size: 0.85rem;
|
||||
color: rgba(var(--text-color), 0.7);
|
||||
color: rgba(var(--text-color), 0.8);
|
||||
}
|
||||
.torrent-card__uploader {
|
||||
overflow-wrap: break-word;
|
||||
word-break: break-word;
|
||||
line-height: 1.5;
|
||||
margin-top: auto;
|
||||
padding-top: 0.5rem;
|
||||
font-size: 0.7rem;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
.torrent-card__download-button {
|
||||
background-color: rgba(var(--text-color), 0.1);
|
||||
margin-top: auto;
|
||||
margin: 1rem;
|
||||
transition: background-color 0.3s, color 0.3s;
|
||||
}
|
||||
.torrent-card__download-button:hover {
|
||||
background-color: var(--accent-color);
|
||||
color: rgba(var(--background-color), 1);
|
||||
}
|
||||
.torrent-card__download-button[data-collecting]::after {
|
||||
content: "";
|
||||
|
||||
2
css/main.min.css
vendored
2
css/main.min.css
vendored
File diff suppressed because one or more lines are too long
@ -215,6 +215,9 @@ ul {
|
||||
.flow-column {
|
||||
grid-auto-flow: column;
|
||||
}
|
||||
.gap-0-3 {
|
||||
gap: 0.3rem;
|
||||
}
|
||||
.gap-0-5 {
|
||||
gap: 0.5rem;
|
||||
}
|
||||
@ -282,10 +285,16 @@ ul {
|
||||
margin-right: 0.5rem;
|
||||
}
|
||||
.ripple {
|
||||
height: 8rem;
|
||||
width: 8rem;
|
||||
position: absolute;
|
||||
border-radius: 50%;
|
||||
transform: scale(0);
|
||||
background: rgba(var(--text-color), 0.16);
|
||||
background: radial-gradient(
|
||||
circle,
|
||||
rgba(var(--text-color), 0.3) 0%,
|
||||
rgba(0, 0, 0, 0) 50%
|
||||
);
|
||||
pointer-events: none;
|
||||
}
|
||||
.interact {
|
||||
@ -481,7 +490,7 @@ theme-toggle {
|
||||
.torrent-container {
|
||||
padding: 1.5rem 0;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
|
||||
grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
|
||||
gap: 0.8rem;
|
||||
padding-bottom: 4rem;
|
||||
}
|
||||
@ -520,18 +529,24 @@ theme-toggle {
|
||||
&__tags,
|
||||
&__uploader {
|
||||
font-size: 0.85rem;
|
||||
color: rgba(var(--text-color), 0.7);
|
||||
color: rgba(var(--text-color), 0.8);
|
||||
}
|
||||
&__uploader {
|
||||
overflow-wrap: break-word;
|
||||
word-break: break-word;
|
||||
line-height: 1.5;
|
||||
// line-height: 1.5;
|
||||
margin-top: auto;
|
||||
padding-top: 0.5rem;
|
||||
font-size: 0.7rem;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
&__download-button {
|
||||
background-color: rgba(var(--text-color), 0.1);
|
||||
margin-top: auto;
|
||||
margin: 1rem;
|
||||
transition: background-color 0.3s, color 0.3s;
|
||||
&:hover {
|
||||
background-color: var(--accent-color);
|
||||
color: rgba(var(--background-color), 1);
|
||||
}
|
||||
&[data-collecting] {
|
||||
&::after {
|
||||
content: "";
|
||||
|
||||
39
index.html
39
index.html
@ -18,7 +18,7 @@
|
||||
<script src="https://unpkg.com/uhtml@3.0.1/es.js"></script>
|
||||
</head>
|
||||
|
||||
<body data-theme="">
|
||||
<body class="hidden">
|
||||
<sm-notifications id="notification_drawer"></sm-notifications>
|
||||
<sm-popup id="confirmation_popup">
|
||||
<h4 id="confirm_title"></h4>
|
||||
@ -163,22 +163,21 @@
|
||||
<sm-chips id="page_selector"></sm-chips>
|
||||
</section>
|
||||
<section id="how_it_works" class="page hidden page-layout">
|
||||
<h1 class="page__title">How it works?</h1>
|
||||
<h1 class="page__title">How does it work? </h1>
|
||||
<p>FLO Torrent stores torrent files directly on the FLO blockchain making it completely decentralized. But
|
||||
this approach came with some challenges.</p>
|
||||
this approach comes with some challenges.
|
||||
</p>
|
||||
<section class="info-section">
|
||||
<object class="info__image" data="assets/torrent-vs-flo-tx.svg" type="image/svg+xml"></object>
|
||||
<div class="textual-info">
|
||||
<h2 class="info__title h2">The problem</h2>
|
||||
<p>
|
||||
The maximum number of free characters that can be stored in a FLO blockchain transaction is
|
||||
1040.
|
||||
But torrents are typically 20,000 characters each.
|
||||
Only 1040 free characters can be stored in a FLO blockchain transaction, but torrents are
|
||||
typically 20,000 characters each.
|
||||
</p>
|
||||
<p>
|
||||
So, we need to first design a way to split the torrent into smaller segments and find a way to
|
||||
link them inside the blockchain.
|
||||
|
||||
Therefore, we had to first design a way to split the torrent into smaller segments and find a
|
||||
way to link them inside the blockchain.
|
||||
</p>
|
||||
</div>
|
||||
</section>
|
||||
@ -820,6 +819,7 @@
|
||||
}
|
||||
|
||||
window.addEventListener("load", () => {
|
||||
document.body.classList.remove('hidden')
|
||||
document.addEventListener("keyup", (e) => {
|
||||
});
|
||||
document.addEventListener("pointerdown", (e) => {
|
||||
@ -840,12 +840,12 @@
|
||||
const rippleAnimation = circle.animate(
|
||||
[
|
||||
{
|
||||
transform: "scale(3)",
|
||||
transform: "scale(4)",
|
||||
opacity: 0,
|
||||
},
|
||||
],
|
||||
{
|
||||
duration: 1000,
|
||||
duration: uiGlobals.prefersReducedMotion ? 0 : 600,
|
||||
fill: "forwards",
|
||||
easing: "ease-out",
|
||||
}
|
||||
@ -911,13 +911,18 @@
|
||||
const icon = new DOMParser().parseFromString(getIcon(type), 'image/svg+xml').querySelector('svg')
|
||||
// remove extension from filename
|
||||
filename = filename.split('.').slice(0, -1).join('.')
|
||||
const btcAddress = btcOperator.convert.legacy2bech(uploader)
|
||||
return html`
|
||||
<li id=${id} class="torrent-card">
|
||||
<a class="torrent-info grid" href=${`#/torrent/${id}`}>
|
||||
<div class="torrent-card__icon torrent-type-icon">${icon}</div>
|
||||
<h3 class="torrent-card__title">${filename}</h3>
|
||||
<h3 class="torrent-card__title breakable">${filename}</h3>
|
||||
<p class="torrent-card__tags">${tags.replace(/[\/,]/g, ' • ')}</p>
|
||||
<span class="torrent-card__uploader">${`by ${uploader}`}</span>
|
||||
<div class="torrent-card__uploader grid breakable">
|
||||
Uploaded by
|
||||
<span>FLO address: ${uploader}</span>
|
||||
<span>Equivalent BTC address: ${btcAddress}</span>
|
||||
</div>
|
||||
</a>
|
||||
<button class="torrent-card__download-button">
|
||||
Get Torrent
|
||||
@ -1094,9 +1099,9 @@
|
||||
getRef('torrent_uploader').innerHTML = `
|
||||
Uploaded by
|
||||
<span>FLO address: ${uploader}</span>
|
||||
<span>(BTC address: ${btcAddress})</span>
|
||||
<span>Equivalent BTC address: ${btcAddress}</span>
|
||||
`;
|
||||
getRef('torrent_index_tx').href = `https://flosight.duckdns.org/tx/${startTx}`
|
||||
getRef('torrent_index_tx').href = `https://blockbook.ranchimall.net/tx/${startTx}`
|
||||
getRef('search_torrent').value = ''
|
||||
renderElem(getRef('search_suggestions'), html``)
|
||||
break;
|
||||
@ -1175,6 +1180,10 @@
|
||||
}
|
||||
|
||||
async function renderSearchSuggestions(searchKey, advance = false) {
|
||||
if (searchKey.trim() === '') {
|
||||
renderElem(getRef('search_suggestions'), html``)
|
||||
return
|
||||
}
|
||||
const result = await getFilteredTorrents(['name', 'filename'], searchKey, { limit: 6 })
|
||||
const suggestions = result.map(elem => {
|
||||
const regEx = new RegExp(`(${searchKey})`, 'gi')
|
||||
|
||||
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user