lopuh@void:
~/projects/chatter$
// tiny web chat in pure C
~/
../
~/log
~/contact
$
stat
project.info
Name: chatter
Link:
L0puh/chatter
Type: web chat server
Language: Pure C
Status:
"done"
$ ls -la resources/images/
$ cat about.txt
// Project Description
tiny web chat application in pure c
minimalist, lightweight, secure
$ cat features.txt
// System Features
-
http server
-
websocket server
// based on RFC 6455
-
SSL support
with openSSL
// https & wss
-
IPv6 support
-
MIME support
:
html/htm, jpg/jpeg, png, css, ico
-
PostgreSQL support
// with libpq
-
password security
:
hashing & salting
$ make && ./server
# Build & Run
$
make
WITH_DB=0 LOG_ON=1 DEBUG=0
$
./server
<HOST> <PORT> <FLAGS>
# Example:
$
./server
localhost 8080 --SSL
# [INFO] Server initialized
# [INFO] Listening on localhost:8080
# [INFO] SSL: enabled
$ cat ssl_setup.md
# SSL Configuration
## 1. Generate private key:
$
openssl
genrsa -out key.pem 2048
## 2. Create CSR:
$
openssl
req -new -key key.pem -out csr
## 3. Self-signed certificate:
$
openssl
x509 -req -in csr -signkey key.pem -out cert.pem -days 365
## 4. Run with SSL:
$
./server
<HOST> <PORT> --SSL
$ cat postgresql_setup.md
# PostgreSQL Setup
## 1. Install libpq:
$
sudo
pacman -S postgresql-libs
// Arch
# or
$
sudo
apt install libpq-dev
// Debian/Ubuntu
## 2. Create conninfo file:
$
cat
> conninfo
host=localhost port=5432 dbname=chatter
user=postgres password=your_password
# (Ctrl+D to save)
## 3. Build with database support:
$
make
WITH_DB=1 LOG_ON=1 DEBUG=0
$ ldd server | grep .so
// Dependencies & Libraries
openssl
// SSL/TLS encryption
libpq
// PostgreSQL client (optional)
pthread
// threading support
crypto
// password hashing
C
OpenSSL
WebSocket
PostgreSQL
IPv6
Make
HTTP
RFC6455