https://github.com/sid-sg/multithreaded-secure-ftp-client-server
Secure FTP client & multithreaded server (using threadpool) with on-the-fly Gzip compression/decompression, secure packet transmission using OpenSSL, storage in SQLite DB and PBKDF2 hashing using OpenSSL
https://github.com/sid-sg/multithreaded-secure-ftp-client-server
cmake gzip multithreading network-programming openssl openssl-evp pbkdf2 socket-programming sqlite ssl threadpool tls zlib
Last synced: 3 months ago
JSON representation
Secure FTP client & multithreaded server (using threadpool) with on-the-fly Gzip compression/decompression, secure packet transmission using OpenSSL, storage in SQLite DB and PBKDF2 hashing using OpenSSL
- Host: GitHub
- URL: https://github.com/sid-sg/multithreaded-secure-ftp-client-server
- Owner: sid-sg
- Created: 2024-11-28T06:17:49.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-01-04T22:00:04.000Z (9 months ago)
- Last Synced: 2025-04-07T14:44:10.706Z (6 months ago)
- Topics: cmake, gzip, multithreading, network-programming, openssl, openssl-evp, pbkdf2, socket-programming, sqlite, ssl, threadpool, tls, zlib
- Language: C++
- Homepage:
- Size: 8.02 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Preview
https://github.com/user-attachments/assets/9bb2322e-b213-4fac-a544-2d6d4a10ce91---
## Dependencies
Ensure the following libraries are installed:### OpenSSL (For Secure FTP using SSL/TLS protocol and PBKDF2 hashing)
```bash
sudo apt-get install openssl libssl-dev
```### Zlib (For Gzip compression/decompression)
```bash
sudo apt install zlib1g zlib1g-dev
```### SQLite3 (For storing user information)
```bash
sudo apt install sqlite3 libsqlite3-dev
```### build-essential (Required build tools)
```bash
sudo apt install build-essential
```
### Cmake (For building the project)
```bash
sudo apt install cmake
```---
## Generating SSL Certificate and Key for the Server
1. Navigate to the `/security` directory inside the server folder:
```bash
cd server/security
```2. Generate a self-signed SSL certificate and private key:
```bash
openssl req -x509 -nodes -days 365 -newkey rsa:2048 \
-keyout server.key -out server.crt -config openssl.cnf
```3. Copy the generated certificate (`server.crt`) to the client’s `/security` directory:
```bash
cp server.crt ../../client/security
```---
## Build Instructions
### Build the Server
1. Navigate to the server directory:
```bash
cd server
```2. Create a build directory and compile:
```bash
mkdir -p build
cd build
cmake ..
cmake --build .
```3. Run the server:
```bash
sudo ./bin/server
```
**Example:**
```bash
sudo ./bin/server 8000
```### Build the Client
1. Navigate to the client directory:
```bash
cd client
```2. Create a build directory and compile:
```bash
mkdir -p build
cd build
cmake ..
cmake --build .
```3. Run the client:
```bash
./bin/client
```
**Example:**
```bash
./bin/client 127.0.0.1 8000
```---
## Debugging with Valgrind
Valgrind can be used to check memory leaks and runtime errors.
### Debugging the Server
```bash
sudo valgrind --leak-check=full --track-origins=yes ./bin/server
```### Debugging the Client
```bash
valgrind --leak-check=full --track-origins=yes ./bin/client
```---
## Example Usage
### Start the Server
```bash
sudo ./bin/server 8000
```### Start the Client
```bash
./bin/client 127.0.0.1 8000