A modern web-based VNC (Virtual Network Computing) application that allows remote desktop access through a web browser.
- Secure remote desktop access
- Real-time chat during sessions
- File sharing capabilities
- Clipboard synchronization
- Permission management
- Session recording
- Mobile touch controls
Create a .env.local file in the root directory with the following variables:
``` SOCKET_PORT=3001 NEXT_PUBLIC_SOCKET_SERVER_URL=http://localhost:3001 ```
- Install dependencies:
```bash npm install
yarn install ```
- Run the development server and socket server concurrently:
```bash npm run dev:all
yarn dev:all ```
- Open http://localhost:3000 with your browser to see the result.
If you want to run the Next.js app and socket server separately:
- Start the Next.js development server:
```bash npm run dev
yarn dev ```
- Start the socket server in a separate terminal:
```bash npm run socket-server
yarn socket-server ```
For local development, the middleware automatically creates a mock authentication token. If you're experiencing authentication issues:
- Clear your browser cookies
- Restart both the Next.js and socket servers
- Try accessing a protected route again
If you're experiencing issues with the socket connection:
- Make sure the socket server is running on the correct port
- Check that the
NEXT_PUBLIC_SOCKET_SERVER_URLenvironment variable is set correctly - Check the browser console for any connection errors
VNCConnect uses the following technologies:
- Next.js: React framework for the frontend
- WebRTC: For direct peer-to-peer connections
- Socket.IO: For signaling and establishing WebRTC connections
- Tailwind CSS: For styling
- shadcn/ui: For UI components
The application consists of the following main components:
- Socket Server: Handles signaling for WebRTC connections
- WebRTC Manager: Manages WebRTC connections and data channels
- VNC Host: Captures and shares the screen
- VNC Client: Receives and displays the remote screen
- Permission System: Manages access permissions
- Frontend : Next.js (pages, UI, appels API)
- Backend : Flask (Python)
- Gère l'exécution des commandes système pour TightVNC et noVNC
- Fournit des endpoints API :
/api/start-share: Démarre le partage d'écran (TightVNC)/api/start-novnc: Démarre une session noVNC pour accéder à un écran distant
- Page d'accueil : Deux boutons
- Partager mon écran
- Accéder à un écran
- Partager mon écran :
- Le backend génère l'IP et le mot de passe, lance TightVNC
- Affiche les infos à l'utilisateur
- Accéder à un écran :
- L'utilisateur saisit l'IP cible
- Le backend lance noVNC et redirige l'utilisateur vers l'interface noVNC
- Lancer le backend Flask :
cd backend pip install -r requirements.txt python app.py - Lancer le frontend Next.js :
npm install npm run dev
- Le backend exécute des commandes système, à utiliser sur un environnement de test !
- Le mot de passe VNC est généré aléatoirement à chaque session.