Ylianst / MeshCentral

A complete web-based remote monitoring and management web site. Once setup you can install agents and perform remote desktop session to devices on the local network or over the Internet.
https://meshcentral.com
Apache License 2.0
4.3k stars 574 forks source link

URL managment. #6332

Closed fordcrews closed 3 months ago

fordcrews commented 3 months ago

I think it would be great if the ability to store links to url's in each group and ability to ssh to hosts that the agent can't be installed on such as firewalls, SANS, and switches would be great. To make this like a one stop secure way to get to all your assets.

si458 commented 3 months ago

this is already partely possible,

you should add "ssh": true under your domains inside of config.json then pick the following:

creating a relay group

  1. install meshagent on a device
  2. create a No agent devices relayed thru agent group and select the remote device which has meshagent installed on
  3. click add agent, then type in its IP address or dns name (must be reachable from the meshagent) and specify what type of device it is
  4. then click new device, then use like a normal device

create a local only group

  1. make sure you are in HYBRID OR LAN MODE!
  2. create a Local devices, no agent group
  3. click add agent, then type in its IP address or dns name (must be reachable from the meshagent) and specify what type of device it is
  4. then click new device, then use like a normal device

as for notes/links:

use the notes button on each device to store information then you can also set "showNotesPanel": true under your domains inside of config.json then when you select a device, it will show a notes panel at the side (note: the showNotesPanel is read only, to write you still must use the notes button and edit from there)

si458 commented 3 months ago

currently also the showNotesPanel doesnt apply to the group notes, only the device notes did you want a seperate value like showNotesPanelInGroups ?

as you can store notes in groups already

si458 commented 3 months ago

also attaching onto this old issue about using markdown in notes! https://github.com/Ylianst/MeshCentral/issues/4091

fordcrews commented 3 months ago

I really just wanted to be able to click a link and go there, have something like workfirewall that goes to https://workfirewall:8443, using either the mesh network, or tailscale/wireguard address. I have to many devices on to many odd ports that can't be as easily managed through ssh, if at as as they can a webui. Trying to get it all in one place, so I don't have to use 3 or 4 different tools.

si458 commented 3 months ago

Oh, that's not the way meshcentral is designed! And would be very complex to build into the web ui! You can already do the web relay which works as explained above. create a relay group then right click the devices https text and you can specify a different port for that device So that will kinda help, You would just need to create a device for each item you want to access

Or

Look into using the meshcentralrouter and that can do port relaying to other devices using a remote agent

fordcrews commented 3 months ago

I was really hoping notes could have a function like

function convertToLink(text) {
    const regex = /(\b(?:http|https):\/\/[^\s]+)|(<([^>]+)>-->(\b(?:http|https):\/\/[^\s]+))/g;

    return text.replace(regex, (match, p1, p2, p3, p4) => {
        if (p1) {
            // If the match is just the URL
            return `<a href="${p1}">${p1}</a>`;
        } else if (p2 && p3 && p4) {
            // If the match is in the format <sitename>-->URL
            return `<a href="${p4}">${p3}</a>`;
        }
    });
} 

called before being displayed, so if so if notes contained "Check this link: https://server:port" it would make a proper <a href> that could be clicked or if it contained, <Router Admin Page>-->https://server:port you would get a clickable link <Router Admin Page>

I have a bunch of websites I manage for people, that might have a geoserver, a document management system, print server, webmail server, all on different ports on same machine.

Would just be nice to be able to organize them in the notes, or
even just allow links maybe on one of the other tabs along with notes.

Wasn't wanting changes in how it worked, just allowing it to store more details about a machine.

Maybe I didn't describe what I was looking for well.

si458 commented 3 months ago

markdown already does this if you check my recent post https://github.com/Ylianst/MeshCentral/issues/4091#issuecomment-2308937407 also a cheatsheet too https://www.markdownguide.org/cheat-sheet/

it can convert [printer ssl with custom port](https://192.168.1.123:8182) into <a href="https://192.168.1.123:8182">printer ssl with custom port</a>

si458 commented 3 months ago

also just putting this here that the markdownjs plugin i was talking about in #4091 will automatically convert web links for you as in my example below! image

so keep watching #4091 for updates or add your 2 pennys in on that issue! all throughts welcome!

fordcrews commented 3 months ago

Duh, somehow I had missed the title I was expecting just https://address:port to work.

si458 commented 3 months ago

Duh, somehow I had missed the [title](https://www.example.com) I was expecting just https://address:port to work.

Yes currently this doesn't work, BUT I am looking at adding the markdown to notes which means that links will indeed work! Just need to do some sanitazing of text etc first before I upload and you can test a build :)

si458 commented 3 months ago

added for you! will be in latest docker master build or npm builds for testing ghcr.io/ylianst/meshcentral:master or npm install Ylianst/MeshCentral (remember no translations in npm build) or wait until next release

b8two commented 2 months ago

Can the default for the links to be open in a new tab/window?