Reverse Proxies, Ingress

RecipeCratesCategories
ratholeratholecat-network-programming
ngrokngrokcat-network-programming
nginxnginx proxy managercat-network-programming
pingorapingoracat-network-programming

rathole

rathole rathole-crates.io rathole-github rathole-lib.rs

Rathole⮳ is a lightweight and high-performance reverse proxy for NAT traversal, written in Rust. rathole is similar to tools like frp and ngrok.

NAT (Network Address Translation) can make it challenging to expose services on devices behind a NAT to the internet. Rathole helps to overcome this by allowing these services to be accessible via a server with a public IP.

Configuration of a service is split into the client side and the server side, and a token is mandatory.

  • Server Setup: On a server with a public IP, create a server.toml file with the necessary configurations.
# server.toml
[server]
bind_addr = "0.0.0.0:2333" # `2333` specifies the port that rathole listens for clients

[server.services.my_nas_ssh]
token = "use_a_secret_that_only_you_know" # Token that is used to authenticate the client for the service. Change to an arbitrary value.
bind_addr = "0.0.0.0:5202" # `5202` specifies the port that exposes `my_nas_ssh` to the Internet

Run:

./rathole server.toml
  • Client Setup: On the device behind NAT, create a client.[toml][p-toml] file to connect to the server.
# client.toml
[client]
remote_addr = "myserver.com:2333" # The address of the server. The port must be the same with the port in `server.bind_addr`

[client.services.my_nas_ssh]
token = "use_a_secret_that_only_you_know" # Must be the same with the server to pass the validation
local_addr = "127.0.0.1:22" # The address of the service that needs to be forwarded
./rathole client.toml

rathole can automatically determine to run in the server mode or the client mode, according to the content of the configuration file, if only one of [server] and [client] block is present.

ngrok

ngrok ngrok-crates.io ngrok-github ngrok-lib.rs

ngrok⮳ is a simplified API-first ingress-as-a-service that adds connectivity, security, and observability to your apps. ngrok-rust is the native and idiomatic crate for adding a public internet address with secure ingress traffic directly into your Rust apps.

// // COMING SOON

nginx

nginx proxy manager⮳.

pingora

pingora pingora-crates.io pingora-github pingora-lib.rs cat-asynchronous cat-network-programming

pingora is a library for building fast, reliable and evolvable network services.

// // COMING SOON