Skip to content

Je33/pow-example

Repository files navigation

Example of using PoW concept to protect server from DDoS attacks

Description

This example shows how to use PoW concept to protect server from DDoS attacks. The algorithm is based on SHA-3 family and PoW hashcash because it is the lightweight, simplest and modern proof-of-work algorithm, based firstly on CPU intensive proof of work, but solution can be extended to other PoW algorithms, based on requirements.

Prerequisites

  • Docker
  • Golang

Usage

To start server and client with docker, you can use the following commands:

docker-compose up --build

Or it can be started just in separate processes on one host:

go build -o ./build/server ./cmd/server/main.go
go build -o ./build/client ./cmd/client/main.go

And start in different terminals:

./build/server
./build/client

Tests

go test ./...

Makefile

  • build - build server and client
make build
  • run - start server and client in docker
make dc
  • test - run tests server and client with coverage report
make test
  • lint - run linter
make lint

References

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published