diff --git a/MainForm.cs b/MainForm.cs index 3c7d9d0..f8da223 100644 --- a/MainForm.cs +++ b/MainForm.cs @@ -29,6 +29,7 @@ using System.Security.Cryptography.X509Certificates; using Microsoft.Win32; using System.Drawing; using System.Text; +using System.Web; namespace MeshCentralRouter { @@ -268,6 +269,7 @@ namespace MeshCentralRouter // Set automatic port map values if (authLoginUrl != null) { + string autoName = null; string autoNodeId = null; string autoRemoteIp = null; int autoRemotePort = 0; @@ -279,6 +281,7 @@ namespace MeshCentralRouter try { // Automatic mappings + autoName = getValueFromQueryString(authLoginUrl.Query, "name"); autoNodeId = getValueFromQueryString(authLoginUrl.Query, "nodeid"); autoRemoteIp = getValueFromQueryString(authLoginUrl.Query, "remoteip"); int.TryParse(getValueFromQueryString(authLoginUrl.Query, "remoteport"), out autoRemotePort); @@ -293,6 +296,7 @@ namespace MeshCentralRouter if (((autoRemotePort != 0) && (autoProtocol != 0) && (autoNodeId != null)) || ((autoNodeId != null) && ((autoAppId == 6) || (autoAppId == 7)))) { Dictionary map = new Dictionary(); + if (autoName != null) { map.Add("name", HttpUtility.UrlDecode(autoName)); } map.Add("nodeId", autoNodeId); if (autoRemoteIp != null) { map.Add("remoteIP", autoRemoteIp); } map.Add("remotePort", autoRemotePort);