-
Notifications
You must be signed in to change notification settings - Fork 573
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get web relay url via websocket #6484
Comments
The webrelay works slightly differently It gives u the url of ur relaydns or ur cert+relayport But then uses a special unique cookie, which then identifies what service etc u wanted to be relayed The is no special url as such! It's the cookie that makes it unique, So we would have to return the url and a cookie for u to set of that makes sense Would a simple json reply be ok? |
@si458 JSON data is certainly fine. Our main concern is that we don’t want to expose the entire General Tab to users, as it contains too much information. |
I believe that directly passing the cookie as a URL parameter to MeshCentral is also feasible. |
@YiuTerran no that's understandable! |
so after checking source code you actually generate the URL yourself based on information you should have
you get the also appid=1 - HTTP appid=2 - HTTPS i do agree tho maybe a websocket command to generate this URl would be a good idea tho! 💡 |
just started to implement this feature and then realised this already partly exists if its not ideal i can add the |
Thanks, i will try |
It seems |
If I configured multiple relay domains , how can i get a valid one to use? |
@YiuTerran it does work for relay groups, check out the meshctrl.js for source code, how it creates the websocket data Also I believe if u have multiple dns set for the relay it just round robins them so if one already in use it moved onto the next then the next then the next etc |
@YiuTerran sorry ive just relooked and rechecked, you are correct, |
But only meshcentral know which one is in use, I can't get it in my code...
Yep! Currently, when configured with multiple relay domains, there is no perfect way to obtain the relay URL. The only solution is to add a new WebSocket interface to achieve this purpose. |
Is your feature request related to a problem? Please describe.
Currently, we expose MeshCentral to users through an embedded iframe, and other functions work fine. However, when using the web relay feature, we cannot directly interact to obtain the relay URL via WebSocket; we must directly embed the General Information tab. This exposes too much information to users, while we only need a single link address.
Describe the solution you'd like
We can directly send commands to MeshCentral via WebSocket, and it will return a usable link. The browser can then open this link to complete the web relay.
Describe alternatives you've considered
Place the web relay-related buttons on a separate webpage instead of combining them with other general information. This way, we can avoid exposing too much information.
The text was updated successfully, but these errors were encountered: