word-of-wisdom
This application implements a TCP server designed to provide inspirational quotes from the "Word of Wisdom" book. The server is protected from potential DDOS attacks using the Proof of Work (PoW) consensus mechanism, ensuring that clients must perform computational work before gaining access to the server. Additionally, the server employs a challenge-response protocol to further bolster its security measures.
Features
- TCP server with PoW protection against DDOS attacks.
- Upon successful PoW verification, the server sends an inspirational quote.
Proof of Work (PoW) Algorithm
The chosen PoW algorithm is SHA-256 due to its robustness and widespread adoption as a cryptographic hash function. This algorithm provides a strong foundation for securing the blockchain network by offering computational efficiency and a high level of cryptographic security.
Server Usage
To run the server, follow these steps:
- Build the Docker image for the server using the provided Dockerfile.
- Start the Docker container with the server image.
- The server will be accessible on port
11001
.
Client Usage
To interact with the server, you will need to implement a client that can solve the PoW challenge. The client should perform the necessary computations and send the solution to the server for verification.
Getting Started
To deploy the Word of Wisdom TCP server and client, follow these steps:
- Clone this repository to your local machine:
- Build the Docker images for both the server and client using the provided docker-compose file:
make env
This will build the Docker images for the server and client
- Once the server and client containers are running, the client will automatically execute 10 requests to the server. Each request will involve solving a Proof of Work challenge.
- After completing the 10 requests, the client will stop automatically.