- Java 100%
| .idea | ||
| doc | ||
| src | ||
| build.gradle | ||
| id_dsa | ||
| id_dsa.pub | ||
| id_dsa_with_password_foobar | ||
| id_dsa_with_password_foobar.pub | ||
| id_ecdsa | ||
| id_ecdsa.pub | ||
| id_ecdsa_with_password_foobar | ||
| id_ecdsa_with_password_foobar.pub | ||
| id_rsa | ||
| id_rsa.pub | ||
| id_rsa_with_password_foobar | ||
| id_rsa_with_password_foobar.pub | ||
| LICENSE | ||
| README.md | ||
| settings.gradle | ||
TcpIpAux
Java TCP/IP wrapper with optional encryption and ZLIB compression. The utility is message/package oriented rather than stream oriented. Implicating that clients/server are send/receiving messages i.e. (byte buffers/vectors). The interface is asynchronous, implicating that the wrapper starts a reading thread and deliver read messages via a callback when messages becomes available.Client connection may be synchronous or asynchronous.
When creating a client it's possible to define whatever compression and or encryption should be used or not. Three modes are available
- plain, plain socket without encryption and compression
- encrypt, AES 256 bit encryption
- compression, ZLIB compression
Further more it is also possible to configure the server to require that the initialization of a connection require thyat clients provides a SSH key authorization. Then configuring SSH authorization the server must have access to client public keys. When the client connects it will sign the initial server sync message with its private SSH key. The server will verify the message using the client public SSH key.
The encryption is AES 256 bit encryption with X25519 key exchange (Diffie-Hellman key exchange using Curve25519). The ZLIB is based on the package from JCraft http://www.jcraft.com/jzlib/
A client and server sample is found in the package com.hoddmimes.tcpip.sample
- [Client Sample] (https://github.com/hoddmimes/TcpIpAux/blob/master/src/main/java/com/hoddmimes/tcpip/sample/Client.java)
- [Server Sample] (https://github.com/hoddmimes/TcpIpAux/blob/master/src/main/java/com/hoddmimes/tcpip/sample/Server.java)
When a connection is established an initial message is exchanged between the client and server outside the application message flow. This takes place hidden for the application. The message sequence is the following
Client --> Server: InitRqst (optional SSH key signed)
Server --> Client: InitRsp