rathole
A lightweight and high-performance reverse proxy for NAT traversal, written in Rust. An alternative to frp and ngrok.
Alternatives
Tech stack
No tech stack added yet. Sign in to suggest some
Note: We couldn't fetch the official website (GitHub repository) page this time. The content below is based on existing knowledge of the project, so please refer to the repository README and documentation for specific details.
Introduction
rathole is an open-source tool for NAT traversal (internal network penetration), written in Rust. Using a reverse proxy, it exposes services running on devices behind a NAT or firewall without a public IP (such as SSH, NAS admin pages, web services, game servers, etc.) to the internet through a server that has a public IP. It is positioned similarly to frp and ngrok, but puts more emphasis on performance, resource usage, and security.
How it works
- Server: Deployed on a server with a public IP (such as a VPS). It listens on a control port and opens a public-facing port for each service.
- Client: Runs on the device in the internal network. It actively connects to the server and forwards traffic received on the public port to the local service.
Key features
- High performance: High throughput, and stays fairly stable even with many connections.
- Low resource usage: Low memory footprint. The binary can be trimmed down to a very small size, so it can run on embedded devices such as routers.
- Security: Every service must be configured with its own token for authentication. You can choose the Noise Protocol or TLS to encrypt transport, and end-to-end encryption (Noise) is possible without configuring any extra certificates.
- Hot configuration reload: After you edit the configuration file, services can be added or removed dynamically without restarting the process.
- Multiple transports: Supports TCP, TLS, Noise, WebSocket, and more.
- TCP and UDP forwarding: Suitable for all kinds of port-based services.
Who it's for
- Individual users who want to access their home NAS, soft router, or HomeLab from outside the network
- Developers and operations staff who need to expose internal services temporarily or long term
- Users who need tunneling on resource-constrained devices (routers, dev boards)
- Users looking for a more lightweight alternative to frp
Deployment
- Download the prebuilt binary for your platform from GitHub Releases. You can also use the Docker image or build it yourself with Cargo.
- On the public server, write the server configuration (TOML format), for example:
[server]
bind_addr = "0.0.0.0:2333"
[server.services.my_nas_ssh]
token = "使用一个安全的随机字符串"
bind_addr = "0.0.0.0:5202"
- On the internal network device, write the client configuration:
[client]
remote_addr = "服务器公网地址:2333"
[client.services.my_nas_ssh]
token = "与服务端一致的 token"
local_addr = "127.0.0.1:22"
- Run
rathole server.tomlandrathole client.tomlrespectively. The program automatically determines the run mode from the contents of the configuration, or you can specify it explicitly with--server/--client. - For long-term operation, you can set it up as a systemd service.
Technical requirements
- A server with a public IP to run the server side
- Supports major platforms such as Linux, macOS, and Windows, as well as multiple CPU architectures
- Configuration files use the TOML format
Notable characteristics
- Compared with frp, rathole focuses more on the core function of port forwarding, and has fewer extras such as HTTP virtual hosts or a web admin dashboard. When you need domain-based HTTP routing, you usually need to use it together with a reverse proxy such as Nginx or Caddy.
- The project is released under the Apache-2.0 open-source license, is fully self-hosted, and does not depend on any third-party relay service.
Discover more
CapRover
Scalable PaaS (automated Docker+nginx) - aka Heroku on Steroids
GitProxy
Deploy custom push protections and policies on top of Git
Outline Server
A proxy server that runs a Shadowsocks instance for each access key and a REST API to manage the access keys.
g3proxy
Enterprise-oriented Generic Proxy Solutions. Maintenance mode now, please switch to use [VEY](https://github.com/VEY-OSS/vey) for new development efforts
imagor
Fast, secure image processing server and Go library, using libvips
socks5-proxy-server
SOCKS5 proxy server with built-in authentication and Telegram-bot for user management and user statistics on data spent (handy when you pay per GB of data). It is dockerised and simple to install.