Checkout this guide I published today. It walks through the code to do the secure tunneling part in ~20 lines of Rust, using Ockam a library to create end-to-end encrypted secure channels
Here open source, general purpose version for access to any cloud or resource in fact. This is specifically for SSH but can support any protocol or app with the vanilla SDKs and tunnelers - https://ziti.dev/blog/zitifying-ssh/
https://github.com/ockam-network/ockam/tree/develop/document...