jchat banner

jchat

6 devlogs
13h 18m 50s

A peer to peer chat and file sharing application written in java

This project uses AI

Used gemini for help with small networking

Demo Repository

Loading README...

brny

Release 1.0

Not a lot of new features dropped, only some quality of life ones.

new stuff:

  • File hash is now compared after download
  • Docker container is fixed
  • Stable release!
  • And also added a logger that saves any crash logs into a file

This isn’t a huge devlog, but this is the last devlog before i ship this.
Thank you for reading this devlog.

git changelog

Attachment
Attachment
0
brny

woah, jchat can host files?

its official, jchat can host files.
it works similarly to bittorrent, but uses a custom protocol
the file hosting is ran on a separate thread and port so you can still chat while sharing files.
currently there is no encryption for it, but it works like this:

  1. we take the file, generate the root hash, and start listening
  2. when a client asks for the file, we start reading it in 1mb chunks, hashing that chunk and sending that chunk
  3. the file gets reconstructed on the other end

i used google guava to manage hashing of the files
basically, thats all for the user side updates in this devlog

some code technical stuff:

  • suppressed a lot of warnings, these were related to the typo warning and deprecation warning (suppressed on purpose)
  • code comments
  • begin working on a logger so the cli isn’t cluttered
    thank you for reading this devlog

git changelog

Attachment
0
brny

encrypted jchat?

jchat is now using encryption!

i managed to add encryption to jchat using google’s tink library. from now on every message is encrypted, wrapped in headers, and encoded in base 64 to ensure message integrity and privacy.

other new features:

  • patched a vulnerability where sending the linefeed character from a custom client would cause the server to crash, this was highlighted by one of my friends

plans:

  • protection against man in the middle attacks: the peer would periodically ask for the public key and if they don’t match up, it would disconnect.

thanks for reading this devlog

git changelog

Attachment
0
brny

jchat but base64?

hello people who actually read devlogs

lots of new features have been implemented
and lots of bugs have been squashed
these amazing new features include:

  • better errors and more error handling
  • relocated some functions so they are in a better place

- base 64 encoding!

encodes all handshakes and messages in base 64 to make sure that the messages are not corrupted, and to also defend against newline attacks

- docker image release

now there is an official jchat docker image on dockerhub, for testing on 1 machine.

and last but not least

- the router

the router is a part of jchat which makes discovering peers on a network easier. if you connect to a peer, you automatically exchange “peer lists” and by doing that, you can connect to peers that that peer knew but you didn’t.
why the name router tho? i called it router because it routes people to other peers
thanks for reading this devlog

git changelog for those who are interested

Attachment
0
brny

jchat update

the active client has been finished which allows you to connect to peers!

newly implemented features:

  • active client
  • nicknames

plans:

every peer would be a “router” which would be used to discover peers, and also keep track of peers. as a passive client you will be able to register to a router if you don’t know any peers

NOTE

All traffic is unencrypted, this is meant to be used on secure, internal and local networks NOT on the public internet.

git changelog

Attachment
0
brny

jchat!

whats this?
this is a peer to peer chat application written in java.
this is my first java project.

currently whats in this project?

  • a passive client ( a peer who is waiting for someone to connect to them)

future goals:

  • active client ( a peer who connects to a passive client)
  • usernames

why the lack of git commits?
im using a new IDE and I sometime forget to commit to github.

Attachment
0