Skip to content

Latest commit

 

History

History
129 lines (102 loc) · 2.31 KB

File metadata and controls

129 lines (102 loc) · 2.31 KB

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