mystic-crypt is designed as a Java library that can be used for simple and complex encryption and decryption.
The source code for the library is available under https://github.com/astrapi69/mystic-crypt
For demonstration what the library can do there is a graphical client:
The source code for the ui is available under https://github.com/astrapi69/mystic-crypt-ui
SocketSwitchboard is a virtual proxy, router, or VPN. It uses an XML configuration to map incoming traffic on one or more ports to designated hosts and ports on the LAN or on the Internet. It supports complex boolean access restrictions and SSL.