Skip to content

Latest commit

Β 

History

History
20 lines (15 loc) Β· 812 Bytes

File metadata and controls

20 lines (15 loc) Β· 812 Bytes

Custom HTTP/1.1 & TCP Server in C

This project contains two simple implementations in pure C:

  1. Basic HTTP/1.1 Server β€” Handles simple HTTP GET requests. You can request the filename with extension that is staying on the server machine. Also, you can whitelist your ip in txt file and specify the filename when starting the application. Don't worry, the HTTP server will hide this file by returning 404 if the hacker is trying to get it.
  2. TCP Server β€” A minimal TCP Echo server demonstrating basic socket communication.

πŸš€ How to Run

Prerequisites:

  • GCC Compiler
  • Linux (Tested on Kali Linux & WSL)
  • Basic knowledge of networking sockets

1. Compile and Run HTTP Server

cd HTTPclient
gcc http_server.c -o http_server
./http_server <path-to-ip-whitelist-txt-file>