Skip to content

jsastriawan/mc2router-electron

Repository files navigation

Meshcentral 2 router - Electron JS version

An ElectronJS + Photonkit application to ease certain application tunneling via Meshcentral 2.

Dependencies

Client software:

  • Putty
  • FileZilla
  • Microsoft Remote Desktop Client or rdesktop on Linux

ElectronJS should be installed.

npm i -g electron@latest

Next, install the dependencies.

npm install

Configuration

Create config.json file to store your configuration.

{
    "mesh_url": "https://meshcentral.com/",    
	"mesh_username": "username",
	"mesh_passwordb64": "password encoded in base64",
	"ssh": "C:\\Program Files\\PuTTY\\putty.exe",
	"sftp": "C:\\Program Files\\FileZilla FTP Client\\filezilla.exe",
	"rdp": "C:\\Windows\\System32\\mstsc.exe",
	"use_proxy": false,
	"proxy_type": "socks",
	"proxy_host": "proxy.company.com",
	"proxy_port": "1080"
}

For Unix/Linux, please see config_template_linux.json.

How to run

> electron .

or if you install electron as dependency, you should have electron in your node_modules

> node_modules\electron\dist\electron.exe .

Custom application tunnelling

For more custom application tunneling, new command list JSON is added to add multiple list of application tunneling configurations.

{
    "cmds" :
    [ 
		{ "id": 1, "label": "VNC to port 5901", "cmdexec": "C:\\Program Files\\TightVNC\\tvnviewer.exe", "cmdargs" : "127.0.0.1::lport","cmdport":"5901"},
		{ "id": 2, "label": "VNC to port 5902", "cmdexec": "C:\\Program Files\\TightVNC\\tvnviewer.exe", "cmdargs" : "127.0.0.1::lport","cmdport":"5902"},
		{ "id": 3, "label": "VNC to port 5903", "cmdexec": "C:\\Program Files\\TightVNC\\tvnviewer.exe", "cmdargs" : "127.0.0.1::lport","cmdport":"5903"},
		{ "id": 4, "label": "SSH port 22", "cmdexec": "C:\\Program Files\\PuTTY\\putty.exe", "cmdargs" : "-ssh 127.0.0.1 -P lport","cmdport":"22"}
    ]
}

For Linux, see cmds-linux.json

Each entry need to have:

  • label: This will be used as the title
  • cmdexec: The path to binary/script to execute
  • cmdargs: Commandline argument, please specify the target port of the application as string 'lport'
  • cmdport: Target port at the destination device

Credit

  • Ylian St Hilaire
  • Piero Fioravanti
  • Shafin Jadavji
  • Rico Cantrell
  • Luca Levati

Todo

  • Add command list editor

About

Meshcentral 2 tunneling helper application

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published