A simple TLS tunneling implementation, written in Rust.
TLS tunneling is the way to transport any TCP packets via a TLS tunnel. Thanks to TLS, we can communicate with remote server more securely, through general firewalls.
sslh is a multiplexer of packets using their header bytes. It is not a problem in general home networks, but some network (e.g. schools or works) restricts to transport without correct TLS negotiation even in port 443.
TLS tunneling is different. The transportation through a TLS tunnel is completely negotiated as a TLS connection. Usually, the firewall accepts the connection even in schools or works!
[dependencies]
sltunnel = "0.1"
In this case, let them to communicate between [::]:11234
and [::]:22334
via [::]:33445
.
The server listens on [::]:33445
with TLS and relays connections to [::]:11234
.
$ cd ./examples/server
$ cargo build --release
$ ./target/release/sltunnel_server [::]:33445 [::]:11234
The client listens on [::]:22334
and relays connections to [::]:33445
with TLS.
$ cd ./examples/client
$ cargo build --release
$ ./target/release/sltunnel_client [::]:22334 [::]:33445
When both server and client is ready, run the command to check the connection:
$ nc -k -l 11223 &
$ echo "OK" > /dev/tcp/localhost/22334
If the console outputs "OK", it works!