Skip to content

falpi/MeshTunnel

Repository files navigation

MeshTunnel 🚇

.NET 8 License

A lightweight, cross-platform console version of MeshCentral Router, the tool that performs TCP/UDP port mapping thru the MeshCentral server.

🔍 Overview

MeshTunnel is a streamlined, console-based port forwarding tool derived from MeshCentral Router.
While the original project is Windows-only and GUI-driven, MeshTunnel:
Runs anywhere – Pure .NET 8 rewrite for full Linux/macOS/Windows support
Keeps compatibility – Works with existing MeshCentral servers and .mcrouter rule files
Simplifies automation – No GUI overhead, ideal for scripting and headless environments

🚀 Key Differences

Feature Original MeshTunnel
Platform Windows-only Cross-platform
Interface GUI Console
.mcrouter support
Dependencies WinForms Pure .NET 8

⚙️ Build

There are already three different publish profiles for Windows, MacOS, and Linux for building the project. These can be invoked from the IDE or from the command line as follows:

dotnet publish -p:PublishProfile=publish-win-x64
dotnet publish -p:PublishProfile=publish-osx-x64
dotnet publish -p:PublishProfile=publish-linux-x64

🛠️ Usage

MeshTunnel myrules.mcrouter

📁 Mapping Rules File Format

The sample.mcrouter file illustrates the minimum subset of attributes needed to configure one or more mapping rules, according to the format established by the original "MeshCentral Router" tool. You can build these files manually or create the rules using the MeshCentral Router GUI for Windows and then export them in JSON format. The following is an example of the configuration file.

{
  "hostname": "mesh.example.com/?key=optional_login_key",
  "username": "admin",
  "password": "manager",
  "mappings": [{
      "nodeName": "DBSERVER",
      "name": "MySQL Rule",
      "nodeId": "node//9876543210",
      "protocol": 0,
      "localPort": 3306,
      "remotePort": 3306
    }
  ]
}

🙌 Credits

Not affiliated with the MeshCentral project.

About

A lightweight, cross-platform console version of MeshCentral Router, the tool that performs TCP/UDP port mapping thru the MeshCentral server.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Contributors

Languages