TCP chat started from plutov/packagemain
go install github.com/redraw/microchat
or you can download a compiled binary from Releases
Usage of ./dist/microchat:
-addr string
port to run the server on (default ":8888")
-autojoin string
channel to join
-cert string
TLS certificate file (default "server.crt")
-key string
TLS key file (default "server.key")
-mode string
mode to run the app (server or client) (default "client")
-nick string
nickname to use in chat
-skip-verify
skip TLS certificate verification on client
-tls
enable TLS
microchat -mode=server -addr :4321
You can add TLS by passing your cert .crt and .key files,
microchat -mode=server -addr :4321 -tls -cert=server.crt -key=server.key
Here's a handy command to generate a self-signed cert,
openssl req -x509 -nodes -newkey rsa:4096 -keyout server.key -out server.crt -days 365 -subj "/CN=localhost"
microchat -addr :4321
You can also connect using TLS,
microchat -addr :4321 -tls