Skip to content

RitekPillai/P2P-sharing-Application

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

5 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿš€ P2P-Sharing-Application

A high-performance peer-to-peer file-sharing application designed for secure, direct data exchange.

๐Ÿ—๏ธ Architecture & Stack

  • Frontend: Flutter (WebRTC / RTCDataChannel)
  • Signaling Server: Spring Boot (WebSockets) -> Moving to Go for high concurrency!
  • STUN Server: Standard Java (Custom UDP Implementation)
  • Protocol: WebRTC (SCTP over UDP)

๐Ÿ”„ The P2P Handshake Process

  1. Room Creation: Sender initiates a WebSocket connection to the signaling server.
  2. Joining: Receiver joins via a unique RoomID.
  3. SDP Exchange:
    • Sender generates Offer (SDP).
    • Receiver processes Offer and generates Answer (SDP).
  4. ICE Gathering (Parallel): Both peers query the Java STUN Server to discover their public IP/Port.
  5. Candidate Exchange: Peers relay their ICE Candidates via the signaling server.
  6. Direct Connection: Once a path is found, a direct RTCDataChannel is opened, and file transfer beginsโ€”bypassing the servers entirely.

๐Ÿš€ Key Features

  • Zero-Server Storage: Files never touch the server; they move directly from phone to phone.
  • Custom STUN: Optimized reflection logic built from scratch in Java.
  • Async Messaging: Non-blocking signaling flow for fast room negotiation.

About

A file sharing Application through internet

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors