1
0
mirror of https://github.com/Ylianst/MeshCentralRouter synced 2026-03-02 11:21:10 +00:00

Fixed auth cookie freshness issue.

This commit is contained in:
Ylian Saint-Hilaire
2021-02-23 12:50:23 -08:00
parent 3c8545e957
commit 813b70559c
4 changed files with 1230 additions and 494 deletions

View File

@@ -24,7 +24,7 @@ namespace MeshCentralRouter
public MainForm parent;
public MeshMapper mapper;
public string host;
public string authCookie;
//public string authCookie;
public string certhash;
public bool xdebug = false;
public bool inaddrany = false;
@@ -67,7 +67,7 @@ namespace MeshCentralRouter
mapper.inaddrany = inaddrany;
mapper.certhash = certhash;
mapper.onStateMsgChanged += Mapper_onStateMsgChanged;
string serverurl = "wss://" + host + "/meshrelay.ashx?auth=" + Uri.EscapeDataString(authCookie) + "&nodeid=" + node.nodeid;
string serverurl = "wss://" + host + "/meshrelay.ashx?nodeid=" + node.nodeid;
if (protocol == 1) {
serverurl += ("&tcpport=" + remotePort);
if (remoteIP != null) { serverurl += "&tcpaddr=" + remoteIP; }
@@ -75,7 +75,7 @@ namespace MeshCentralRouter
serverurl += ("&udpport=" + remotePort);
if (remoteIP != null) { serverurl += "&udpaddr=" + remoteIP; }
}
mapper.start(protocol, localPort, serverurl, remotePort, remoteIP);
mapper.start(parent.meshcentral, protocol, localPort, serverurl, remotePort, remoteIP);
UpdateInfo();
}