Skip to content

About

Remote desktop app built with Python socket programming

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

🖥️ AnyDesk Clone

A Python remote desktop application built from scratch using socket programming. Streams a host machine's screen to a remote client in real time and supports remote mouse & keyboard control — replicating the core functionality of tools like AnyDesk and TeamViewer.


✨ Features

  • 📡 Real-time screen capture & transmission over TCP sockets
  • 🏗️ Clean client-server architecture
  • ⚡ Low-latency frame streaming using Python sockets

🛠 Tech Stack

Layer Technology
Language Python 3.x
Networking TCP Socket Programming
Screen Capture Pillow (PIL) / PyAutoGUI
Remote Control PyAutoGUI
Data Transfer socket + pickle / struct

🏗️ Architecture

┌──────────────────────┐             TCP             ┌──────────────────────┐
│    HOST (server.py)  │ ──────────────────────────► │  CLIENT (client.py)  │
│                      │   Compressed screen frames  │                      │
│  Captures screen     │ ◄────────────────────────── │  Displays stream     │
│  Executes commands   │   Mouse & keyboard events   │  Sends input events  │
└──────────────────────┘                             └──────────────────────┘

🚀 Getting Started

Prerequisites

  • Python 3.8+
  • Both machines on the same network (or use port forwarding for remote)

Installation

# Clone the repo
git clone https://github.com/senseihx4/anydesk-clone.git
cd anydesk-clone

# Install dependencies
pip install pillow pyautogui opencv-python numpy

Running

Step 1 — Start the server on the host machine (the one being controlled):

python server.py

Note the IP address shown in the terminal.

Step 2 — Start the client on the remote machine:

python client.py
# Enter the host IP when prompted

📁 Project Structure

anydesk-clone/
├── server.py       # Host side — captures screen, receives input events
├── client.py       # Client side — displays stream, sends mouse/KB events
├── utils.py        # Shared helpers (compression, encoding)
└── requirements.txt

🔮 Planned Improvements

  • SSL/TLS encrypted connection
  • Session password protection
  • File transfer between machines
  • GUI for connection setup (Tkinter)
  • FPS counter & quality selector
  • Cross-platform packaging (.exe / .app)

💡 What I Learned

  • How TCP sockets work for real-time data streaming
  • Screen capture and frame compression techniques
  • Serializing and deserializing data with pickle and struct
  • Building a client-server system from scratch without any networking libraries

👨‍💻 Author

Kartik Sharma — GitHub · LinkedIn

About

Remote desktop app built with Python socket programming

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages