Skip to content

orcchg/ChatServer

Repository files navigation

ChatServer

Chat Server written in C++

Get it on Google Play

Key features:

  • Uses HTTP protocol, request / response parsing
  • REST API
  • Registration and authentication
  • Password encryption
  • Multi-channeling
  • Broadcast and dedicated messages
  • File transfer (IN PROGRESS...)
  • Secure messages transfering
  • Server CLI with a set of commands
  • Sample console Client

3rd-partly libraries:

  • SQLite
  • OpenSSL, BoringSSL
  • RapidJSON
  • googletest, gflags

Build:

  • mkdir build
  • cd build
  • cmake [-DDEBUG=true] [-DSECURE=true] ..
  • make -j

Run:

  • cd build
  • ./server/server [port] "run with root priviledges if port is 80"
  • ./client/client [config_file]
  • *** run as many clients as you want, use the same config_file ***

Config file example (see client/local.cfg)

  • IP: xxx.xxx.xxx.xxx
  • Port: 80

Secure messaging

Once two different clients have successfully logged in, they can start communicating securely. Each of them must perform the following commands first:

  • .pk - obtain an RSA key pair and store it in memory (key pair is generated if not exists).
  • .pe id - send public key to another peer with id specified.

Then some of peers could ask for secure communication with another peer typing the command:

  • .pr id - ask for secure communication to peer with id

Another peer could accept or reject an incoming request:

  • .pc id - accept request from peer with id and start secure communication.
  • .pd id - reject request from peer with id. Communicate without encryption.

Any peer could abort secure communication at any time:

  • .px id - abort (or reject, if not previously accepted) secure communication.

Secure communication aborts automatically, when any of peers logs out or gets dropped from chat.

License

See LICENSE

Version

Currently production version is 1.5.1.

Checkout ChatClient android app on Google Play !

About

HTTP Chat server corresponding to Chat client (Android). Supports authentication, message encrypting, load balancing, multi-channeling, broadcasting, API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages