@scrypted/server 0.56.0 → 0.58.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cluster/cluster-hash.d.ts +2 -0
- package/dist/cluster/cluster-hash.js +13 -0
- package/dist/cluster/cluster-hash.js.map +1 -0
- package/dist/cluster/connect-rpc-object.d.ts +8 -0
- package/dist/cluster/connect-rpc-object.js +3 -0
- package/dist/cluster/connect-rpc-object.js.map +1 -0
- package/dist/plugin/plugin-remote-worker.js +30 -24
- package/dist/plugin/plugin-remote-worker.js.map +1 -1
- package/dist/rpc.d.ts +2 -2
- package/dist/rpc.js +18 -8
- package/dist/rpc.js.map +1 -1
- package/dist/runtime.d.ts +2 -0
- package/dist/runtime.js +92 -1
- package/dist/runtime.js.map +1 -1
- package/package.json +1 -1
- package/python/plugin_remote.py +21 -11
- package/python/rpc.py +10 -8
- package/src/cluster/cluster-hash.ts +7 -0
- package/src/cluster/connect-rpc-object.ts +9 -0
- package/src/plugin/plugin-remote-worker.ts +33 -34
- package/src/rpc.ts +19 -8
- package/src/runtime.ts +99 -1
@@ -0,0 +1,13 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.computeClusterObjectHash = void 0;
|
7
|
+
const crypto_1 = __importDefault(require("crypto"));
|
8
|
+
function computeClusterObjectHash(o, clusterSecret) {
|
9
|
+
const sha256 = crypto_1.default.createHash('sha256').update(`${o.id}${o.port}${o.sourcePort || ''}${o.proxyId}${clusterSecret}`).digest().toString('base64');
|
10
|
+
return sha256;
|
11
|
+
}
|
12
|
+
exports.computeClusterObjectHash = computeClusterObjectHash;
|
13
|
+
//# sourceMappingURL=cluster-hash.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"cluster-hash.js","sourceRoot":"","sources":["../../src/cluster/cluster-hash.ts"],"names":[],"mappings":";;;;;;AAAA,oDAA4B;AAG5B,SAAgB,wBAAwB,CAAC,CAAgB,EAAE,aAAqB;IAC5E,MAAM,MAAM,GAAG,gBAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,UAAU,IAAI,EAAE,GAAG,CAAC,CAAC,OAAO,GAAG,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACnJ,OAAO,MAAM,CAAC;AAClB,CAAC;AAHD,4DAGC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"connect-rpc-object.js","sourceRoot":"","sources":["../../src/cluster/connect-rpc-object.ts"],"names":[],"mappings":""}
|
@@ -22,7 +22,7 @@ const plugin_remote_1 = require("./plugin-remote");
|
|
22
22
|
const plugin_remote_stats_1 = require("./plugin-remote-stats");
|
23
23
|
const plugin_repl_1 = require("./plugin-repl");
|
24
24
|
const node_thread_worker_1 = require("./runtime/node-thread-worker");
|
25
|
-
const
|
25
|
+
const cluster_hash_1 = require("../cluster/cluster-hash");
|
26
26
|
const { link } = require('linkfs');
|
27
27
|
const serverVersion = require('../../package.json').version;
|
28
28
|
function startPluginRemote(mainFilename, pluginId, peerSend, startPluginRemoteOptions) {
|
@@ -68,7 +68,7 @@ function startPluginRemote(mainFilename, pluginId, peerSend, startPluginRemoteOp
|
|
68
68
|
},
|
69
69
|
async onLoadZip(scrypted, params, packageJson, zipData, zipOptions) {
|
70
70
|
const { clusterId, clusterSecret } = zipOptions;
|
71
|
-
const onProxySerialization = (value, proxyId,
|
71
|
+
const onProxySerialization = (value, proxyId, sourcePeerPort) => {
|
72
72
|
const properties = rpc_1.RpcPeer.prepareProxyProperties(value) || {};
|
73
73
|
let clusterEntry = properties.__cluster;
|
74
74
|
// set the cluster identity if it does not exist.
|
@@ -77,8 +77,10 @@ function startPluginRemote(mainFilename, pluginId, peerSend, startPluginRemoteOp
|
|
77
77
|
id: clusterId,
|
78
78
|
port: clusterPort,
|
79
79
|
proxyId,
|
80
|
-
|
80
|
+
sourcePort: sourcePeerPort,
|
81
|
+
sha256: null,
|
81
82
|
};
|
83
|
+
clusterEntry.sha256 = (0, cluster_hash_1.computeClusterObjectHash)(clusterEntry, clusterSecret);
|
82
84
|
properties.__cluster = clusterEntry;
|
83
85
|
}
|
84
86
|
// always reassign the id and source.
|
@@ -104,11 +106,11 @@ function startPluginRemote(mainFilename, pluginId, peerSend, startPluginRemoteOp
|
|
104
106
|
clusterPeer.onProxySerialization = (value, proxyId) => onProxySerialization(value, proxyId, clusterPeerPort);
|
105
107
|
clusterPeers.set(clusterPeerPort, Promise.resolve(clusterPeer));
|
106
108
|
startPluginRemoteOptions?.onClusterPeer?.(clusterPeer);
|
107
|
-
const
|
108
|
-
|
109
|
-
if (
|
109
|
+
const connectRPCObject = async (o) => {
|
110
|
+
const sha256 = (0, cluster_hash_1.computeClusterObjectHash)(o, clusterSecret);
|
111
|
+
if (sha256 !== o.sha256)
|
110
112
|
throw new Error('secret incorrect');
|
111
|
-
return resolveObject(
|
113
|
+
return resolveObject(o.proxyId, o.sourcePort);
|
112
114
|
};
|
113
115
|
clusterPeer.params['connectRPCObject'] = connectRPCObject;
|
114
116
|
client.on('close', () => {
|
@@ -116,19 +118,21 @@ function startPluginRemote(mainFilename, pluginId, peerSend, startPluginRemoteOp
|
|
116
118
|
clusterPeer.kill('cluster socket closed');
|
117
119
|
});
|
118
120
|
});
|
119
|
-
const clusterPort = await (0, listen_zero_1.listenZero)(clusterRpcServer);
|
120
|
-
const ensureClusterPeer = (
|
121
|
-
let clusterPeerPromise = clusterPeers.get(
|
121
|
+
const clusterPort = await (0, listen_zero_1.listenZero)(clusterRpcServer, '127.0.0.1');
|
122
|
+
const ensureClusterPeer = (connectPort) => {
|
123
|
+
let clusterPeerPromise = clusterPeers.get(connectPort);
|
122
124
|
if (!clusterPeerPromise) {
|
123
125
|
clusterPeerPromise = (async () => {
|
124
|
-
const socket = net_1.default.connect(
|
125
|
-
socket.on('close', () => clusterPeers.delete(
|
126
|
+
const socket = net_1.default.connect(connectPort, '127.0.0.1');
|
127
|
+
socket.on('close', () => clusterPeers.delete(connectPort));
|
126
128
|
try {
|
127
129
|
await (0, events_1.once)(socket, 'connect');
|
128
|
-
|
130
|
+
// the sourcePort will be added to all rpc objects created by this peer session and used by resolveObject for later
|
131
|
+
// resolution when trying to find the peer.
|
132
|
+
const sourcePort = socket.address().port;
|
129
133
|
const clusterPeer = (0, rpc_serializer_1.createDuplexRpcPeer)(peer.selfName, 'cluster-server', socket, socket);
|
130
|
-
clusterPeer.tags.localPort =
|
131
|
-
clusterPeer.onProxySerialization = (value, proxyId) => onProxySerialization(value, proxyId,
|
134
|
+
clusterPeer.tags.localPort = sourcePort;
|
135
|
+
clusterPeer.onProxySerialization = (value, proxyId) => onProxySerialization(value, proxyId, sourcePort);
|
132
136
|
return clusterPeer;
|
133
137
|
}
|
134
138
|
catch (e) {
|
@@ -137,7 +141,7 @@ function startPluginRemote(mainFilename, pluginId, peerSend, startPluginRemoteOp
|
|
137
141
|
throw e;
|
138
142
|
}
|
139
143
|
})();
|
140
|
-
clusterPeers.set(
|
144
|
+
clusterPeers.set(connectPort, clusterPeerPromise);
|
141
145
|
}
|
142
146
|
return clusterPeerPromise;
|
143
147
|
};
|
@@ -145,24 +149,26 @@ function startPluginRemote(mainFilename, pluginId, peerSend, startPluginRemoteOp
|
|
145
149
|
const clusterObject = value?.__cluster;
|
146
150
|
if (clusterObject?.id !== clusterId)
|
147
151
|
return value;
|
148
|
-
const { port, proxyId,
|
152
|
+
const { port, proxyId, sourcePort } = clusterObject;
|
153
|
+
// handle the case when trying to connect to an object is on this cluster node,
|
154
|
+
// returning the actual object, rather than initiating a loopback connection.
|
149
155
|
if (port === clusterPort)
|
150
|
-
return resolveObject(proxyId,
|
156
|
+
return resolveObject(proxyId, sourcePort);
|
151
157
|
try {
|
152
158
|
const clusterPeerPromise = ensureClusterPeer(port);
|
153
159
|
const clusterPeer = await clusterPeerPromise;
|
154
|
-
//
|
155
|
-
|
160
|
+
// if the localPort is the sourcePort, that means the rpc object already exists as it originated from this node.
|
161
|
+
// so return the existing proxy.
|
162
|
+
if (clusterPeer.tags.localPort === sourcePort)
|
156
163
|
return value;
|
157
164
|
const connectRPCObject = await clusterPeer.getParam('connectRPCObject');
|
158
|
-
const
|
159
|
-
const newValue = await connectRPCObject(proxyId, portSecret, source);
|
165
|
+
const newValue = await connectRPCObject(clusterObject);
|
160
166
|
if (!newValue)
|
161
|
-
throw new Error('
|
167
|
+
throw new Error('rpc object not found?');
|
162
168
|
return newValue;
|
163
169
|
}
|
164
170
|
catch (e) {
|
165
|
-
console.error('failure
|
171
|
+
console.error('failure rpc', e);
|
166
172
|
return value;
|
167
173
|
}
|
168
174
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"plugin-remote-worker.js","sourceRoot":"","sources":["../../src/plugin/plugin-remote-worker.ts"],"names":[],"mappings":";;;;;;AACA,sDAA6B;AAC7B,mCAA8B;AAC9B,4CAAoB;AACpB,iCAA+B;AAC/B,8CAAsB;AACtB,gDAAwB;AACxB,2DAAwE;AACxE,gDAA4C;AAC5C,gCAA6C;AAC7C,sDAAwD;AACxD,mCAA2C;AAC3C,6CAAmG;AACnG,qDAAmD;AACnD,uEAA2F;AAC3F,mDAAyG;AACzG,+DAAuE;AACvE,+CAAiD;AACjD,qEAAgE;AAChE,oDAA4B;AAC5B,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAEnC,MAAM,aAAa,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC,OAAO,CAAC;AAe5D,SAAgB,iBAAiB,CAAC,YAAoB,EAAE,QAAgB,EAAE,QAAgG,EAAE,wBAAmD;IAC3N,MAAM,IAAI,GA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
package/dist/rpc.d.ts
CHANGED
@@ -80,14 +80,12 @@ export declare class RpcPeer {
|
|
80
80
|
selfName: string;
|
81
81
|
peerName: string;
|
82
82
|
send: (message: RpcMessage, reject?: (e: Error) => void, serializationContext?: any) => void;
|
83
|
-
idCounter: number;
|
84
83
|
params: {
|
85
84
|
[name: string]: any;
|
86
85
|
};
|
87
86
|
pendingResults: {
|
88
87
|
[id: string]: Deferred;
|
89
88
|
};
|
90
|
-
proxyCounter: number;
|
91
89
|
localProxied: Map<any, LocalProxiedEntry>;
|
92
90
|
localProxyMap: Map<string, any>;
|
93
91
|
remoteWeakProxies: {
|
@@ -112,6 +110,7 @@ export declare class RpcPeer {
|
|
112
110
|
static handleFunctionInvocations(thiz: PrimitiveProxyHandler<any>, target: any, p: PropertyKey, receiver: any): any;
|
113
111
|
static getIteratorNext(target: any): string;
|
114
112
|
static prepareProxyProperties(value: any): any;
|
113
|
+
static readonly RANDOM_DIGITS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
115
114
|
static readonly RPC_RESULT_ERROR_NAME = "RPCResultError";
|
116
115
|
static readonly PROPERTY_PROXY_ID = "__proxy_id";
|
117
116
|
static readonly PROPERTY_PROXY_ONEWAY_METHODS = "__proxy_oneway_methods";
|
@@ -122,6 +121,7 @@ export declare class RpcPeer {
|
|
122
121
|
constructor(selfName: string, peerName: string, send: (message: RpcMessage, reject?: (e: Error) => void, serializationContext?: any) => void);
|
123
122
|
static isTransportSafe(value: any): boolean;
|
124
123
|
isTransportSafe(value: any): boolean;
|
124
|
+
static generateId(): string;
|
125
125
|
createPendingResult(method: string, cb: (id: string, reject: (e: Error) => void) => void): Promise<any>;
|
126
126
|
kill(message?: string): void;
|
127
127
|
addSerializer(ctr: any, name: string, serializer: RpcSerializer): void;
|
package/dist/rpc.js
CHANGED
@@ -201,10 +201,8 @@ class RpcPeer {
|
|
201
201
|
selfName;
|
202
202
|
peerName;
|
203
203
|
send;
|
204
|
-
idCounter = 1;
|
205
204
|
params = {};
|
206
205
|
pendingResults = {};
|
207
|
-
proxyCounter = 1;
|
208
206
|
localProxied = new Map();
|
209
207
|
localProxyMap = new Map();
|
210
208
|
// @ts-ignore
|
@@ -279,6 +277,7 @@ class RpcPeer {
|
|
279
277
|
}
|
280
278
|
return props;
|
281
279
|
}
|
280
|
+
static RANDOM_DIGITS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
|
282
281
|
static RPC_RESULT_ERROR_NAME = 'RPCResultError';
|
283
282
|
static PROPERTY_PROXY_ID = '__proxy_id';
|
284
283
|
static PROPERTY_PROXY_ONEWAY_METHODS = '__proxy_oneway_methods';
|
@@ -305,16 +304,27 @@ class RpcPeer {
|
|
305
304
|
}).catch(e => e.message || 'Unknown Error');
|
306
305
|
}
|
307
306
|
static isTransportSafe(value) {
|
308
|
-
|
307
|
+
if (!value)
|
308
|
+
return true;
|
309
|
+
return !value[Symbol.asyncIterator]
|
310
|
+
&& !value[RpcPeer.PROPERTY_JSON_DISABLE_SERIALIZATION]
|
311
|
+
&& this.getDefaultTransportSafeArgumentTypes().has(value.constructor?.name);
|
309
312
|
}
|
310
313
|
isTransportSafe(value) {
|
311
|
-
|
314
|
+
if (!value)
|
315
|
+
return true;
|
316
|
+
return !value[Symbol.asyncIterator]
|
317
|
+
&& !value[RpcPeer.PROPERTY_JSON_DISABLE_SERIALIZATION]
|
318
|
+
&& this.transportSafeArgumentTypes.has(value.constructor?.name);
|
319
|
+
}
|
320
|
+
static generateId() {
|
321
|
+
return [...new Array(8)].map(() => RpcPeer.RANDOM_DIGITS.charAt(Math.floor(Math.random() * RpcPeer.RANDOM_DIGITS.length))).join('');
|
312
322
|
}
|
313
323
|
createPendingResult(method, cb) {
|
314
324
|
if (Object.isFrozen(this.pendingResults))
|
315
325
|
return Promise.reject(new RPCResultError(this, 'RpcPeer has been killed (createPendingResult)'));
|
316
326
|
const promise = new Promise((resolve, reject) => {
|
317
|
-
const id =
|
327
|
+
const id = RpcPeer.generateId();
|
318
328
|
this.pendingResults[id] = { resolve, reject, method };
|
319
329
|
cb(id, e => reject(new RPCResultError(this, e.message, e)));
|
320
330
|
});
|
@@ -482,7 +492,7 @@ class RpcPeer {
|
|
482
492
|
}
|
483
493
|
let proxiedEntry = this.localProxied.get(value);
|
484
494
|
if (proxiedEntry) {
|
485
|
-
const __remote_proxy_finalizer_id =
|
495
|
+
const __remote_proxy_finalizer_id = RpcPeer.generateId();
|
486
496
|
proxiedEntry.finalizerId = __remote_proxy_finalizer_id;
|
487
497
|
const ret = {
|
488
498
|
__remote_proxy_id: proxiedEntry.id,
|
@@ -501,7 +511,7 @@ class RpcPeer {
|
|
501
511
|
return ret;
|
502
512
|
}
|
503
513
|
this.onProxyTypeSerialization.get(__remote_constructor_name)?.(value);
|
504
|
-
const __remote_proxy_id =
|
514
|
+
const __remote_proxy_id = RpcPeer.generateId();
|
505
515
|
proxiedEntry = {
|
506
516
|
id: __remote_proxy_id,
|
507
517
|
finalizerId: __remote_proxy_id,
|
@@ -676,7 +686,7 @@ function getEvalSource() {
|
|
676
686
|
${RpcPeer}
|
677
687
|
|
678
688
|
${startPeriodicGarbageCollection}
|
679
|
-
|
689
|
+
|
680
690
|
return {
|
681
691
|
startPeriodicGarbageCollection,
|
682
692
|
RpcPeer,
|
package/dist/rpc.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"rpc.js","sourceRoot":"","sources":["../src/rpc.ts"],"names":[],"mappings":";;;AAGA,SAAgB,8BAA8B;IAC1C,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE;QACZ,OAAO,CAAC,IAAI,CAAC,sEAAsE,CAAC,CAAC;KACxF;IACD,IAAI,CAAgB,CAAC;IACrB,IAAI;QACA,CAAC,GAAG,MAAM,CAAC;KACd;IACD,OAAO,CAAC,EAAE;KACT;IAED,6DAA6D;IAC7D,wBAAwB;IACxB,IAAI,cAAc,GAAG,CAAC,CAAC;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;QACD,OAAO,CAAC,EAAE;YACN,OAAO,CAAC,KAAK,CAAC,qBAAqB,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;YACvD,OAAO;SACV;IACL,CAAC;;AAthBL,0BAuhBC;AAED,SAAgB,aAAa;IACzB,OAAO;;UAED,QAAQ;;UAER,OAAO;;UAEP,8BAA8B;;;;;;;;KAQnC,CAAC;AACN,CAAC;AAhBD,sCAgBC"}
|
package/dist/runtime.d.ts
CHANGED
@@ -54,6 +54,7 @@ export declare class ScryptedRuntime extends PluginHttp<HttpPluginData> {
|
|
54
54
|
wss: WebSocket.Server<typeof WebSocket, typeof http.IncomingMessage>;
|
55
55
|
wsAtomic: number;
|
56
56
|
shellio: IOServer;
|
57
|
+
connectRPCObjectIO: IOServer;
|
57
58
|
pluginComponent: PluginComponent;
|
58
59
|
serviceControl: ServiceControl;
|
59
60
|
alerts: Alerts;
|
@@ -69,6 +70,7 @@ export declare class ScryptedRuntime extends PluginHttp<HttpPluginData> {
|
|
69
70
|
getDeviceLogger(device: PluginDevice): Logger;
|
70
71
|
getPluginForEndpoint(endpoint: string): Promise<HttpPluginData>;
|
71
72
|
shellHandler(req: Request, res: Response): Promise<void>;
|
73
|
+
connectRPCObjectHandler(req: Request, res: Response): Promise<void>;
|
72
74
|
getEndpointPluginData(req: Request, endpoint: string, isUpgrade: boolean, isEngineIOEndpoint: boolean): Promise<HttpPluginData>;
|
73
75
|
handleWebSocket(endpoint: string, httpRequest: HttpRequest, ws: WebSocket, pluginData: HttpPluginData): Promise<void>;
|
74
76
|
getComponent(componentId: string): Promise<any>;
|
package/dist/runtime.js
CHANGED
@@ -27,6 +27,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
27
27
|
};
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
29
29
|
exports.ScryptedRuntime = void 0;
|
30
|
+
const net_1 = __importDefault(require("net"));
|
30
31
|
const types_1 = require("@scrypted/types");
|
31
32
|
const adm_zip_1 = __importDefault(require("adm-zip"));
|
32
33
|
const crypto_1 = __importDefault(require("crypto"));
|
@@ -62,6 +63,7 @@ const plugin_1 = require("./services/plugin");
|
|
62
63
|
const service_control_1 = require("./services/service-control");
|
63
64
|
const users_1 = require("./services/users");
|
64
65
|
const state_1 = require("./state");
|
66
|
+
const cluster_hash_1 = require("./cluster/cluster-hash");
|
65
67
|
const MIN_SCRYPTED_CORE_VERSION = 'v0.1.16';
|
66
68
|
const PLUGIN_DEVICE_STATE_VERSION = 2;
|
67
69
|
class ScryptedRuntime extends plugin_http_1.PluginHttp {
|
@@ -88,6 +90,17 @@ class ScryptedRuntime extends plugin_http_1.PluginHttp {
|
|
88
90
|
});
|
89
91
|
},
|
90
92
|
});
|
93
|
+
connectRPCObjectIO = new io.Server({
|
94
|
+
pingTimeout: 120000,
|
95
|
+
perMessageDeflate: true,
|
96
|
+
cors: (req, callback) => {
|
97
|
+
const header = this.getAccessControlAllowOrigin(req.headers);
|
98
|
+
callback(undefined, {
|
99
|
+
origin: header,
|
100
|
+
credentials: true,
|
101
|
+
});
|
102
|
+
},
|
103
|
+
});
|
91
104
|
pluginComponent = new plugin_1.PluginComponent(this);
|
92
105
|
serviceControl = new service_control_1.ServiceControl(this);
|
93
106
|
alerts = new alerts_1.Alerts(this);
|
@@ -120,13 +133,68 @@ class ScryptedRuntime extends plugin_http_1.PluginHttp {
|
|
120
133
|
const spawn = require('node-pty-prebuilt-multiarch').spawn;
|
121
134
|
const cp = spawn(process.env.SHELL, [], {});
|
122
135
|
cp.onData(data => connection.send(data));
|
123
|
-
connection.on('message', message =>
|
136
|
+
connection.on('message', message => {
|
137
|
+
if (Buffer.isBuffer(message)) {
|
138
|
+
cp.write(message.toString());
|
139
|
+
return;
|
140
|
+
}
|
141
|
+
try {
|
142
|
+
const parsed = JSON.parse(message.toString());
|
143
|
+
if (parsed.dim) {
|
144
|
+
cp.resize(parsed.dim.cols, parsed.dim.rows);
|
145
|
+
}
|
146
|
+
}
|
147
|
+
catch (e) {
|
148
|
+
// we should only get here if an outdated core plugin
|
149
|
+
// is sending us string data instead of buffer data
|
150
|
+
cp.write(message.toString());
|
151
|
+
}
|
152
|
+
});
|
124
153
|
connection.on('close', () => cp.kill());
|
154
|
+
cp.onExit(() => connection.close());
|
125
155
|
}
|
126
156
|
catch (e) {
|
127
157
|
connection.close();
|
128
158
|
}
|
129
159
|
});
|
160
|
+
app.all('/engine.io/connectRPCObject', (req, res) => this.connectRPCObjectHandler(req, res));
|
161
|
+
/*
|
162
|
+
* Handle incoming connections that will be
|
163
|
+
* proxied to a connectRPCObject socket.
|
164
|
+
*
|
165
|
+
* Note that the clusterObject hash must be
|
166
|
+
* verified before connecting to the target port.
|
167
|
+
*/
|
168
|
+
this.connectRPCObjectIO.on('connection', connection => {
|
169
|
+
try {
|
170
|
+
const clusterObject = JSON.parse(connection.request.query.clusterObject);
|
171
|
+
const sha256 = (0, cluster_hash_1.computeClusterObjectHash)(clusterObject, this.clusterSecret);
|
172
|
+
if (sha256 != clusterObject.sha256) {
|
173
|
+
connection.send({
|
174
|
+
error: 'invalid signature'
|
175
|
+
});
|
176
|
+
connection.close();
|
177
|
+
return;
|
178
|
+
}
|
179
|
+
const socket = net_1.default.connect(clusterObject.port, '127.0.0.1');
|
180
|
+
socket.on('error', () => connection.close());
|
181
|
+
socket.on('close', () => connection.close());
|
182
|
+
socket.on('data', data => connection.send(data));
|
183
|
+
connection.on('close', () => socket.destroy());
|
184
|
+
connection.on('message', message => {
|
185
|
+
if (typeof message !== 'string') {
|
186
|
+
socket.write(message);
|
187
|
+
}
|
188
|
+
else {
|
189
|
+
console.warn('unexpected string data on engine.io rpc connection. terminating.');
|
190
|
+
connection.close();
|
191
|
+
}
|
192
|
+
});
|
193
|
+
}
|
194
|
+
catch {
|
195
|
+
connection.close();
|
196
|
+
}
|
197
|
+
});
|
130
198
|
insecure.on('upgrade', (req, socket, upgradeHead) => {
|
131
199
|
req.upgradeHead = upgradeHead;
|
132
200
|
app.handle(req, {
|
@@ -242,6 +310,29 @@ class ScryptedRuntime extends plugin_http_1.PluginHttp {
|
|
242
310
|
else
|
243
311
|
this.shellio.handleRequest(req, res);
|
244
312
|
}
|
313
|
+
async connectRPCObjectHandler(req, res) {
|
314
|
+
const isUpgrade = (0, plugin_http_1.isConnectionUpgrade)(req.headers);
|
315
|
+
const end = (code, message) => {
|
316
|
+
if (isUpgrade) {
|
317
|
+
const socket = res.socket;
|
318
|
+
socket.write(`HTTP/1.1 ${code} ${message}\r\n` +
|
319
|
+
'\r\n');
|
320
|
+
socket.destroy();
|
321
|
+
}
|
322
|
+
else {
|
323
|
+
res.status(code);
|
324
|
+
res.send(message);
|
325
|
+
}
|
326
|
+
};
|
327
|
+
if (!res.locals.username) {
|
328
|
+
end(401, 'Not Authorized');
|
329
|
+
return;
|
330
|
+
}
|
331
|
+
if (req.upgradeHead)
|
332
|
+
this.connectRPCObjectIO.handleUpgrade(req, res.socket, req.upgradeHead);
|
333
|
+
else
|
334
|
+
this.connectRPCObjectIO.handleRequest(req, res);
|
335
|
+
}
|
245
336
|
async getEndpointPluginData(req, endpoint, isUpgrade, isEngineIOEndpoint) {
|
246
337
|
const ret = await this.getPluginForEndpoint(endpoint);
|
247
338
|
if (req.url.indexOf('/engine.io/api') !== -1)
|