Securely transfer files peer-to-peer (P2P) in encrypted chunks using AES-GCM.
For optimal performance, especially behind restrictive NATs or firewalls, configure your own STUN and TURN servers:
STUN: Discovers public IPs and ports for direct P2P connections. TURN: Relays data when direct connections are blocked or unreliable. Note: TURN servers may be used if NAT is restricted.
- Obtain Server Information: Use public servers for testing or set up your own for production. You can get one free from here
- Integrate Servers: Update WebRTC configuration in your application in config/config.ts.
const configuration = { iceServers: [ { urls: 'stun:stun.example.org' }, { urls: 'turn:turn.example.org', username: 'yourUsername', credential: 'yourPassword' } ] };
- Test the Configuration: Ensure connections are stable in various network environments.
- P2P
- File Sent in Chunks
- Chunks are encrypted