~lastrosade/MNC

Minimal Node Chat (Clientless)
Added options for specifying ssl ports
TLS in README
Readability, Messages Max Length, Changed License

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~lastrosade/MNC
read/write
git@git.sr.ht:~lastrosade/MNC

You can also use your local clone with git send-email.

#MNC

Minimal Node Chat

This is a very minimalist tcp chat application

The only clients you need are either netcat (recommended) or telnet

#Getting Started

git clone https://gitgud.io/jeremy.shields/MNC.git
npm i
node index.js

#Prerequisites

npm and node

#Usage

-h [Host] Specify the host

-1 [Port] Specify the reading server port

-2 [Port] Specify the writing server port

-3 [Port] Specify an alternative reading port for ssl

-4 [Port] Specify an alternative writing port for ssl

-m length Specify the maximum message length

-d Dev mode, Verbose

then netcat or telnet to the reading and writing server

eg: netcat localhost 44031

#Built With

#TLS

Using stunnel

Generate a certificate

openssl req -newkey rsa:2048 -nodes -keyout key.pem -x509 -days 365 -out certificate.pem

Create Stunnel config files

p1.stunnel

; TLS front-end to a web server
fips=no

[https]
accept=44034
connect=44033
cert=/path/to/certificate.pem
key=/path/to/key.pem

p2.stunnel

; TLS front-end to a web server
fips=no

[https]
accept=44045
connect=44044
cert=/path/to/certificate.pem
key=/path/to/key.pem

Start the two stunnel instances

stunnel p1.stunnel

stunnel p2.stunnel

Then users can connect with

openssl s_client -connect domain.tld:44034

openssl s_client -connect domain.tld:44045

or

gnutls-cli domain.tld -p 44034

gnutls-cli domain.tld -p 44045

#Author

Jeremy Lee Shields

#License

This project is licensed under the BSD 3-Clause License - see the LICENSE file for details

#Issues

The windows telnet client is broken, instead of sending buffers of data, it send each and every keystrokes back to the server by default,

So for windows users I recommend using putty in raw mode.