Skip to content

Latest commit

 

History

22 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RatholeGUI

Latest release Build License: MPL 2.0 .NET 8 Windows

RatholeGUI is a lightweight Windows Forms application designed to automate the configuration and deployment of Rathole reverse proxy services across a pair of Linux servers.

Overview

image

RatholeGUI simplifies the process of:

  • Generating .toml configuration files for Rathole;
  • Uploading these configuration files to remote Linux servers via SSH/SFTP;
  • Running and stopping Rathole on both server and client machines;
  • Checking whether Rathole is currently running.

This tool is especially useful for setting up reverse proxy tunnels quickly without manually editing config files or running commands.

Features

  • Automatically generates Rathole configuration files based on configured services.
  • Supports secure upload of configs via SSH/SFTP to both server and client machines.
  • Provides basic remote control over Rathole execution.
  • Saves connection/configuration data in local data.json.
  • Pick a port from a running application instead of typing it by hand (see below).
  • Dark themed UI: custom-drawn controls, a resizable window and per-service validation shown inline.

Adding a service from a running application

Typing 127.0.0.1:25565 by hand means knowing the port in the first place. Two buttons do it for you:

  • Add from running app (services header) — creates a whole service from a port you pick;
  • From app (inside a service card) — fills only the client address and port of that service.

Both open a picker that lists every application currently listening on this PC, together with its process name, PID, protocol, bind address and a hint about what the port usually is (MySQL, Minecraft Java, RDP, …). The list is read straight from Windows via GetExtendedTcpTable / GetExtendedUdpTable, so it does not probe the network and needs no elevation.

Picking an entry fills in:

  • the client address — 127.0.0.1 when the application listens on 0.0.0.0, otherwise the exact address it is bound to;
  • the client port, and the same port on the server side when it is still free;
  • a service name derived from the process (minecraft-server-25565);
  • a freshly generated random token.

UDP is hidden by default (browsers and Windows services open dozens of short-lived UDP sockets); tick UDP in the picker when you need to forward one. Hide system processes filters out svchost and friends.

The scan looks at the machine running RatholeGUI. When the Rathole client lives on another host, that host's ports are not listed — fill those in manually.

Do not commit your real data.json: it can contain SSH addresses, usernames and passwords. Use PortsAppGui/data.example.json as a template.

Requirements

On the machine running the GUI:

On the two remote machines:

  • SSH access with a username and password (key-only servers are not supported yet);
  • the rathole binary already present in the directory you point the app at.

Download

Grab the latest build from the Releases page, unpack it anywhere and run PortsAppGui.exe — no installer. Everything the app stores stays next to the executable (data.json, connection-state.json, generated .toml files, ratholegui-error.log).

Build

dotnet build PortsAppGui/PortsAppGui.csproj

Run

dotnet run --project PortsAppGui/PortsAppGui.csproj

You can also open PortsAppGui/PortsAppGui.sln in Visual Studio and run the WinForms app from there.

Tests

PortsAppGui.Tests is a plain console runner (no test framework): it asserts config validation, TOML generation, token generation and the port scanner, and exits non-zero on the first failure.

dotnet run --project PortsAppGui.Tests/PortsAppGui.Tests.csproj

Configuration

Create a local config from the example:

PortsAppGui/data.example.json -> PortsAppGui/data.json

Then fill:

  • ServerAdress / ClientAdress in host:port format;
  • SSH usernames and passwords;
  • Rathole directories on both machines;
  • Local paths for generated client/server .toml files;
  • Services that should be proxied.

Example Generated Config

[server]
bind_addr = "0.0.0.0:2333"
heartbeat_interval = 20

[server.transport]
type = "tcp"

[server.transport.tcp]
nodelay = true
keepalive_secs = 20
keepalive_interval = 8

[server.services.example]
type = "tcp"
token = "change_me"
bind_addr = "0.0.0.0:8080"
nodelay = true

Notes

  • Keep data.json, .toml, .vs, bin and obj out of git.
  • If credentials were accidentally committed, rotate/change them.
  • The app currently uses the existing JSON field names like Adress for backward compatibility.
  • Unhandled exceptions are appended to ratholegui-error.log next to the working directory instead of closing the app silently.
  • Icons come from the Segoe MDL2 Assets font shipped with Windows 10/11; the UI simply drops the glyphs if it is missing.

About

Windows GUI for the Rathole reverse proxy: generates client/server .toml configs, uploads them over SSH/SFTP and starts or stops Rathole on both hosts. Includes a picker that reads ports straight from apps already running on your PC.

Topics

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages