https://github.com/99percentpeople/weblink Skip to content Navigation Menu Toggle navigation Sign in * Product + GitHub Copilot Write better code with AI + Security Find and fix vulnerabilities + Actions Automate any workflow + Codespaces Instant dev environments + Issues Plan and track work + Code Review Manage code changes + Discussions Collaborate outside of code + Code Search Find more, search less Explore + All features + Documentation + GitHub Skills + Blog * Solutions By company size + Enterprises + Small and medium teams + Startups By use case + DevSecOps + DevOps + CI/CD + View all use cases By industry + Healthcare + Financial services + Manufacturing + Government + View all industries View all solutions * Resources Topics + AI + DevOps + Security + Software Development + View all Explore + Learning Pathways + White papers, Ebooks, Webinars + Customer Stories + Partners * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Enterprise + Enterprise platform AI-powered developer platform Available add-ons + Advanced Security Enterprise-grade security features + GitHub Copilot Enterprise-grade AI features + Premium Support Enterprise-grade 24/7 support * Pricing Search or jump to... Search code, repositories, users, issues, pull requests... Search [ ] Clear Search syntax tips Provide feedback We read every piece of feedback, and take your input very seriously. [ ] [ ] Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Name [ ] Query [ ] To see all available qualifiers, see our documentation. Cancel Create saved search Sign in Sign up Reseting focus You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert {{ message }} 99percentpeople / weblink Public * Notifications You must be signed in to change notification settings * Fork 20 * Star 299 P2P web chat and file transfer, file synchronization application using WebRTC webl.ink License MIT license 299 stars 20 forks Branches Tags Activity Star Notifications You must be signed in to change notification settings * Code * Issues 2 * Pull requests 0 * Actions * Projects 0 * Security * Insights Additional navigation options * Code * Issues * Pull requests * Actions * Projects * Security * Insights 99percentpeople/weblink public BranchesTags [ ] Go to file Code Folders and files Name Name Last commit Last commit message date Latest commit History 143 Commits docker docker public public screenshots screenshots scripts scripts src src test test .dockerignore .dockerignore .gitignore .gitignore .prettierrc.js .prettierrc.js CHANGELOG.md CHANGELOG.md Dockerfile Dockerfile LICENSE LICENSE README.md README.md README_CN.md README_CN.md database.rules.json database.rules.json docker-compose.yaml docker-compose.yaml index.html index.html package.json package.json pnpm-lock.yaml pnpm-lock.yaml postcss.config.mjs postcss.config.mjs pwa-assets.config.ts pwa-assets.config.ts tailwind.config.ts tailwind.config.ts tsconfig.json tsconfig.json vercel.json vercel.json vite.config.ts vite.config.ts vitest.config.ts vitest.config.ts View all files Repository files navigation * README * MIT license Weblink English Introduction | Zhong Wen Jie Shao Introduction Weblink is a pure web-based file transfer and chat application built on WebRTC. It requires no downloads and works directly in your browser. Utilizing a serverless P2P architecture, it supports multiple backends including Firebase and WebSocket for efficient peer-to-peer connections. Additionally, Weblink ensures the privacy and security of signaling messages through end-to-end encryption. The project is deployed on Vercel and can be accessed at https:// web1ink.vercel.app. Alternatively, you can use the version deployed on Alibaba Cloud at https://webl.ink. Features Weblink currently supports the following features: Feature Description File Retrieve cached files from the other party Synchronization Resume Resume file transfer if the connection is interrupted Transfer File Caching Transferred files are cached in IndexedDB File Search Search for files cached by you and the other party Video Calling Supports video calls Clipboard Press Ctrl + V in the chat window or paste in the Transfer input box on mobile devices to send clipboard content Folder Send folders, which will be automatically compressed Transfer Compressed Choose to compress files during transfer; files will Transfer be compressed in blocks and sent accordingly Multi-Channel Improve transfer performance by parallel data Transfer transfer through multiple DataChannels Share and After installing as a PWA, you can send text or files Forward via system sharing Text Chat Send text messages for chatting More information can be found in CHANGELOG. Usage Run Locally git clone https://github.com/99percentpeople/weblink.git cd weblink pnpm install Make sure you configure the Firebase keys in the project (as shown below), then run the following command: # Development pnpm dev # Build pnpm build Deploy to Docker You can deploy this project to Docker using docker-compose.yaml, and it will automatically build the weblink-ws-server as backend. Modify the docker-compose.yaml file to set the correct environment variables. Then run the following command: docker-compose up -d To enable SSL you need to provide the SSL certificate cert.pem and key key.pem files in the docker/ssl directory. And run the following command: ENABLE_SSL=true docker-compose up -d Alternatively, you can also use Dockerfile to deploy this project to Docker. Deploy to Vercel To deploy this project to Vercel, follow these steps: 1. Go to the Vercel website and log in (or create an account). 2. Connect your GitHub repository and select the cloned repository. 3. In your Vercel project settings, find "Environment Variables" and add the Firebase API key and other environment variables (as shown below). 4. Click the "Deploy" button, and Vercel will automatically build and deploy your project. Environment Variables Configuration (Firebase) You will need to configure Firebase keys for both local development and deployment to Vercel. Add the following Firebase environment variables: VITE_FIREBASE_API_KEY VITE_FIREBASE_AUTH_DOMAIN VITE_FIREBASE_PROJECT_ID VITE_FIREBASE_STORAGE_BUCKET VITE_FIREBASE_MESSAGING_SENDER_ID VITE_FIREBASE_APP_ID VITE_FIREBASE_DATABASE_URL Vercel Environment Variables Configuration For Vercel deployment, set the environment variables by following these steps: 1. Open your Vercel project and go to "Settings." 2. Find "Environment Variables." 3. Add the Firebase configuration items above and input the corresponding values. WEBSOCKET Configuration This application can deploy its own WEBSOCKET server, and a WEBSOCKET server is provided. You can choose to use it or not. For details, please refer to weblink-ws-server. Local Environment Variables (.env.local) For local development, create a .env.local file and add the Firebase keys: # backend choose FIREBASE or WEBSOCKET # FIREBASE VITE_BACKEND=FIREBASE VITE_FIREBASE_API_KEY=your-firebase-api-key VITE_FIREBASE_AUTH_DOMAIN=your-firebase-auth-domain VITE_FIREBASE_PROJECT_ID=your-firebase-project-id VITE_FIREBASE_STORAGE_BUCKET=your-firebase-storage-bucket VITE_FIREBASE_MESSAGING_SENDER_ID=your-firebase-messaging-sender-id VITE_FIREBASE_APP_ID=your-firebase-app-id VITE_FIREBASE_DATABASE_URL=your-database-url # WEBSOCKET VITE_BACKEND=WEBSOCKET VITE_WEBSOCKET_URL=your-websocket-url Notes STUN and TURN Server Configuration If you are using P2P connections outside a local area network (in a NAT environment), you may need to configure a TURN server to ensure connections are established. In the settings page, you can configure the TURN server with the following format, support coturn and Cloudflare TURN server, and separate multiple configurations with newline characters: TURN Configuration Format: # use coturn with account and password turn:turn1.example.com:3478|user1|pass1|longterm # use coturn with timestamp turns:turn2.example.com:5349|user2|pass2|hmac # use cloudflare turn server name|TURN_TOKEN_ID|API_TOKEN|cloudflare Here are some methods to get public STUN and TURN servers: Public STUN Server This application defaults to using Google's STUN server. If you cannot connect, please configure your own STUN server. You can refer to https://gist.github.com/mondain/b0ec1cf5f60ae726202e for a list of public STUN servers. Then add the stun server in format stun:xxxx:xxxx to the STUN server list in the settings page such as stun:stun.l.google.com:19302. Cloudflare Calls TURN Server You can use the TURN server provided by Cloudflare Calls, please visit https://developers.cloudflare.com/calls/turn. Then add the TURN server in format name|TURN_TOKEN_ID|API_TOKEN|cloudflare to the TURN server list in the settings page. Self-Hosted STUN/TURN Server You can refer to https://github.com/coturn/coturn to set up your own TURN server. Use in LAN The application currently supports LAN use in non-secure environments. Ensure that your devices are in the same LAN and the firewall does not block P2P connections. And at the same time, run weblink-ws-server to support WEBSOCKET connections. Contribution Contributions are welcome! Please feel free to submit issues or pull requests. License This project is open-sourced under the MIT License. About P2P web chat and file transfer, file synchronization application using WebRTC webl.ink Topics chat pwa webrtc p2p webapp file-transfer video-chat Resources Readme License MIT license Activity Stars 299 stars Watchers 2 watching Forks 20 forks Report repository Languages * TypeScript 98.6% * Other 1.4% Footer (c) 2024 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact * Manage cookies * Do not share my personal information You can't perform that action at this time.