few fixes and doc updates
Signed-off-by: si458 <simonsmith5521@gmail.com>
This commit is contained in:
parent
5a410ccd5b
commit
d367b2ed87
|
@ -2763,7 +2763,6 @@ function onTunnelData(data)
|
|||
// Handle tunnel data
|
||||
if (this.httprequest.protocol == 0) { // 1 = Terminal (admin), 2 = Desktop, 5 = Files, 6 = PowerShell (admin), 7 = Plugin Data Exchange, 8 = Terminal (user), 9 = PowerShell (user), 10 = FileTransfer
|
||||
// Take a look at the protocol
|
||||
if (data[0] == 123) { data = data.toString(); } // convert to string to fix binary data coming from peer servers
|
||||
if ((data.length > 3) && (data[0] == '{')) { onTunnelControlData(data, this); return; }
|
||||
this.httprequest.protocol = parseInt(data);
|
||||
if (typeof this.httprequest.protocol != 'number') { this.httprequest.protocol = 0; }
|
||||
|
|
|
@ -209,9 +209,13 @@ function macos_memUtilization()
|
|||
{
|
||||
var usage = lines[0].split(':')[1];
|
||||
var bdown = usage.split(',');
|
||||
|
||||
mem.MemTotal = parseInt(bdown[0].trim().split(' ')[0]);
|
||||
mem.MemFree = parseInt(bdown[1].trim().split(' ')[0]);
|
||||
if (bdown.length > 2){ // new style - PhysMem: 5750M used (1130M wired, 634M compressor), 1918M unused.
|
||||
mem.MemFree = parseInt(bdown[2].trim().split(' ')[0]);
|
||||
} else { // old style - PhysMem: 6683M used (1606M wired), 9699M unused.
|
||||
mem.MemFree = parseInt(bdown[1].trim().split(' ')[0]);
|
||||
}
|
||||
mem.MemUsed = parseInt(bdown[0].trim().split(' ')[0]);
|
||||
mem.MemTotal = (mem.MemFree + mem.MemUsed);
|
||||
mem.percentFree = ((mem.MemFree / mem.MemTotal) * 100);//.toFixed(2);
|
||||
mem.percentConsumed = (((mem.MemTotal - mem.MemFree) / mem.MemTotal) * 100);//.toFixed(2);
|
||||
return (mem);
|
||||
|
|
|
@ -15,6 +15,34 @@ docker pull ghcr.io/ylianst/meshcentral:master
|
|||
!!!warning
|
||||
Do not use the built in mesh update function. Update docker the docker way.
|
||||
|
||||
### Docker Compose
|
||||
|
||||
```
|
||||
version: '3'
|
||||
services:
|
||||
meshcentral:
|
||||
restart: unless-stopped # always restart the container unless you stop it
|
||||
image: ghcr.io/ylianst/meshcentral:1.1.27 # 1.1.27 is a version number OR use master for the master branch of bug fixes
|
||||
ports:
|
||||
- 80:80 # HTTP
|
||||
- 443:443 # HTTPS
|
||||
- 4433:4433 # AMT (Optional)
|
||||
volumes:
|
||||
- data:/opt/meshcentral/meshcentral-data # config.json and other important files live here
|
||||
- user_files:/opt/meshcentral/meshcentral-files # where file uploads for users live
|
||||
- backup:/opt/meshcentral/meshcentral-backups # location for the meshcentral backups - this should be mounted to an external storage
|
||||
- web:/opt/meshcentral/meshcentral-web # location for site customization files
|
||||
volumes:
|
||||
data:
|
||||
driver: local
|
||||
user_files:
|
||||
driver: local
|
||||
backup:
|
||||
driver: local
|
||||
web:
|
||||
driver: local
|
||||
```
|
||||
|
||||
## Quick Start
|
||||
|
||||
For some who want to skip this document entirely, there are quick install scripts that will get a MeshCentral2 instance up and running on Linux in a few minutes. These scripts will pretty much do what this document explains very rapidly. Right now, there are two such scripts available:
|
||||
|
|
|
@ -104,7 +104,7 @@ There are plenty of options at your disposal if you need them. In fact, you can
|
|||
"issuer": "https://sso.your.domain",
|
||||
"authorization_endpoint": "https://auth.your.domain/auth-endpoint",
|
||||
"token_endpoint": "https://tokens.sso.your.domain/token-endpoint",
|
||||
"endsession_endpoint": "https://sso.your.domain/logout",
|
||||
"end_session_endpoint": "https://sso.your.domain/logout",
|
||||
"jwks_uri": "https://sso.your.domain/jwks-uri"
|
||||
},
|
||||
"client": {
|
||||
|
@ -161,14 +161,14 @@ In the advanced example config above, did you notice that the issuer property ha
|
|||
"issuer": "https://sso.your.domain",
|
||||
"authorization_endpoint": "https://auth.your.domain/auth-endpoint",
|
||||
"token_endpoint": "https://tokens.sso.your.domain/token-endpoint",
|
||||
"endsession_endpoint": "https://sso.your.domain/logout",
|
||||
"end_session_endpoint": "https://sso.your.domain/logout",
|
||||
"jwks_uri": "https://sso.your.domain/jwks-uri"
|
||||
},
|
||||
```
|
||||
|
||||
#### *Required and Commonly Used Configs*
|
||||
|
||||
The `issuer` property in the `issuer` object is the only one required, and its only required if you aren't using a preset. Besides the issuer, these are mostly options related to the endpoints and their configuration. The schema below looks intimidating but it comes down to being able to support any IdP. Setting the issuer, and endsession_endpoint are the two main ones you want to setup.
|
||||
The `issuer` property in the `issuer` object is the only one required, and its only required if you aren't using a preset. Besides the issuer, these are mostly options related to the endpoints and their configuration. The schema below looks intimidating but it comes down to being able to support any IdP. Setting the issuer, and end_session_endpoint are the two main ones you want to setup.
|
||||
|
||||
#### *Schema*
|
||||
|
||||
|
|
|
@ -3926,10 +3926,18 @@ function InstallModules(modules, args, func) {
|
|||
for (var i in modules) {
|
||||
// Modules may contain a version tag (foobar@1.0.0), remove it so the module can be found using require
|
||||
const moduleNameAndVersion = modules[i];
|
||||
const moduleInfo = moduleNameAndVersion.split('@', 2);
|
||||
var moduleName = moduleInfo[0];
|
||||
var moduleVersion = moduleInfo[1];
|
||||
if (moduleName == '') { moduleName = moduleNameAndVersion; moduleVersion = null; } // If the module name starts with @, don't use @ as a version seperator.
|
||||
const moduleInfo = moduleNameAndVersion.split('@', 3);
|
||||
var moduleName = null;
|
||||
var moduleVersion = null;
|
||||
if(moduleInfo.length == 1){ // normal package without version
|
||||
moduleName = moduleInfo[0];
|
||||
} else if (moduleInfo.length == 2) { // normal package with a version OR custom repo package with no version
|
||||
moduleName = moduleInfo[0] === '' ? moduleNameAndVersion : moduleInfo[0];
|
||||
moduleVersion = moduleInfo[0] === '' ? null : moduleInfo[1];
|
||||
} else if (moduleInfo.length == 3) { // custom repo package and package with a version
|
||||
moduleName = "@" + moduleInfo[1];
|
||||
moduleVersion = moduleInfo[2];
|
||||
}
|
||||
try {
|
||||
// Does the module need a specific version?
|
||||
if (moduleVersion) {
|
||||
|
|
|
@ -11762,7 +11762,7 @@
|
|||
if (start >= data.byteLength) {
|
||||
files.sendText(JSON.stringify({ action: 'uploaddone', reqid: uploadFile.xfilePtr }));
|
||||
} else {
|
||||
var end = uploadFile.xptr + (attemptWebRTC ? 16384 : 65536);
|
||||
var end = uploadFile.xptr + (attemptWebRTC ? 16384 : 65536);
|
||||
if (end > data.byteLength) { if (dataPriming == true) { return; } end = data.byteLength; }
|
||||
var dataslice = new Uint8Array(data.slice(start, end))
|
||||
if ((dataslice[0] == 123) || (dataslice[0] == 0)) {
|
||||
|
|
Loading…
Reference in New Issue