No description
Find a file
Kumi e896a3f37d
fix: Update UI text for file sharing and receiving
Clarifies that users can share or receive multiple files
by updating section headers to "File(s)".

Enhances user understanding of multi-file capabilities.
2024-12-18 18:22:24 +01:00
contrib docs: add instructions for systemd service setup 2024-08-02 20:37:14 +02:00
public feat: Add support for multiple file transfers 2024-12-18 17:13:43 +01:00
views fix: Update UI text for file sharing and receiving 2024-12-18 18:22:24 +01:00
.gitattributes refactor: reorganize assets to dist directory 2024-06-15 16:44:42 +02:00
.gitignore feat: add STUN/TURN server support and environment config 2024-06-14 18:32:51 +02:00
app.js feat: improve security and error handling in app 2024-06-24 10:40:32 +02:00
LICENSE docs: add LICENSE and README files 2024-06-14 18:59:32 +02:00
package-lock.json chore: Update dependencies and package metadata 2024-12-18 17:19:09 +01:00
package.json feat: Add support for multiple file transfers 2024-12-18 17:13:43 +01:00
README.md feat: Add support for multiple file transfers 2024-12-18 17:13:43 +01:00
tracker.js feat: improve security and error handling in app 2024-06-24 10:40:32 +02:00

Transfer.coffee

Support Private.coffee! Matrix Latest Git Commit

Transfer.coffee Logo

Transfer.coffee is a simple Node.js web application that allows users to share files using WebTorrent. Users can upload files, generate mnemonic seeds, and share these seeds with others to download the files directly via peer-to-peer connections. The application supports optional configuration of STUN and TURN servers to facilitate NAT traversal.

Features

  • Peer-to-peer file sharing using WebTorrent
  • Transfer multiple files at once
  • Mnemonic seed generation for easy file sharing
  • Optional STUN and TURN server configuration for NAT traversal
  • Progress indicators for file upload and download
  • Configurable tracker URL
  • Bundled WebTorrent tracker

Instances

Provided by Country URL Description
Private.coffee Austria transfer.coffee Official instance

Prerequisites

  • Node.js (tested with v22.3 but anything recent should work)
  • npm

Installation

  1. Clone the repository:
git clone https://git.private.coffee/PrivateCoffee/transfer.coffee.git
cd transfer.coffee
  1. Install the dependencies:
npm install
  1. Optional, but recommended for production: Put the application (:8105) and the tracker (:8106) behind a reverse proxy (e.g. Caddy or nginx) and configure SSL.

Running the Application

  1. Start the tracker:
npm run tracker
  1. Create a .env file in the root directory of the project and set the environment variables:
TRACKER_URL="wss://tracker.your-domain.com" # URL of the WebTorrent tracker - default: ws://localhost:8106, use wss:// for secure connections
STUN_SERVER_URL="stun:stun.nextcloud.com:443" # Optional - there are public STUN servers available - not used if unset
TURN_SERVER_URL="turn:your-turn-server-url" # Optional - you would need to set up your own TURN server - don't set this if you don't have one
TURN_SECRET="your-static-auth-secret" # Required if you have a TURN server - don't set this if you don't have one

If you are using a reverse proxy, you should set the TRACKER_URL to the URL of the tracker behind the reverse proxy, e.g. wss://tracker.your-domain.com.

The STUN and TURN server URLs should be set to the public URLs of your STUN and TURN servers, if you have them.

  1. Start the application:
. .env
npm start
  1. Open your browser and navigate to http://localhost:8105 (or the URL you have configured in your reverse proxy)

Production

For production, you should use a process manager like systemd to keep the application running. You can use the systemd files provided in contrib/systemd as a starting point.

Usage

Sharing a File

  1. Select a file to share using the file input.
  2. Click the "Share" button.
  3. Share the generated mnemonic seed with others.

Receiving a File

  1. Enter the mnemonic seed in the input field.
  2. Click the "Receive" button.
  3. The file will be downloaded directly from the peer.

License

This project is licensed under the MIT License. See the LICENSE file for details.