1
0
mirror of https://github.com/Ylianst/MeshCentralRouter synced 2025-12-10 05:13:39 +00:00

Added local device group support.

This commit is contained in:
Ylian Saint-Hilaire
2021-04-28 00:45:17 -07:00
parent 1a8dd93886
commit d64fd051e8
7 changed files with 46 additions and 18 deletions

View File

@@ -70,9 +70,9 @@ namespace MeshCentralRouter
string serverurl;
int keyIndex = host.IndexOf("?key=");
if (keyIndex >= 0) {
serverurl = "wss://" + host.Substring(0, keyIndex) + "/meshrelay.ashx?nodeid=" + node.nodeid + "&key=" + host.Substring(keyIndex + 5);
serverurl = "wss://" + host.Substring(0, keyIndex) + "/" + ((node.mtype == 3)?"local":"mesh") + "relay.ashx?nodeid=" + node.nodeid + "&key=" + host.Substring(keyIndex + 5);
} else {
serverurl = "wss://" + host + "/meshrelay.ashx?nodeid=" + node.nodeid;
serverurl = "wss://" + host + "/" + ((node.mtype == 3) ? "local" : "mesh") + "relay.ashx?nodeid=" + node.nodeid;
}
if (protocol == 1) {
serverurl += ("&tcpport=" + remotePort);