Some code of mine you may find useful
libencio 0.1
- stdio-like encryption layer
NX ALT-TAB handler (nxat)
- Allows NX Client to pass ALT+TAB combinations to remote window manager.
Connection-tracking UDP forwarder (udpfwd)
- Userspace tunnel for UDP connections.