Skip to content

sn3ll/anysend-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 

Repository files navigation

AnySend logo

AnySend

Browser-based P2P file transfer. Any device. Any OS. No accounts.

Live License WebRTC OPFS

anysend.to — Open it on both devices. Drop a file. Share the 6-character code. Done.


What is AnySend?

AnySend is a peer-to-peer file transfer tool that runs entirely in the browser. No app to install, no account to create, no file size limit. Files go directly from one device to another — nothing is uploaded to any server.

Think of it as AirDrop for the web — except it works between iPhone and Android, Mac and Windows, phone and Smart TV. If the device has a modern browser, AnySend works.

Sender                     Receiver
  │                           │
  │  opens anysend.to         │  opens anysend.to
  │  drops file               │  enters 6-char code
  │                           │
  └──── WebRTC DataChannel ───┘
         (direct P2P, encrypted)
         no server in the middle

How It Works

1. Signaling

When the sender drops a file, the frontend connects to a lightweight WebSocket signaling server and requests a room. The server returns a 6-character room ID (ABC123). This ID is all the receiver needs.

2. WebRTC handshake

When the receiver enters the code, the signaling server facilitates a standard WebRTC offer/answer exchange and ICE candidate negotiation. Once both peers have exchanged candidates, the P2P DataChannel opens — the signaling server's job is done.

3. File transfer

Files are sliced into 64KB chunks and sent over the RTCDataChannel. Flow control is handled via the bufferedAmountLowThreshold API — the sender pauses when the DataChannel buffer exceeds 256KB and resumes when it drains to 64KB. This prevents Chrome's 16MB hard buffer limit from stalling large transfers.

4. Large file handling (OPFS)

For files > 50MB, the receiver uses the browser's Origin Private File System (OPFS) to stream chunks directly to disk as they arrive. This keeps memory usage flat at ~64KB regardless of file size — no more RangeError: Array buffer allocation failed on 400MB transfers.

For files ≤ 50MB, chunks are held in memory and combined into a Blob for a direct download trigger.

5. Encryption

WebRTC DataChannels are encrypted with DTLS 1.2+ by default — the same encryption used in WebRTC video calls (Google Meet, etc.). No additional encryption layer is needed.


Why not just use...

Method Problem
AirDrop Apple devices only. Same room required.
Nearby Share Android + Windows only. Same network required. No iPhone.
WeTransfer Files uploaded to their servers. 2GB limit on free tier. 7-day expiry.
Bluetooth ~3 MB/s. Impractical for anything over a few MB. iPhone doesn't support BT file transfer to non-Apple devices.
Email 25MB attachment limit.
WhatsApp Compresses photos and videos. Large files blocked.
Google Drive Requires account. Files stored on Google's servers.

AnySend — works between any two devices, any file size, no server storage, no account.


Tech Stack

Layer Technology
Frontend TypeScript, Vite, vanilla DOM
P2P transfer WebRTC DataChannels (RTCDataChannel)
Large file streaming Origin Private File System (OPFS)
QR generation qrcode npm package
PWA vite-plugin-pwa, Workbox
Signaling server Node.js + ws (WebSocket)
Frontend hosting Vercel
Signaling hosting Render
ICE/TURN Standard STUN + TURN for NAT traversal

Performance

  • Same Wi-Fi: 50–200 MB/s (limited by local network, not AnySend)
  • Cross-network: Limited by the sender's upload bandwidth
  • Memory usage (receiver): ~64KB regardless of file size (OPFS streaming)
  • Supported file size: No limit — tested to 4GB+

Browser Support

Browser Send Receive
Chrome 86+
Edge 86+
Firefox 80+
Safari 15+
Chrome Android
Safari iOS 15+
Samsung Internet

OPFS (large file streaming) requires Chrome/Edge 86+ or Safari 15.2+. Firefox OPFS support added in Firefox 111. On unsupported browsers, files ≤ 50MB still work via in-memory mode.


Guides

Step-by-step guides for common device combinations:

Mobile to Mobile

Mobile to Computer

Computer to Mobile

Computer to Computer

Consoles & TV

Topic Guides

→ All guides


Privacy

  • No server storage — files are never uploaded anywhere
  • No accounts — no email, name, or password required
  • No transfer logs — the signaling server records connection events (room create/join), not file content
  • Encrypted in transit — WebRTC DTLS 1.2+ on all DataChannel traffic
  • IP addresses — used for WebRTC connection establishment (standard WebRTC behaviour). Use a VPN if you need to mask your IP from the recipient.

Full privacy policy →


Self-Hosting

The signaling server is a standalone Node.js/WebSocket process with no external dependencies beyond ws. To point the frontend at your own signaling server, set the VITE_WS_URL environment variable at build time.

The frontend is a static site — deployable to any CDN (Vercel, Netlify, Cloudflare Pages, S3+CloudFront).


Similar Projects

AnySend differs in: cross-network P2P (not LAN-only), no file size limit, OPFS streaming for large files, no app install on either side.


License

MIT — do whatever you want with it.


Try AnySend →

Made with WebRTC, OPFS, and a deep frustration with AirDrop being Apple-only.

About

Browser-based P2P file transfer. AirDrop for any device — iPhone, Android, Windows, Mac. No accounts, no size limits.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors