1
0
mirror of https://github.com/Ylianst/MeshCentralRouter synced 2025-12-15 07:43:38 +00:00

Added alternative port support in device tab.

This commit is contained in:
Ylian Saint-Hilaire
2020-03-22 14:29:07 -07:00
parent 6c076f3777
commit 6840b9018b
7 changed files with 2071 additions and 18 deletions

View File

@@ -89,5 +89,19 @@ namespace MeshCentralRouter
parent.meshcentral.setRdpPort(node, form.rdpPort);
}
}
private void toolStripMenuItem1_Click(object sender, System.EventArgs e)
{
int port = 0, appid = 0;
if (altPortContextMenuStrip.SourceControl == httpButton) { appid = 1; port = 80; } // HTTP
if (altPortContextMenuStrip.SourceControl == httpsButton) { appid = 2; port = 443; } // HTTPS
if (altPortContextMenuStrip.SourceControl == scpButton) { appid = 5; port = 22; } // SCP
if (altPortContextMenuStrip.SourceControl == sshButton) { appid = 4; port = 22; } // SSH
if (appid == 0) return;
altPortForm form = new altPortForm();
form.altPort = port;
if ((form.ShowDialog(this) == DialogResult.OK)) { parent.QuickMap(1, form.altPort, appid, node); }
}
}
}