惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

M
MIT News - Artificial intelligence
WordPress大学
WordPress大学
GbyAI
GbyAI
S
SegmentFault 最新的问题
量子位
爱范儿
爱范儿
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
MyScale Blog
MyScale Blog
人人都是产品经理
人人都是产品经理
博客园 - 叶小钗
aimingoo的专栏
aimingoo的专栏
V
Visual Studio Blog
U
Unit 42
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
The Cloudflare Blog
Stack Overflow Blog
Stack Overflow Blog
博客园 - 聂微东
J
Java Code Geeks
The GitHub Blog
The GitHub Blog
Y
Y Combinator Blog
IT之家
IT之家
Martin Fowler
Martin Fowler
宝玉的分享
宝玉的分享
雷峰网
雷峰网

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
I built an open-source AirDrop alternative that works in ...
Akshay Kumar Dadheech · 2026-06-03 · via DEV Community

Akshay Kumar Dadheech

AirDrop only works between Apple devices. Most alternatives require an app install, a cloud account, or route files through a third-party server.

I wanted something simpler:

Open a URL → discover nearby devices → send files.

So I built LocalDrop — a peer-to-peer file transfer app that works entirely in the browser over local Wi-Fi.

GitHub: https://github.com/akshaykdadheech/localdrop
Live Demo: https://localdrop-4fddd39fb6ad.herokuapp.com

How It Works

Devices connected to the same Wi-Fi network automatically discover each other through a lightweight signaling server.

Once discovered, WebRTC establishes a direct peer-to-peer connection:

Browser A ──► Signaling Server ◄── Browser B
      └──────── WebRTC P2P ────────┘

The signaling server only helps devices find each other. File transfers happen directly between browsers via WebRTC and are DTLS encrypted, so the server never sees your files.

Interesting Challenges

Backpressure Handling

WebRTC DataChannels on Chromium have a ~16 MB buffer limit. Sending data too aggressively can crash the tab.

I solved this using:

  • bufferedAmountLowThreshold
  • Flow control based on drain events

Cross-Platform Compatibility

Different browsers expose different capabilities.

  • Android Chrome supports the File System Access API
  • iOS Safari does not

This required separate file-receiving flows for each platform.

Large File Transfers

Keeping multi-gigabyte files in memory isn't practical.

On Chrome, showSaveFilePicker() is triggered after the transfer completes, allowing transfer progress to remain visible throughout the process without buffering everything in RAM.

Tech Stack

  • Svelte 5 + Vite
  • TypeScript
  • WebRTC DataChannel
  • Node.js + ws
  • Docker

Self-Hosting

git clone https://github.com/akshaykdadheech/localdrop
cd localdrop
docker compose up -d

Then open:

http://your-ip:3001

from any device connected to the same Wi-Fi network.

I'd love feedback from anyone who's worked with WebRTC DataChannels, especially on mobile browsers. If you find the project useful, a ⭐ on GitHub would be greatly appreciated.