explaingit

loopy-iri/ratholeengine

Analysis updated 2026-05-18

80ShellAudience · ops devopsComplexity · 5/5Setup · hard

TLDR

A management system built on rathole and Nginx that lets one server route incoming traffic by URL path to many outside servers over a reverse tunnel.

Mindmap

mindmap
  root((RatholeEngine))
    What it does
      Runs a reverse tunnel
      Routes traffic by URL path
      Manages many outside nodes
    Tech stack
      Bash scripts
      Python stdlib
      rathole and Nginx
    Roles
      Iran side panel
      Foreign node client
      Central web hub
    Transport modes
      TLS websocket
      UDP based mode
      Low layer passthrough
    Safety
      Snapshot before update
      Automatic rollback

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Set up a single entry server that routes visitors to different backend servers by URL path.

USE CASE 2

Manage several tunnel servers from one central web dashboard instead of logging into each by hand.

USE CASE 3

Switch a tunnel's transport method, such as to a UDP based mode, without changing user facing paths.

USE CASE 4

Update a running tunnel setup with an automatic rollback if the update breaks something.

What is it built with?

BashPythonNginxrathole

How does it compare?

loopy-iri/ratholeenginejwasham/docker-nukeunpaidattention/fable5-methodology
Stars807984
LanguageShellShellShell
Last pushed2020-02-12
MaintenanceDormant
Setup difficultyhardeasymoderate
Complexity5/51/53/5
Audienceops devopsdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · hard Time to first run · 1h+

Requires a domain, a TLS certificate, and root access on both the Iran-side server and each outside node.

In plain English

RatholeEngine is a set of shell and Python scripts that manage a reverse tunnel system built on two existing tools, rathole and Nginx. It is designed for a specific setup: one server inside Iran, reachable through a single domain, certificate, and port, that connects out to many separate servers located outside the country. Visitors reach the Iran facing server, and their traffic is routed to the right outside server based on the URL path they request, so only one port needs to be exposed on the Iran side while the outside servers expose no public port at all. The project defines three roles. The Iran side panel runs the rathole server and Nginx, and keeps track of every connected outside node. Each outside node runs a matching client program. A separate hub, written in plain Python with no extra dependencies, gives you one central web dashboard that can manage several of these setups over SSH at once, including rolling out updates to every server one at a time. Traffic between the Iran side and an outside node can travel over several different transport methods without changing anything else about how the tunnel is used: a default option that layers the tunnel over a TLS encrypted web socket, a UDP based mode meant for unreliable connections, a lighter unencrypted option, an alternative encrypted transport that skips certificates entirely, and a mode that passes traffic straight through at a lower network layer. Installing it is meant to be a single command that downloads the latest release and starts an installer, which can run fully interactively or be given all the needed settings, such as domain name and certificate paths, up front. Re-running the installer is safe: it detects an existing setup and either resumes a partial install or offers to wipe and start fresh. A command line tool lets you add and list outside nodes, check the overall status of certificates, ports, and services, and run a built in health check. Before any update is applied, the tool takes a full backup of the current configuration and running setup, checks that everything still works afterward, and automatically rolls back to the backup if anything fails, including a broken Nginx configuration. An uninstall command can remove any of the three roles, and it will not touch TLS certificates when doing so.

Copy-paste prompts

Prompt 1
Walk me through installing the Iran side panel and adding my first foreign node.
Prompt 2
Explain the difference between the websocket, UDP, and passthrough transport modes.
Prompt 3
Show me how the update process takes a snapshot and rolls back if something fails.
Prompt 4
Help me understand what the central hub dashboard can do that the command line tool cannot.

Frequently asked questions

What is ratholeengine?

A management system built on rathole and Nginx that lets one server route incoming traffic by URL path to many outside servers over a reverse tunnel.

What language is ratholeengine written in?

Mainly Shell. The stack also includes Bash, Python, Nginx.

How hard is ratholeengine to set up?

Setup difficulty is rated hard, with roughly 1h+ to a first successful run.

Who is ratholeengine for?

Mainly ops devops.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.