sltunnel

Crates.iosltunnel
lib.rssltunnel
version0.1.0
sourcesrc
created_at2020-10-13 14:13:37.803073
updated_at2020-10-13 14:13:37.803073
descriptionA simple TLS tunneling implementation, written in Rust.
homepagehttps://github.com/siketyan/sltunnel
repositoryhttps://github.com/siketyan/sltunnel
max_upload_size
id299231
size9,355
Natsuki Ikeguchi (siketyan)

documentation

https://github.com/siketyan/sltunnel/#readme

README

🚇 sltunnel

A simple TLS tunneling implementation, written in Rust.

What is TLS tunneling?

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.

What about sslh?

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!

Installation

[dependencies]
sltunnel = { path = "[path to crate]" }

Examples

In this case, let them to communicate between [::]:11234 and [::]:22334 via [::]:33445.

Server

The server listens on [::]:33445 with TLS and relays connections to [::]:11234.

$ cd ./examples/server
$ cargo build --release
$ ./target/release/sltunnel_server [::]:33445 [::]:11234

Client

The client listens on [::]:22334 and relays connections to [::]:33445 with TLS.

$ cd ./examples/client
$ cargo build --release
$ ./target/release/sltunnel_client [::]:22334 [::]:33445

Testing

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!

Commit count: 16

cargo fmt