Peer-to-Peer File Transfer (LAN and Internet)
Send files straight from one browser to another over WebRTC. The file travels peer to peer instead of through a server, and the two sides pair up with a short code.
Loading…
Usage Guide
- Sender: in the "Send files" panel on the left, pick the files you want to send (you can select several at once). No file to hand? Click "Generate test file" to create a random file of about 3MB for testing.
- Click "Generate code" and a 6-character code appears. Give it to the receiver (click the code to copy it; repeated clicks will not copy the "copied" label). The sender's page must stay open.
- Receiver: in the "Receive files" panel on the right, type the sender's code and click "Connect and receive".
- Once the peer-to-peer connection is up the transfer starts automatically, and both sides see a progress bar, a percentage and the live speed.
- As each file finishes, a "Download" link appears on that file's row on the receiving side; click it to save the file locally.
- If the connection fails or drops: turn off the TUN, enhanced or global mode of any VPN/proxy software (Clash, Surge, v2ray and similar hijack WebRTC UDP traffic), make sure both devices are on the same Wi-Fi (not a guest network), then have the sender generate a new code and the receiver enter it again. If it still fails, add your own STUN/TURN server under "Advanced settings", or expand "Connection diagnostics" at the bottom to inspect the candidate types and selected path.
Features
- Direct peer-to-peer transfer: files move over a WebRTC data channel between the two browsers and are never relayed through or stored on a server. The server only hands out the code that lets the two sides find each other.
- Pairing by code: the sender generates a 6-character code and the receiver types it in, with no account or sign-up. Codes are issued by the server and expire automatically after 6 hours.
- Multiple files: select several files at once and they are queued and sent one after another, with a download link generated for each on the receiving side.
- Live progress: a progress bar, completion percentage, current file index and real-time speed during the transfer.
- Friendly to large files: data is sent in 32KB chunks with backpressure control on the send buffer, so a big file does not blow up the memory buffer.
- One-click test: the built-in "Generate test file" button creates a random file of about 3MB so you can try the whole send-and-receive flow immediately.
- Connection diagnostics: when a connection fails or drops mid-transfer, expand "Connection diagnostics" at the bottom of the page to see which ICE candidate types were gathered (LAN host, mDNS address, public srflx, relay), the candidate pair actually selected, and the state changes. That makes it clear whether a proxy, router or firewall is in the way.
- Custom STUN / TURN: under "Advanced settings" you can add your own STUN/TURN servers (turn: and turns: TCP are supported) for strict corporate networks or cross-carrier links where direct connections fail. The built-in STUN servers are all reachable from mainland China.
- Automatic recovery: brief network hiccups no longer fail the transfer immediately; the page tries to recover and shows a recovery message, and only reports a real failure with targeted troubleshooting advice.
Frequently Asked Questions
Do my files pass through a server? Is this safe?
The files themselves travel over a direct WebRTC peer-to-peer connection between the two browsers; they are not relayed through a server and nothing is stored on one. The server only forwards the code and handshake data the two sides need to connect, and never sees the file contents.
How long is a code valid?
Codes are issued by the server and expire automatically after 6 hours. Each code can also be used by only one receiver: once a pairing succeeds, that code is taken.
Why does the connection sometimes fail?
The tool relies on a direct WebRTC connection and uses STUN servers only for NAT traversal, with no server-side relay by default. Common causes: (1) VPN/proxy software (Clash, Surge, v2ray and similar) running in TUN, enhanced or global mode hijacks WebRTC UDP traffic, which is the most common reason; (2) the router has AP isolation / client isolation enabled, or the two devices are on different networks such as a guest network and the main network; (3) a strict corporate firewall blocks UDP; (4) symmetric NAT. Quit the proxy/VPN completely and put both devices on the same Wi-Fi, then retry. If it still fails, add your own TURN relay server under Advanced settings (files will be relayed through it).
It connects on my LAN but drops right away. What should I do?
A connection that succeeds and then drops immediately usually means the UDP path is being interrupted: proxy TUN/enhanced mode, a VPN, router client isolation, or a system firewall blocking inbound UDP for the browser. Quit the proxy/VPN completely (turning off the browser proxy alone is not enough), make sure both devices are on the same subnet, and generate a new code. Expand Connection diagnostics and check the selected path: host means a direct LAN link, srflx means traffic goes out through public NAT, and relay means it is being relayed by a TURN server.
Can I close the page during a transfer, and is resuming supported?
No on both counts. Both pages must stay open, because the connection is a live link between the two browsers, and closing a page or losing the network aborts the transfer. This version has no resume support, so an interrupted transfer means generating a new code, pairing again and starting from the beginning.