https://github.com/mgrdich/myhttpserver
HTTP Server that supports HTTP/1.1 and HTTP/2.0 build using only the tcp package inspired by Golang Standard library
https://github.com/mgrdich/myhttpserver
Last synced: about 2 months ago
JSON representation
HTTP Server that supports HTTP/1.1 and HTTP/2.0 build using only the tcp package inspired by Golang Standard library
- Host: GitHub
- URL: https://github.com/mgrdich/myhttpserver
- Owner: Mgrdich
- Created: 2024-11-13T14:12:58.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-06T10:05:26.000Z (over 1 year ago)
- Last Synced: 2025-03-17T11:29:08.224Z (over 1 year ago)
- Language: Go
- Homepage:
- Size: 129 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# HTTP Server Implementation from Scratch
This code is inspired from the Golang standard library,
implements restricted of `Server` that implements `HTTP/1.1` and `HTTP/2.0` protocols
* implement `HTTP/1.1` Server using `tcp` and you can run it under `TLS` as well
* implement `HTTP/2.0` Server using `tcp` ( still work in progress )
* making sure it uses multi-threading and connection persistence for each case as defined per protocol
To use `HTTP/2.0` you should use the `TLS` Version (which is why `ListenAndServeTLS` is used instead of `ListenAndServe`)
## How to build the project
* Create self signed ssl certificates by running `openssl req -new -x509 -days 365 -nodes -out server.crt -keyout server.key`
* run `make build` to build the executable and then `./main-exec`
* To use the tls `./main-exec -tls=true` by default it is false
* to configure the port that you want to run `./main-exec -addr=8081`