mirror of
				https://github.com/Ylianst/MeshCentral.git
				synced 2025-03-09 15:40:18 +00:00 
			
		
		
		
	Merge branch 'master' of https://github.com/silversword411/MeshCentral
This commit is contained in:
		
						commit
						bed1c0c20e
					
				
					 13 changed files with 3258 additions and 3034 deletions
				
			
		
							
								
								
									
										21
									
								
								.github/workflows/release.yml
									
										
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								.github/workflows/release.yml
									
										
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,21 @@
 | 
			
		|||
name: Release
 | 
			
		||||
on:
 | 
			
		||||
  push:
 | 
			
		||||
    branches:
 | 
			
		||||
      - master
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  build:
 | 
			
		||||
    name: Release
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    steps:
 | 
			
		||||
      - name: Checkout
 | 
			
		||||
        uses: actions/checkout@v2
 | 
			
		||||
        with:
 | 
			
		||||
          fetch-depth: 0
 | 
			
		||||
      - name: Release
 | 
			
		||||
        uses: justincy/github-action-npm-release@2.0.2
 | 
			
		||||
        id: release
 | 
			
		||||
      - name: Print release output
 | 
			
		||||
        if: ${{ steps.release.outputs.released == 'true' }}
 | 
			
		||||
        run: echo Release ID ${{ steps.release.outputs.release_id }}
 | 
			
		||||
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							| 
						 | 
				
			
			@ -1 +1 @@
 | 
			
		|||
MeshService-signed.exe hashagents.js > hashagents.json
 | 
			
		||||
MeshService.exe hashagents.js > hashagents.json
 | 
			
		||||
| 
						 | 
				
			
			@ -1,8 +1,8 @@
 | 
			
		|||
var fs = require('fs');
 | 
			
		||||
 | 
			
		||||
var agents = {
 | 
			
		||||
    'MeshService-signed.exe': 3,
 | 
			
		||||
    'MeshService64-signed.exe': 4,
 | 
			
		||||
    'MeshService.exe': 3,
 | 
			
		||||
    'MeshService64.exe': 4,
 | 
			
		||||
    'meshagent_x86': 5,
 | 
			
		||||
    'meshagent_x86-64': 6,
 | 
			
		||||
    'meshagent_arm': 9,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -0,0 +1,134 @@
 | 
			
		|||
{
 | 
			
		||||
  "3": {
 | 
			
		||||
    "filename": "MeshService.exe",
 | 
			
		||||
    "hash": "C0E5DB22DE5DED510C48141D7CFE4807F98B8205D680F5FC8A5D15950F17A1465E0953B7BFA7FAEED72019E765E1C8E1",
 | 
			
		||||
    "size": 3680256,
 | 
			
		||||
    "mtime": "2022-04-04T17:13:59Z"
 | 
			
		||||
  },
 | 
			
		||||
  "4": {
 | 
			
		||||
    "filename": "MeshService64.exe",
 | 
			
		||||
    "hash": "47A927806EDB6DFAC2C79467719FADA0F3625010D551C6D0EA6EA7DB99F088C088E70F562416FC1809B014913CFEA7E0",
 | 
			
		||||
    "size": 3293184,
 | 
			
		||||
    "mtime": "2022-03-25T19:04:18Z"
 | 
			
		||||
  },
 | 
			
		||||
  "5": {
 | 
			
		||||
    "filename": "meshagent_x86",
 | 
			
		||||
    "hash": "E984791A6FB96E06191AEA1D7B3066AB8B2170DC7B8A64D7C9A605CDC79B463541D994587E85E3FD4644359329344734",
 | 
			
		||||
    "size": 3650016,
 | 
			
		||||
    "mtime": "2022-04-04T17:22:17Z"
 | 
			
		||||
  },
 | 
			
		||||
  "6": {
 | 
			
		||||
    "filename": "meshagent_x86-64",
 | 
			
		||||
    "hash": "F6A48178D7BCE798CDF36AC8F49D9650674E38E266DB396A84657EE8FD81BF85FA998456245F2AFE4A20FDD08CD73D2E",
 | 
			
		||||
    "size": 3724624,
 | 
			
		||||
    "mtime": "2022-04-04T17:22:25Z"
 | 
			
		||||
  },
 | 
			
		||||
  "7": {
 | 
			
		||||
    "filename": "meshagent_mips",
 | 
			
		||||
    "hash": "2D913C118114219CF127D9415174645A3F11464A4B13D07A702AFC2A836381C52C4A2854403215DAFF4582C058E8B824",
 | 
			
		||||
    "size": 4522304,
 | 
			
		||||
    "mtime": "2022-04-04T17:22:32Z"
 | 
			
		||||
  },
 | 
			
		||||
  "9": {
 | 
			
		||||
    "filename": "meshagent_arm",
 | 
			
		||||
    "hash": "AD1C9D2A1E468AEB26FD6443581C3CE3F5F8D0A3779BA0EA5BA06C20B5094B095B5F0D0F104B2F26053877E5D005FBAB",
 | 
			
		||||
    "size": 3132180,
 | 
			
		||||
    "mtime": "2022-04-04T17:22:41Z"
 | 
			
		||||
  },
 | 
			
		||||
  "13": {
 | 
			
		||||
    "filename": "meshagent_pogo",
 | 
			
		||||
    "hash": "F9E19D72922732BC4C9F84F90CAB380E6A3851B8137A69AB648E1B145BA4F257B5C2C47BBE36CBE62E364328854DD844",
 | 
			
		||||
    "size": 3140884,
 | 
			
		||||
    "mtime": "2022-04-04T17:22:51Z"
 | 
			
		||||
  },
 | 
			
		||||
  "15": {
 | 
			
		||||
    "filename": "meshagent_poky",
 | 
			
		||||
    "hash": "DFBF910AC01FE7D8BD2E6649908E0BBE0C553C12ACADB4C73C32BC65BCDCCDF336C39BA47A08C6659F9CB8E475C3677F",
 | 
			
		||||
    "size": 3776024,
 | 
			
		||||
    "mtime": "2022-04-04T17:23:00Z"
 | 
			
		||||
  },
 | 
			
		||||
  "16": {
 | 
			
		||||
    "filename": "meshagent_osx-x86-64",
 | 
			
		||||
    "hash": "77A87BCAE3534061CE15060C4F8971074B7AEBC88957CC9FF50BF8F6B234E3AFAE48DCB9A44681A24393F20191BB3DA1",
 | 
			
		||||
    "size": 4391904,
 | 
			
		||||
    "mtime": "2022-03-25T23:51:40Z"
 | 
			
		||||
  },
 | 
			
		||||
  "18": {
 | 
			
		||||
    "filename": "meshagent_poky64",
 | 
			
		||||
    "hash": "0DDF6A2CABC3B1D40CBE9CA4A6EB2103308F228D5332F64E3C9B01A54BC968B0120D2A50B71111D70682435A07577ABD",
 | 
			
		||||
    "size": 3478872,
 | 
			
		||||
    "mtime": "2022-04-04T17:23:11Z"
 | 
			
		||||
  },
 | 
			
		||||
  "19": {
 | 
			
		||||
    "filename": "meshagent_x86_nokvm",
 | 
			
		||||
    "hash": "2AFC43684BD2A2601FAA32BF86F35EAEB29CDD00ABE3BEB3446448EC44E3151E459909569044681C507FE11A82139914",
 | 
			
		||||
    "size": 3365188,
 | 
			
		||||
    "mtime": "2022-04-04T17:23:19Z"
 | 
			
		||||
  },
 | 
			
		||||
  "20": {
 | 
			
		||||
    "filename": "meshagent_x86-64_nokvm",
 | 
			
		||||
    "hash": "1B198D624FA99E4D6B52AD139A19259B491FA233A2783F5E4C46955A6AD37DDF5053D7F022C95C8F04684CCADFD2CC3D",
 | 
			
		||||
    "size": 3425584,
 | 
			
		||||
    "mtime": "2022-04-04T17:23:27Z"
 | 
			
		||||
  },
 | 
			
		||||
  "24": {
 | 
			
		||||
    "filename": "meshagent_arm-linaro",
 | 
			
		||||
    "hash": "2F5D211E983A738ABE31A6EAF4B73629FD937D34D5BD8380A420BAB7108040CA2320EADA8F02CFEF763A3C1D0EA8F1A2",
 | 
			
		||||
    "size": 2194704,
 | 
			
		||||
    "mtime": "2022-04-04T17:23:39Z"
 | 
			
		||||
  },
 | 
			
		||||
  "25": {
 | 
			
		||||
    "filename": "meshagent_armhf",
 | 
			
		||||
    "hash": "37F717A44CDA07F88D51A5FF9FD220FEA7F61307BD3A418CC8D9E45D9B9EDB1CB069A9398318E0DF2042C4D204657F7D",
 | 
			
		||||
    "size": 3166784,
 | 
			
		||||
    "mtime": "2022-03-25T23:37:14Z"
 | 
			
		||||
  },
 | 
			
		||||
  "27": {
 | 
			
		||||
    "filename": "meshagent_armhf2",
 | 
			
		||||
    "hash": "0AE840520D3B677B9767EA097F3AA5A1E24212529E688200F43935DB1541AB9FB441EC2C7BA8002D45299B04695FD037",
 | 
			
		||||
    "size": 2837724,
 | 
			
		||||
    "mtime": "2021-08-30T21:10:03Z"
 | 
			
		||||
  },
 | 
			
		||||
  "28": {
 | 
			
		||||
    "filename": "meshagent_mips24kc",
 | 
			
		||||
    "hash": "636B02BD3DD7DED0BB79FAF1B991F7DB89FF23DC1373D3F5E3EA76897B4BF44E8F00A57A3B6C87EBECA8142D9AD5B7B9",
 | 
			
		||||
    "size": 4163768,
 | 
			
		||||
    "mtime": "2022-03-25T23:38:44Z"
 | 
			
		||||
  },
 | 
			
		||||
  "29": {
 | 
			
		||||
    "filename": "meshagent_osx-arm-64",
 | 
			
		||||
    "hash": "D1D8CDAF59105E4E8A753CCC9032F1653AE4DB973765E3E009CA9F352BA7B3C8E487B4F34BB9A0C4A629C29DE55FFF69",
 | 
			
		||||
    "size": 3911880,
 | 
			
		||||
    "mtime": "2022-03-25T23:51:40Z"
 | 
			
		||||
  },
 | 
			
		||||
  "30": {
 | 
			
		||||
    "filename": "meshagent_freebsd_x86-64",
 | 
			
		||||
    "hash": "4EA888AAD34D104E7FD898E4F331A9A65EB2EB85C7181DADF1E2A5C04B8F22B91B46AEBDC512D714D11D04B4C2B1EA3E",
 | 
			
		||||
    "size": 4657032,
 | 
			
		||||
    "mtime": "2022-03-25T23:51:56Z"
 | 
			
		||||
  },
 | 
			
		||||
  "32": {
 | 
			
		||||
    "filename": "meshagent_aarch64",
 | 
			
		||||
    "hash": "27B50D0696EA3156BA91CBE0EFC2775217A2DCB1BC7AB0B079DCDE52E7D2B3E2A2647FDC6F74087C4D8D748FD90F59AD",
 | 
			
		||||
    "size": 3227888,
 | 
			
		||||
    "mtime": "2022-03-25T23:34:50Z"
 | 
			
		||||
  },
 | 
			
		||||
  "40": {
 | 
			
		||||
    "filename": "meshagent_mipsel24kc",
 | 
			
		||||
    "hash": "31F3377C4703CFFDD6905FC0EFC96C4BB328474CE62BECB2E79860C5841CA9019EFC6945974847D03797EE49529DDDE0",
 | 
			
		||||
    "size": 4160072,
 | 
			
		||||
    "mtime": "2022-03-25T23:40:12Z"
 | 
			
		||||
  },
 | 
			
		||||
  "41": {
 | 
			
		||||
    "filename": "meshagent_aarch64-cortex-a53",
 | 
			
		||||
    "hash": "E6D65EB2F8013E4DB811E2E73150C063EB41DF8C9D8321D1F2CA2FAEEA7DBA203032AD4E95A467A0D8FD836E18EE3D0D",
 | 
			
		||||
    "size": 3059896,
 | 
			
		||||
    "mtime": "2022-03-25T23:41:28Z"
 | 
			
		||||
  },
 | 
			
		||||
  "10005": {
 | 
			
		||||
    "filename": "meshagent_osx-universal-64",
 | 
			
		||||
    "hash": "5AB5C0580E9B7B0689C20FD01561997D7B17CA5E14C747E981888C74B8CCECEE827E141ECF6CBD76C5040051C09DE840",
 | 
			
		||||
    "size": 8335560,
 | 
			
		||||
    "mtime": "2022-03-25T23:51:40Z"
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -721,8 +721,11 @@ function agentUpdate_Start(updateurl, updateoptions) {
 | 
			
		|||
                                }
 | 
			
		||||
                                catch (zz)
 | 
			
		||||
                                {
 | 
			
		||||
                                    sendConsoleText('Self Update encountered an error trying to restart service', sessionid);
 | 
			
		||||
                                    sendAgentMessage('Self Update encountered an error trying to restart service', 3);
 | 
			
		||||
                                    if (zz.toString() != 'waitExit() aborted because thread is exiting')
 | 
			
		||||
                                    {
 | 
			
		||||
                                        sendConsoleText('Self Update encountered an error trying to restart service', sessionid);
 | 
			
		||||
                                        sendAgentMessage('Self Update encountered an error trying to restart service', 3);
 | 
			
		||||
                                    }
 | 
			
		||||
                                }
 | 
			
		||||
                                break;
 | 
			
		||||
                        }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -638,7 +638,7 @@ module.exports.CreateWebRelay = function (parent, db, args, domain) {
 | 
			
		|||
            }
 | 
			
		||||
        } else {
 | 
			
		||||
            // Tunnel is now in web socket pass-thru mode
 | 
			
		||||
            if (header.connection.toLowerCase() == 'upgrade') {
 | 
			
		||||
            if ((typeof header.connection == 'string') && (header.connection.toLowerCase() == 'upgrade')) {
 | 
			
		||||
                // Websocket upgrade succesful
 | 
			
		||||
                obj.socketParseState = 2;
 | 
			
		||||
            } else {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										16
									
								
								meshuser.js
									
										
									
									
									
								
							
							
						
						
									
										16
									
								
								meshuser.js
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -3026,6 +3026,22 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
 | 
			
		|||
                            }
 | 
			
		||||
                        }
 | 
			
		||||
 | 
			
		||||
                        if ((typeof command.httpport == 'number') && (command.httpport > 0) && (command.httpport < 65536)) {
 | 
			
		||||
                            if ((command.httpport == 80) && (node.httpport != null)) {
 | 
			
		||||
                                delete node.httpport; change = 1; changes.push('httpport'); // Delete the HTTP port
 | 
			
		||||
                            } else {
 | 
			
		||||
                                node.httpport = command.httpport; change = 1; changes.push('httpport'); // Set the HTTP port
 | 
			
		||||
                            }
 | 
			
		||||
                        }
 | 
			
		||||
 | 
			
		||||
                        if ((typeof command.httpsport == 'number') && (command.httpsport > 0) && (command.httpsport < 65536)) {
 | 
			
		||||
                            if ((command.httpsport == 443) && (node.httpsport != null)) {
 | 
			
		||||
                                delete node.httpsport; change = 1; changes.push('httpsport'); // Delete the HTTPS port
 | 
			
		||||
                            } else {
 | 
			
		||||
                                node.httpsport = command.httpsport; change = 1; changes.push('httpsport'); // Set the HTTPS port
 | 
			
		||||
                            }
 | 
			
		||||
                        }
 | 
			
		||||
 | 
			
		||||
                        if ((typeof command.ssh == 'number') && (command.ssh == 0)) {
 | 
			
		||||
                            if ((node.ssh != null) && (node.ssh[user._id] != null)) { delete node.ssh[user._id]; change = 1; changes.push('ssh'); } // Delete the SSH cendentials
 | 
			
		||||
                        }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										18
									
								
								package.json
									
										
									
									
									
								
							
							
						
						
									
										18
									
								
								package.json
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -1,6 +1,6 @@
 | 
			
		|||
{
 | 
			
		||||
  "name": "meshcentral",
 | 
			
		||||
  "version": "1.0.43",
 | 
			
		||||
  "version": "1.0.45",
 | 
			
		||||
  "keywords": [
 | 
			
		||||
    "Remote Device Management",
 | 
			
		||||
    "Remote Device Monitoring",
 | 
			
		||||
| 
						 | 
				
			
			@ -37,33 +37,21 @@
 | 
			
		|||
    "sample-config-advanced.json"
 | 
			
		||||
  ],
 | 
			
		||||
  "dependencies": {
 | 
			
		||||
    "@yetzt/nedb": "^1.8.0",
 | 
			
		||||
    "archiver": "^5.3.1",
 | 
			
		||||
    "body-parser": "^1.19.0",
 | 
			
		||||
    "cbor": "~5.2.0",
 | 
			
		||||
    "compression": "^1.7.4",
 | 
			
		||||
    "cookie-session": "^1.4.0",
 | 
			
		||||
    "esprima": "^4.0.1",
 | 
			
		||||
    "express": "^4.17.0",
 | 
			
		||||
    "express-handlebars": "^5.3.5",
 | 
			
		||||
    "express-ws": "^4.0.0",
 | 
			
		||||
    "html-minifier": "^4.0.0",
 | 
			
		||||
    "image-size": "^1.0.1",
 | 
			
		||||
    "ipcheck": "^0.1.0",
 | 
			
		||||
    "jsdom": "^20.0.0",
 | 
			
		||||
    "loadavg-windows": "^1.1.1",
 | 
			
		||||
    "minify-js": "0.0.4",
 | 
			
		||||
    "minimist": "^1.2.5",
 | 
			
		||||
    "multiparty": "^4.2.1",
 | 
			
		||||
    "@yetzt/nedb": "^1.8.0",
 | 
			
		||||
    "node-forge": "^1.0.0",
 | 
			
		||||
    "node-windows": "^0.1.4",
 | 
			
		||||
    "otplib": "^10.2.3",
 | 
			
		||||
    "pg": "^8.7.1",
 | 
			
		||||
    "pgtools": "^0.3.2",
 | 
			
		||||
    "web-push": "^3.5.0",
 | 
			
		||||
    "ws": "^5.2.3",
 | 
			
		||||
    "yauzl": "^2.10.0",
 | 
			
		||||
    "yubikeyotp": "^0.2.0"
 | 
			
		||||
    "yauzl": "^2.10.0"
 | 
			
		||||
  },
 | 
			
		||||
  "engines": {
 | 
			
		||||
    "node": ">=10.0.0"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							| 
						 | 
				
			
			@ -112,6 +112,12 @@
 | 
			
		|||
    <div id="rfbPortContextMenu" class="contextMenu noselect" style="display:none;min-width:0px">
 | 
			
		||||
        <div class="cmtext" onclick="cmrfbportaction(1,event)">Alternate Port</div>
 | 
			
		||||
    </div>
 | 
			
		||||
    <div id="httpPortContextMenu" class="contextMenu noselect" style="display:none;min-width:0px">
 | 
			
		||||
        <div class="cmtext" onclick="cmhttpportaction(1,event)">Alternate Port</div>
 | 
			
		||||
    </div>
 | 
			
		||||
    <div id="httpsPortContextMenu" class="contextMenu noselect" style="display:none;min-width:0px">
 | 
			
		||||
        <div class="cmtext" onclick="cmhttpsportaction(1,event)">Alternate Port</div>
 | 
			
		||||
    </div>
 | 
			
		||||
    <div id="filesContextMenu" class="contextMenu noselect" style="display:none;min-width:0px">
 | 
			
		||||
        <div class="cmtext" onclick="cmfilesaction(1,event)">Rename</div>
 | 
			
		||||
        <div class="cmtext" onclick="cmfilesaction(2,event)">Edit</div>
 | 
			
		||||
| 
						 | 
				
			
			@ -3240,6 +3246,8 @@
 | 
			
		|||
                                node.rdpport = message.event.node.rdpport;
 | 
			
		||||
                                node.rfbport = message.event.node.rfbport;
 | 
			
		||||
                                node.sshport = message.event.node.sshport;
 | 
			
		||||
                                node.httpport = message.event.node.httpport;
 | 
			
		||||
                                node.httpsport = message.event.node.httpsport;
 | 
			
		||||
                                node.consent = message.event.node.consent;
 | 
			
		||||
                                node.pmt = message.event.node.pmt;
 | 
			
		||||
                                if (message.event.node.links != null) { node.links = message.event.node.links; } else { delete node.links; }
 | 
			
		||||
| 
						 | 
				
			
			@ -4575,8 +4583,8 @@
 | 
			
		|||
            // RDP link, show this link only of the remote machine is Windows.
 | 
			
		||||
            if ((((node.conn & 1) != 0) || (node.mtype == 3)) && (node.agent) && ((meshrights & 8) != 0) && (node.agent.id != 14)) {
 | 
			
		||||
                if (webRelayPort != 0) {
 | 
			
		||||
                    x += '<a href=# onclick=p10WebRouter("' + node._id + '",1,80)>' + "HTTP" + '</a> ';
 | 
			
		||||
                    x += '<a href=# onclick=p10WebRouter("' + node._id + '",2,443)>' + "HTTPS" + '</a> ';
 | 
			
		||||
                    x += '<a href=# onclick=p10WebRouter("' + node._id + '",1,' + (node.httpport ? node.httpport : 80) + ')>' + "HTTP" + ((node.httpport && (node.httpport != 80)) ? '/' + node.httpport : '') + '</a> ';
 | 
			
		||||
                    x += '<a href=# onclick=p10WebRouter("' + node._id + '",2,' + (node.httpsport ? node.httpsport : 443) + ')>' + "HTTPS" + ((node.httspport && (node.httpsport != 443)) ? '/' + node.httpsport : '') + '</a> ';
 | 
			
		||||
                }
 | 
			
		||||
                if ((node.agent.id > 0) && (node.agent.id < 5)) {
 | 
			
		||||
                    if (navigator.platform.toLowerCase() == 'win32') {
 | 
			
		||||
| 
						 | 
				
			
			@ -4588,12 +4596,12 @@
 | 
			
		|||
                if (node.agent.id > 4) {
 | 
			
		||||
                    if ((navigator.platform.toLowerCase() == 'win32') || (navigator.platform.toLowerCase() == 'macintel')) {
 | 
			
		||||
                        if ((serverinfo.devicemeshrouterlinks == null) || (serverinfo.devicemeshrouterlinks.ssh != false)) {
 | 
			
		||||
                            x += '<a href=# onclick=p10MCRouter("' + node._id + '",4,22)>' + "SSH" + '</a> ';
 | 
			
		||||
                            x += '<a href=# onclick=p10MCRouter("' + node._id + '",4,' + (node.sshport ? node.sshport : 22) + ')>' + "SSH" + '</a> ';
 | 
			
		||||
                        }
 | 
			
		||||
                    }
 | 
			
		||||
                    if (navigator.platform.toLowerCase() == 'win32') {
 | 
			
		||||
                        if ((serverinfo.devicemeshrouterlinks == null) || (serverinfo.devicemeshrouterlinks.scp != false)) {
 | 
			
		||||
                            x += '<a href=# onclick=p10MCRouter("' + node._id + '",5,22)>' + "SCP" + '</a> ';
 | 
			
		||||
                            x += '<a href=# onclick=p10MCRouter("' + node._id + '",5,' + (node.sshport ? node.sshport : 22) + ')>' + "SCP" + '</a> ';
 | 
			
		||||
                        }
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
| 
						 | 
				
			
			@ -6066,6 +6074,32 @@
 | 
			
		|||
            if (currentNode.rfbport != null) { Q('d10rfbport').value = currentNode.rfbport; }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        function cmhttpportaction(action) {
 | 
			
		||||
            if (xxdialogMode) return;
 | 
			
		||||
            var x = "HTTP remote connection port:" + '<br /><br /><input type=text placeholder="80" inputmode="numeric" pattern="[0-9]*" onkeypress="return (event.keyCode == 8) || (event.charCode >= 48 && event.charCode <= 57)" maxlength=5 id=d10httpport type=text>';
 | 
			
		||||
            setDialogMode(2, "HTTP Connection", 3, function() {
 | 
			
		||||
                // Save the new HTTP port to the server
 | 
			
		||||
                var httpport = ((Q('d10httpport').value.length > 0) ? parseInt(Q('d10httpport').value) : 80);
 | 
			
		||||
                meshserver.send({ action: 'changedevice', nodeid: currentNode._id, httpport: httpport });
 | 
			
		||||
                //if (currentNode != null) { p10rfb(currentNode._id, httpport); }
 | 
			
		||||
            }, x, currentNode);
 | 
			
		||||
            Q('d10httpport').focus();
 | 
			
		||||
            if (currentNode.httpport != null) { Q('d10httpport').value = currentNode.httpport; }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        function cmhttpsportaction(action) {
 | 
			
		||||
            if (xxdialogMode) return;
 | 
			
		||||
            var x = "HTTPS remote connection port:" + '<br /><br /><input type=text placeholder="443" inputmode="numeric" pattern="[0-9]*" onkeypress="return (event.keyCode == 8) || (event.charCode >= 48 && event.charCode <= 57)" maxlength=5 id=d10httpsport type=text>';
 | 
			
		||||
            setDialogMode(2, "HTTPS Connection", 3, function() {
 | 
			
		||||
                // Save the new HTTP port to the server
 | 
			
		||||
                var httpsport = ((Q('d10httpsport').value.length > 0) ? parseInt(Q('d10httpsport').value) : 443);
 | 
			
		||||
                meshserver.send({ action: 'changedevice', nodeid: currentNode._id, httpsport: httpsport });
 | 
			
		||||
                //if (currentNode != null) { p10rfb(currentNode._id, httpsport); }
 | 
			
		||||
            }, x, currentNode);
 | 
			
		||||
            Q('d10httpsport').focus();
 | 
			
		||||
            if (currentNode.httpsport != null) { Q('d10httpsport').value = currentNode.httpsport; }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        function cmfilesaction(action) {
 | 
			
		||||
            if (xxdialogMode) return;
 | 
			
		||||
            var filetreexx = p13sort_files(p13filetree.dir);
 | 
			
		||||
| 
						 | 
				
			
			@ -6155,6 +6189,8 @@
 | 
			
		|||
            QV('altPortContextMenu', false);
 | 
			
		||||
            QV('rfbPortContextMenu', false);
 | 
			
		||||
            QV('sshPortContextMenu', false);
 | 
			
		||||
            QV('httpPortContextMenu', false);
 | 
			
		||||
            QV('httpsPortContextMenu', false);
 | 
			
		||||
            QV('filesContextMenu', false);
 | 
			
		||||
            QV('deskPlayerContextMenu', false);
 | 
			
		||||
            QV('deskKeyShortcutContextMenu', false);
 | 
			
		||||
| 
						 | 
				
			
			@ -7147,25 +7183,25 @@
 | 
			
		|||
                    // RDP link, show this link only of the remote machine is Windows.
 | 
			
		||||
                    if ((((connectivity & 1) != 0) || (node.mtype == 3)) && (node.agent) && ((meshrights & 8) != 0)) {
 | 
			
		||||
                        if (webRelayPort != 0) {
 | 
			
		||||
                            x += '<a href=# onclick=p10WebRouter("' + node._id + '",1,80)>' + "HTTP" + '</a> ';
 | 
			
		||||
                            x += '<a href=# onclick=p10WebRouter("' + node._id + '",2,443)>' + "HTTPS" + '</a> ';
 | 
			
		||||
                            x += '<a href=# cmenu=httpPortContextMenu onclick=p10WebRouter("' + node._id + '",1,' + (node.httpport ? node.httpport : 80) + ')>' + "HTTP" + ((node.httpport && (node.httpport != 80)) ? '/' + node.httpport : '') + '</a> ';
 | 
			
		||||
                            x += '<a href=# cmenu=httpsPortContextMenu onclick=p10WebRouter("' + node._id + '",2,' + (node.httpsport ? node.httpsport : 443) + ')>' + "HTTPS" + ((node.httpsport && (node.httpsport != 443)) ? '/' + node.httpsport : '') + '</a> ';
 | 
			
		||||
                        }
 | 
			
		||||
                        if ((node.agent.id > 0) && (node.agent.id < 5)) {
 | 
			
		||||
                            if (navigator.platform.toLowerCase() == 'win32') {
 | 
			
		||||
                                if ((serverinfo.devicemeshrouterlinks == null) || (serverinfo.devicemeshrouterlinks.rdp != false)) {
 | 
			
		||||
                                    x += '<a href=# cmenu=altPortContextMenu id=rdpMCRouterLink onclick=p10MCRouter("' + node._id + '",3) title="' + "Requires installation of MeshCentral Router" + '.">' + "RDP" + '</a> ';
 | 
			
		||||
                                    x += '<a href=# cmenu=altPortContextMenu id=rdpMCRouterLink onclick=p10MCRouter("' + node._id + '",3) title="' + "Requires installation of MeshCentral Router" + '.">' + "RDP" + ((node.rdpport && (node.rdpport != 3389)) ? '/' + node.rdpport : '') + '</a> ';
 | 
			
		||||
                                }
 | 
			
		||||
                            }
 | 
			
		||||
                        }
 | 
			
		||||
                        if (node.agent.id > 4) {
 | 
			
		||||
                            if ((navigator.platform.toLowerCase() == 'win32') || (navigator.platform.toLowerCase() == 'macintel')) {
 | 
			
		||||
                                if ((serverinfo.devicemeshrouterlinks == null) || (serverinfo.devicemeshrouterlinks.ssh != false)) {
 | 
			
		||||
                                    x += '<a href=# cmenu=sshPortContextMenu onclick=p10MCRouter("' + node._id + '",4,22) title="' + "Requires installation of MeshCentral Router." + '">' + "SSH" + '</a> ';
 | 
			
		||||
                                    x += '<a href=# cmenu=sshPortContextMenu onclick=p10MCRouter("' + node._id + '",4,' + (node.sshport ? node.sshport : 22) + ') title="' + "Requires installation of MeshCentral Router." + '">' + "SSH" + ((node.sshport && (node.sshport != 22)) ? '/' + node.sshport : '') + '</a> ';
 | 
			
		||||
                                }
 | 
			
		||||
                            }
 | 
			
		||||
                            if (navigator.platform.toLowerCase() == 'win32') {
 | 
			
		||||
                                if ((serverinfo.devicemeshrouterlinks == null) || (serverinfo.devicemeshrouterlinks.scp != false)) {
 | 
			
		||||
                                    x += '<a href=# cmenu=sshPortContextMenu onclick=p10MCRouter("' + node._id + '",5,22) title="' + "Requires installation of MeshCentral Router." + '">' + "SCP" + '</a> ';
 | 
			
		||||
                                    x += '<a href=# cmenu=sshPortContextMenu onclick=p10MCRouter("' + node._id + '",5,' + (node.sshport ? node.sshport : 22) + ') title="' + "Requires installation of MeshCentral Router." + '">' + "SCP" + ((node.sshport && (node.sshport != 22)) ? '/' + node.sshport : '') + '</a> ';
 | 
			
		||||
                                }
 | 
			
		||||
                            }
 | 
			
		||||
                        }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue