GithubHelp home page GithubHelp logo

scamper-chat's Introduction

Scamper Chat

This is an IRC-like chat application consisting of a server, a command-line client and some libraries for shared code. It uses SCTP rather than TCP in its wire protocol, and the scamper library that makes it easy to write protocols using SCTP.

Features

  • Multiple chat rooms, IRC-style, with similar commands
  • Ansi-colored shell client
  • End-to-end Blowfish encryption on password-protected rooms - meaning that the server cannot decrypt the chat messages (the server does store a SHA-512 hash of the password to reject access, but has no way to decrypt messages).

This project serves as a demo of how to write servers with Scamper, in addition to being usable in its own right.

Requirements

If either of the latter are missing, the client will let you know.

Configuration

The client by default attempts to connect to a public server that is up for the time being (no promises), so it can be run with no arguments:

java -jar scamper-chat-client.jar

To connect to a different server, pass --port and --host on the command-line, e.g.

java -jar scamper-chat-client.jar --port 8007 --host foo.bar.com

The server can be configured similarly using command-line options

Subprojects

  • Scamper Hub - the server - build and run with java -jar
  • Scamper Chat CLI - command-line ansi-colored chat client featuring IRC-like commands (/join, /who, /rooms, etc.) - also build and run with java -jar

The rest are supporting projects for those:

  • Scamper Chat Common - POJO data types used in the wire protocol, and base classes for clients
  • Scamper Chat Message Types - Defines the Scamper MessageTypes that are used by client and server to choose handlers for particular kinds of messages
  • Scamper Chat Client Base - Base classes that provide a simple interface for writing scamper-chat clients

Downloads And Builds

Building is as simple as cloning this repository and running mvn install (Maven 3.2.x or later and JDK 8 recommended).

Wire Format

The wire-format is BSON with gzip compression for larger messages; encryption is applied to message bodies by the client and decrypted by receiving clients.

To-Do

Plenty of things could be done with this:

  • Get the server working with multiple-associations (SCTP allows a connection to be to multiple redundant machines)
  • Do something more like bitchx for the command-line client - this is complicated by the lack of a reliable way to get terminal dimensions in Java, though jline looks like it could help
    • This could be done by assuming a fixed console size, it just wouldn't be pretty
  • Implement additional IRC-like commands (it would pay to split this stuff out into command-objects in the CLI)
  • Swap out the JCE Blowfish with BCrypt or some JCE-independent implementation of Twofish to be done with needing the Java crypto extensions - math is not a munition, and the fact that this doesn't come built into Java is a ridiculous artifact of the 90s
  • Adapter Netty's SSL engine to server/client communication
    • Use certs to validate that you're really talking to the server you think you are

scamper-chat's People

Contributors

timboudreau avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

scamper-chat's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.