Skip to content

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

Notifications You must be signed in to change notification settings

sid-sg/Multithreaded-Secure-FTP-Client-Server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Preview

ftps2_compressed.mp4

Dependencies

Ensure the following libraries are installed:

OpenSSL (For Secure FTP using SSL/TLS protocol and PBKDF2 hashing)

sudo apt-get install openssl libssl-dev

Zlib (For Gzip compression/decompression)

sudo apt install zlib1g zlib1g-dev

SQLite3 (For storing user information)

sudo apt install sqlite3 libsqlite3-dev

build-essential (Required build tools)

sudo apt install build-essential 

Cmake (For building the project)

sudo apt install cmake

Generating SSL Certificate and Key for the Server

  1. Navigate to the /security directory inside the server folder:

    cd server/security
  2. Generate a self-signed SSL certificate and private key:

    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:

    cp server.crt ../../client/security

Build Instructions

Build the Server

  1. Navigate to the server directory:

    cd server
  2. Create a build directory and compile:

    mkdir -p build
    cd build
    cmake ..
    cmake --build .
  3. Run the server:

    sudo ./bin/server <server_portno>

    Example:

    sudo ./bin/server 8000

Build the Client

  1. Navigate to the client directory:

    cd client
  2. Create a build directory and compile:

    mkdir -p build
    cd build
    cmake ..
    cmake --build .
  3. Run the client:

    ./bin/client <server_ipaddress> <server_portno>

    Example:

    ./bin/client 127.0.0.1 8000

Debugging with Valgrind

Valgrind can be used to check memory leaks and runtime errors.

Debugging the Server

sudo valgrind --leak-check=full --track-origins=yes ./bin/server <server_portno>

Debugging the Client

valgrind --leak-check=full --track-origins=yes ./bin/client <server_ipaddress> <server_portno>

Example Usage

Start the Server

sudo ./bin/server 8000

Start the Client

./bin/client 127.0.0.1 8000

About

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

Topics

Resources

Stars

Watchers

Forks