Kumi
2394a9f6ee
- Added `helmet` middleware for enhanced security with CSP. - Integrated `dotenv` for configuration management. - Added validation and error handling for mnemonic and infoHash. - Improved error handling in TURN credentials generation. - Enhanced notification and progress feedback for file sharing. - Added tracker server config validation and error handling. - Updated dependencies to include `helmet` and `dotenv`. These changes improve the app's security, robustness, and user experience.
76 lines
3 KiB
Text
76 lines
3 KiB
Text
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Transfer.coffee</title>
|
|
<link rel="stylesheet" href="/css/style.css" />
|
|
<script src="dist/js/webtorrent.min.js"></script>
|
|
<link rel="icon" type="image/png" href="/img/logo.png" />
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<header>
|
|
<a href="/" class="home"
|
|
><img src="/img/logo.png" alt="Transfer.coffee Logo" class="logo"
|
|
/></a>
|
|
<a href="/"><h1>Transfer.coffee</h1></a>
|
|
</header>
|
|
<div class="section" id="intro">
|
|
<p>
|
|
Transfer.coffee is a simple way to share files between devices. Just
|
|
select a file and share the generated URL with the recipient. The
|
|
recipient can then download the file by entering the mnemonic.
|
|
</p>
|
|
<p>
|
|
The files are shared using WebTorrent, a peer-to-peer file sharing
|
|
protocol. This means that the file is not stored on a central server
|
|
and is instead shared directly between the sender and the recipient.
|
|
</p>
|
|
</div>
|
|
<div class="section" id="uploadSection">
|
|
<h2>Share File</h2>
|
|
<input type="file" id="fileInput" />
|
|
<button id="uploadButton">Share</button>
|
|
<div class="result" id="uploadResult"></div>
|
|
<div class="result" id="uploadStats"></div>
|
|
<button
|
|
id="copyButton"
|
|
style="display: none"
|
|
>
|
|
Copy URL
|
|
</button>
|
|
</div>
|
|
<div class="section" id="downloadSection">
|
|
<h2>Receive File</h2>
|
|
<input type="text" id="mnemonicInput" placeholder="Enter mnemonic" />
|
|
<button id="downloadButton">Receive</button>
|
|
<div class="progress" id="downloadProgress">
|
|
<div class="progress-bar" id="downloadProgressBar">0%</div>
|
|
</div>
|
|
<div class="result" id="downloadResult"></div>
|
|
<div class="result" id="downloadStats"></div>
|
|
</div>
|
|
<div class="section" id="footer">
|
|
<h2>About</h2>
|
|
<p>
|
|
All files are transferred using WebTorrent. This means that the file
|
|
is not stored on a central server and is instead shared directly
|
|
between the sender and the recipient. Note that this means that the IP
|
|
addresses of the sender and recipient may be exposed to each other.
|
|
Files are only available for download as long as someone is seeding
|
|
them, i.e. as long as someone with a full copy of the file keeps the
|
|
page open.
|
|
</p>
|
|
<p>
|
|
Transfer.coffee is an open source project by
|
|
<a href="https://private.coffee">Private.coffee</a>. You can view the
|
|
source code on
|
|
<a href="https://git.private.coffee/PrivateCoffee/transfer.coffee">
|
|
Private.coffee Git</a
|
|
>.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
<div id="config" data-tracker-url="<%= trackerUrl %>" data-mnemonic="<%= mnemonic %>" style="display: none;"></div>
|
|
<script src="/js/index.js"></script>
|
|
</body>
|
|
</html>
|