1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-02-12 11:01:52 +00:00

improved proxy support in ClickOnce application.

This commit is contained in:
Ylian Saint-Hilaire 2019-03-19 09:54:52 -07:00
parent d8fcbbef41
commit 747586cdd9
11 changed files with 71 additions and 77 deletions

View file

@ -461,7 +461,7 @@ function createMeshCore(agent) {
} }
case 'getclip': { case 'getclip': {
// Send the load clipboard back to the user // Send the load clipboard back to the user
sendConsoleText('getClip: ' + JSON.stringify(data)); //sendConsoleText('getClip: ' + JSON.stringify(data));
if (require('MeshAgent').isService) if (require('MeshAgent').isService)
{ {
require('clipboard').dispatchRead().then(function (str) { mesh.SendCommand({ "action": "msg", "type": "getclip", "sessionid": data.sessionid, "data": str }); }); require('clipboard').dispatchRead().then(function (str) { mesh.SendCommand({ "action": "msg", "type": "getclip", "sessionid": data.sessionid, "data": str }); });
@ -474,7 +474,7 @@ function createMeshCore(agent) {
} }
case 'setclip': { case 'setclip': {
// Set the load clipboard to a user value // Set the load clipboard to a user value
sendConsoleText('setClip: ' + JSON.stringify(data)); //sendConsoleText('setClip: ' + JSON.stringify(data));
if (typeof data.data == 'string') if (typeof data.data == 'string')
{ {
if (require('MeshAgent').isService) if (require('MeshAgent').isService)
@ -1177,22 +1177,20 @@ function createMeshCore(agent) {
case 'getclip': case 'getclip':
if (require('MeshAgent').isService) { if (require('MeshAgent').isService) {
require('clipboard').dispatchRead().then(function (str) { sendConsoleText(str, sessionid); }); require('clipboard').dispatchRead().then(function (str) { sendConsoleText(str, sessionid); });
} } else {
else {
require("clipboard").read().then(function (str) { sendConsoleText(str, sessionid); }); require("clipboard").read().then(function (str) { sendConsoleText(str, sessionid); });
} }
break; break;
case 'setclip': { case 'setclip': {
if (args['_'].length != 1) { if (args['_'].length != 1) {
response = 'Proper usage: setclip (text)'; response = 'Proper usage: setclip "sample text"';
} } else {
else {
if (require('MeshAgent').isService) { if (require('MeshAgent').isService) {
require('clipboard').dispatchWrite(args['_'][0]); require('clipboard').dispatchWrite(args['_'][0]);
response = 'Setting clipboard to: ' + args['_'][0]; response = 'Setting clipboard to: "' + args['_'][0] + '"';
} }
else { else {
require("clipboard")(args['_'][0]); response = 'Setting clipboard to: ' + args['_'][0]; require("clipboard")(args['_'][0]); response = 'Setting clipboard to: "' + args['_'][0] + '"';
} }
} }
break; break;

File diff suppressed because one or more lines are too long

View file

@ -156,13 +156,9 @@ module.exports.CertificateOperations = function (parent) {
var extensions = [{ name: "basicConstraints", cA: false }, { name: "keyUsage", keyCertSign: false, digitalSignature: true, nonRepudiation: false, keyEncipherment: true, dataEncipherment: (extKeyUsage.serverAuth !== true) }, extKeyUsage, { name: "subjectKeyIdentifier" }]; var extensions = [{ name: "basicConstraints", cA: false }, { name: "keyUsage", keyCertSign: false, digitalSignature: true, nonRepudiation: false, keyEncipherment: true, dataEncipherment: (extKeyUsage.serverAuth !== true) }, extKeyUsage, { name: "subjectKeyIdentifier" }];
if (extKeyUsage.serverAuth === true) { if (extKeyUsage.serverAuth === true) {
// Set subjectAltName according to commonName parsing.
// set subjectAltName according to commonName parsing.
// Ideally, we should let opportunity in given interface to set any type of altNames according to node_forge library // Ideally, we should let opportunity in given interface to set any type of altNames according to node_forge library
// such as type 2, 6 and 7 // such as type 2, 6 and 7. (2 -> DNS, 6 -> URI, 7 -> IP)
// 2 -> DNS
// 6 -> URI
// 7 -> IP
var altNames = []; var altNames = [];
// According to commonName parsing (IP or DNS), add URI and DNS and/or IP altNames // According to commonName parsing (IP or DNS), add URI and DNS and/or IP altNames
@ -176,7 +172,7 @@ module.exports.CertificateOperations = function (parent) {
} }
altNames.push({ type: 6, value: "http://" + commonName + "/" }) altNames.push({ type: 6, value: "http://" + commonName + "/" })
// add localhost stuff for easy testing on localhost ;) // Add localhost stuff for easy testing on localhost ;)
altNames.push({ type: 2, value: "localhost" }); altNames.push({ type: 2, value: "localhost" });
altNames.push({ type: 6, value: "http://localhost/" }); altNames.push({ type: 6, value: "http://localhost/" });
altNames.push({ type: 7, ip: "127.0.0.1" }); altNames.push({ type: 7, ip: "127.0.0.1" });

View file

@ -1,6 +1,6 @@
{ {
"name": "meshcentral", "name": "meshcentral",
"version": "0.3.0-n", "version": "0.3.0-p",
"keywords": [ "keywords": [
"Remote Management", "Remote Management",
"Intel AMT", "Intel AMT",

File diff suppressed because one or more lines are too long

View file

@ -59,7 +59,7 @@ FONT.key {font-weight: bold; color: darkgreen}
<TR><TD ALIGN="LEFT"><TABLE CELLPADDING="2" CELLSPACING="0" BORDER="0" WIDTH="540"><TR><TD WIDTH="496"> <TR><TD ALIGN="LEFT"><TABLE CELLPADDING="2" CELLSPACING="0" BORDER="0" WIDTH="540"><TR><TD WIDTH="496">
<!-- Begin AppInfo --> <!-- Begin AppInfo -->
<TABLE><TR><TD COLSPAN="3">&nbsp;</TD></TR><TR><TD><B>Name:</B></TD><TD WIDTH="5"><SPACER TYPE="block" WIDTH="10" /></TD><TD>MeshCentral Mini-Router</TD></TR><TR><TD COLSPAN="3">&nbsp;</TD></TR><TR><TD><B>Version:</B></TD><TD WIDTH="5"><SPACER TYPE="block" WIDTH="10" /></TD><TD>2.0.0.25</TD></TR><TR><TD COLSPAN="3">&nbsp;</TD></TR><TR><TD><B>Publisher:</B></TD><TD WIDTH="5"><SPACER TYPE="block" WIDTH="10" /></TD><TD>Meshcentral.com</TD></TR><tr><td colspan="3">&nbsp;</td></tr></TABLE> <TABLE><TR><TD COLSPAN="3">&nbsp;</TD></TR><TR><TD><B>Name:</B></TD><TD WIDTH="5"><SPACER TYPE="block" WIDTH="10" /></TD><TD>MeshCentral Mini-Router</TD></TR><TR><TD COLSPAN="3">&nbsp;</TD></TR><TR><TD><B>Version:</B></TD><TD WIDTH="5"><SPACER TYPE="block" WIDTH="10" /></TD><TD>2.0.0.26</TD></TR><TR><TD COLSPAN="3">&nbsp;</TD></TR><TR><TD><B>Publisher:</B></TD><TD WIDTH="5"><SPACER TYPE="block" WIDTH="10" /></TD><TD>Meshcentral.com</TD></TR><tr><td colspan="3">&nbsp;</td></tr></TABLE>
<!-- End AppInfo --> <!-- End AppInfo -->