{"id":28215867,"url":"https://github.com/createunique/simple_file_sharing_wan","last_synced_at":"2026-05-09T10:26:58.726Z","repository":{"id":229210989,"uuid":"776106872","full_name":"createunique/SIMPLE_FILE_SHARING_WAN","owner":"createunique","description":"A P2P file sharing system utilizing WebRTC for seamless global file transfers. Live at below link.","archived":false,"fork":false,"pushed_at":"2025-03-06T18:31:52.000Z","size":165,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-17T22:12:46.048Z","etag":null,"topics":["file-transfer","networking","node-js","p2p","peer-to-peer","peer2peer","serverless","socket-io","webrtc"],"latest_commit_sha":null,"homepage":"https://simple-file-sharing-wan.vercel.app","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/createunique.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-22T17:38:15.000Z","updated_at":"2025-03-06T18:31:56.000Z","dependencies_parsed_at":"2024-04-24T10:47:35.354Z","dependency_job_id":null,"html_url":"https://github.com/createunique/SIMPLE_FILE_SHARING_WAN","commit_stats":null,"previous_names":["createunique/simple_file_sharing_wan"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/createunique%2FSIMPLE_FILE_SHARING_WAN","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/createunique%2FSIMPLE_FILE_SHARING_WAN/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/createunique%2FSIMPLE_FILE_SHARING_WAN/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/createunique%2FSIMPLE_FILE_SHARING_WAN/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/createunique","download_url":"https://codeload.github.com/createunique/SIMPLE_FILE_SHARING_WAN/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/createunique%2FSIMPLE_FILE_SHARING_WAN/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259124204,"owners_count":22808888,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["file-transfer","networking","node-js","p2p","peer-to-peer","peer2peer","serverless","socket-io","webrtc"],"created_at":"2025-05-17T22:12:00.542Z","updated_at":"2026-05-09T10:26:53.679Z","avatar_url":"https://github.com/createunique.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# P2P File Transfer System using WebRTC  \n\n### 🚧 **Work in Progress...**  \nOngoing improvements to enhance transfer speeds for larger files.  \n\n### 🔹 **Supports both LAN \u0026 WAN**  \n- **LAN Speed \u003e WAN Speed**  \n\n---\n\n## 📌 Overview  \n\nThis repository contains the code for a **peer-to-peer (P2P) file transfer system** that leverages **WebRTC** to enable file sharing over **local and wide-area networks (LAN \u0026 WAN)**. The system allows users to establish **direct peer-to-peer connections** without relying on a central server, ensuring **faster and secure** file transfers.  \n\n---\n\n## 📂 Files \u0026 Components  \n\n- **`index.html`**  \n  Contains the **HTML \u0026 CSS** for the front-end user interface, allowing users to:  \n  - Initiate connections  \n  - Select files for transfer  \n  - Monitor transfer progress  \n\n- **`index.js`**  \n  Implements the **signaling server** using **Express.js \u0026 Socket.io**, handling:  \n  - WebSocket communication between peers  \n  - Static file serving  \n  - Establishment of peer-to-peer connections  \n\n- **`package.json`**  \n  Defines the project's metadata and dependencies, including **Express.js, Nodemon, and Socket.io**.  \n\n- **`package-lock.json`**  \n  Ensures consistent dependency versions across different development environments by locking package versions.  \n\n- **`vercel.json`**  \n  Contains deployment configurations for **Vercel**, specifying source files and routing settings.  \n\n---\n\n## 🚀 How to Use  \n\n🔗 **Live Demo:** [WAN_P2P](https://wan-p2p.vercel.app)  \n\nOr follow these steps to use the repository:  \n\n1. Open `index.html` on the devices that will participate in the file transfer.  \n2. On the **first device**, click **\"Create Local Offer\"** to generate a connection offer. Copy this text.  \n3. Share this offer with the **second device** (use [Q-Text](https://qtext.io) for easy sharing).  \n4. On the **second device**, paste the copied text into the **\"Remote\"** field and click **\"Connect\"**. This generates a response in the **\"Local\"** section.  \n5. Copy this response and send it back to the **first device**. Paste it into the **\"Remote\"** field and press **\"Connect\"**.  \n6. Once connected, the status will show **\"Connected to peer\"**. The sender can now select a file and transfer it.  \n\n---\n\n## ⚙️ Mechanism  \n\nThe P2P file transfer system operates in the following steps:  \n\n1. **Signaling**  \n   - Peers exchange session descriptions (**offer \u0026 answer**) through a **signaling server** (Socket.io).  \n   - This exchange helps establish a direct P2P connection.  \n\n2. **Connection Establishment**  \n   - WebRTC attempts to create a direct connection between peers.  \n   - Uses **ICE (Interactive Connectivity Establishment), STUN, and TURN** servers for NAT traversal.  \n\n3. **Data Channel Creation**  \n   - A **WebRTC Data Channel** is established for binary file transfer.  \n\n4. **File Transfer**  \n   - The sender transmits **metadata** (file name, size, type) first.  \n   - The file is read in chunks and sent via the data channel.  \n   - The receiver reconstructs the file upon receiving all chunks.  \n\n5. **Transfer Monitoring**  \n   - Both sender and receiver track the progress using a **progress bar**.  \n\n6. **Completion \u0026 Cleanup**  \n   - Once the file transfer completes, the connection is closed, and cleanup operations are performed.  \n\n### ✅ **Why WebRTC for File Transfer?**  \n- **No centralized server needed** (except for signaling)  \n- **Direct peer-to-peer connection** ensures **fast and secure** transfers  \n- **Real-time communication** via WebRTC's **Data Channel**  \n\n---\n\n## 👥 Team  \n\n- **[Nishant Kumar](https://github.com/nishant-kumarr)**  \n- **Viswanadha Sai Nissankararao** (@ME)  \n\n---\n\n### 📌 Notes  \n- The system is currently under development to **optimize performance** for large files.  \n- WebRTC works best in **LAN environments**, but performance in **WAN scenarios depends on network conditions**.  \n- If WebRTC fails due to NAT issues, a **TURN server** may be required for relaying data.  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcreateunique%2Fsimple_file_sharing_wan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcreateunique%2Fsimple_file_sharing_wan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcreateunique%2Fsimple_file_sharing_wan/lists"}