Skip to content

A secure, encrypted file transfer application (FTP-like) built with Python Sockets and SSL/TLS, featuring a custom binary protocol and a PySide6 GUI prototype.

Notifications You must be signed in to change notification settings

Eh-Ho/computer-networks-course-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔐 Secure FTP Socket Application

Python OpenSSL Qt

Course: Computer Networks Status: Functional Backend / Prototype GUI

A secure client-server file transfer application. It implements a custom Application Layer protocol over TCP, wrapped in SSL/TLS for encryption. The project includes a multi-threaded server, a CLI client, and a preliminary GUI built with PySide6 (QML).

🚀 Key Features

  • Encrypted Communication: All traffic is secured using Python's ssl module (TLS 1.2+).
  • Custom Binary Protocol: Uses struct to pack/unpack binary headers (integers, floats) for efficient data transmission.
  • Core FTP Commands: Supports Uploading, Downloading, Listing, and Deleting files.
  • Performance Metrics: Calculates and reports transfer speeds and file sizes.
  • Hybrid Interface: Includes a fully functional Command Line Interface (CLI) and a GUI starter kit using Qt Quick (QML).

📂 Project Structure

Computer Networks/
├── Server/
│   ├── Server.py          # Multithreaded SSL Server logic
│   ├── certificate.crt    # Public Certificate
│   └── private.key        # Private Key for TLS handshake
├── Client/
│   ├── Client.py          # CLI Client implementation
│   └── certificate.crt    # Server cert for verification
├── Files/                 # Server storage directory
├── gui.py                 # PySide6 GUI Entry point
├── main.qml               # QML User Interface layout
└── README.md

📡 Protocol Specification

The application listens on 127.0.0.1:1456 and handles the following commands:

Command Description Data Handling
UPLD Upload File Sends filename length $\rightarrow$ filename $\rightarrow$ size $\rightarrow$ binary content.
DWLD Download File Server streams file in 1024 byte chunks.
LIST List Files Server returns metadata (Filename, Size, Creation Time) for files in /Files.
DELF Delete File Removes target file from the server storage.
QUIT Disconnect Closes the socket and resets the thread.

💻 How to Run

1. Start the Server

The server must be running to accept connections. It creates a secure context using the provided .crt and .key files.

cd Server
python Server.py

Server is now listening on 127.0.0.1:1456...

2. Run the Client (CLI)

Open a new terminal window.

cd Client
python Client.py

You will be prompted to enter commands (e.g., LIST, UPLD, QUIT).

3. Run the GUI (Prototype)

Note: The GUI is a front-end skeleton demonstrating PySide6 integration.

# From the root directory
python gui.py

🛠 Dependencies

  • Python 3.x
  • PySide6 (For the GUI only: pip install PySide6)
  • Standard Libs: socket, ssl, struct, os, time

About

A secure, encrypted file transfer application (FTP-like) built with Python Sockets and SSL/TLS, featuring a custom binary protocol and a PySide6 GUI prototype.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published