node-opcua-samples 2.70.2 → 2.72.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/bin/di_server.js +10 -10
- package/bin/mini_server.ts +4 -2
- package/bin/server_with_push_certificate.ts +48 -20
- package/bin/simple_secure_server.ts +20 -9
- package/bin/simple_server.js +19 -17
- package/dist/mini_server.js +2 -2
- package/dist/mini_server.js.map +1 -1
- package/dist/server_with_push_certificate.js +45 -16
- package/dist/server_with_push_certificate.js.map +1 -1
- package/dist/simple_secure_server.js +7 -3
- package/dist/simple_secure_server.js.map +1 -1
- package/package.json +6 -6
package/bin/di_server.js
CHANGED
|
@@ -61,7 +61,11 @@ const keySize = argv.keySize;
|
|
|
61
61
|
const server_certificate_file = constructFilename("certificates/server_selfsigned_cert_" + keySize + ".pem");
|
|
62
62
|
const server_certificate_privatekey_file = constructFilename("certificates/server_key_" + keySize + ".pem");
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
const server = new OPCUAServer({
|
|
67
|
+
|
|
68
|
+
alternateHostname: argv.alternateHostname,
|
|
65
69
|
|
|
66
70
|
certificateFile: server_certificate_file,
|
|
67
71
|
privateKeyFile: server_certificate_privatekey_file,
|
|
@@ -69,8 +73,6 @@ const server_options = {
|
|
|
69
73
|
port,
|
|
70
74
|
resourcePath: "/UA/Server",
|
|
71
75
|
|
|
72
|
-
maxAllowedSessionNumber: 1500,
|
|
73
|
-
|
|
74
76
|
nodeset_filename: [
|
|
75
77
|
nodesets.standard,
|
|
76
78
|
nodesets.di,
|
|
@@ -89,22 +91,20 @@ const server_options = {
|
|
|
89
91
|
buildNumber: "1234"
|
|
90
92
|
},
|
|
91
93
|
serverCapabilities: {
|
|
94
|
+
maxSessions: 1500,
|
|
92
95
|
operationLimits: {
|
|
93
96
|
maxNodesPerRead: 1000,
|
|
94
97
|
maxNodesPerBrowse: 2000
|
|
95
98
|
}
|
|
96
99
|
},
|
|
100
|
+
maxConnectionsPerEndpoint: 1500,
|
|
101
|
+
|
|
97
102
|
userManager: userManager,
|
|
98
103
|
registerServerMethod: opcua.RegisterServerMethod.LDS,
|
|
99
104
|
discoveryServerEndpointUrl: argv.discoveryServerEndpointUrl || "opc.tcp://" + require("os").hostname() + ":4840"
|
|
105
|
+
});
|
|
100
106
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
process.title = "Node OPCUA Server on port : " + server_options.port;
|
|
104
|
-
|
|
105
|
-
server_options.alternateHostname = argv.alternateHostname;
|
|
106
|
-
|
|
107
|
-
const server = new OPCUAServer(server_options);
|
|
107
|
+
process.title = "Node OPCUA Server on port : " + port;
|
|
108
108
|
|
|
109
109
|
|
|
110
110
|
const hostname = os.hostname();
|
package/bin/mini_server.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
// tslint:disable:no-console
|
|
2
|
-
import * as chalk from "chalk";
|
|
3
2
|
import * as path from "path";
|
|
4
3
|
import * as os from "os";
|
|
5
4
|
|
|
5
|
+
import * as chalk from "chalk";
|
|
6
|
+
|
|
6
7
|
import {
|
|
7
8
|
makeApplicationUrn,
|
|
8
9
|
get_mini_nodeset_filename,
|
|
@@ -27,7 +28,6 @@ const serverOptions: OPCUAServerOptions = {
|
|
|
27
28
|
|
|
28
29
|
port,
|
|
29
30
|
|
|
30
|
-
maxAllowedSessionNumber: 2,
|
|
31
31
|
maxConnectionsPerEndpoint: 2,
|
|
32
32
|
|
|
33
33
|
nodeset_filename: [get_mini_nodeset_filename()],
|
|
@@ -49,6 +49,8 @@ const serverOptions: OPCUAServerOptions = {
|
|
|
49
49
|
},
|
|
50
50
|
|
|
51
51
|
serverCapabilities: {
|
|
52
|
+
maxSessions: 10,
|
|
53
|
+
|
|
52
54
|
maxBrowseContinuationPoints: 10,
|
|
53
55
|
maxHistoryContinuationPoints: 10,
|
|
54
56
|
// maxInactiveLockTime
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import * as path from "path";
|
|
5
5
|
import * as chalk from "chalk";
|
|
6
6
|
|
|
7
|
-
import { nodesets, OPCUACertificateManager, OPCUAServer } from "node-opcua";
|
|
7
|
+
import { makeRoles, nodesets, OPCUACertificateManager, OPCUAServer, OPCUAServerOptions, WellKnownRoles } from "node-opcua";
|
|
8
8
|
import { CertificateManager } from "node-opcua-pki";
|
|
9
9
|
import { installPushCertificateManagement } from "node-opcua-server-configuration";
|
|
10
10
|
import * as yargs from "yargs";
|
|
@@ -21,27 +21,57 @@ const certificateManager = new OPCUACertificateManager({
|
|
|
21
21
|
rootFolder: pkiFolder
|
|
22
22
|
});
|
|
23
23
|
|
|
24
|
+
const users = [
|
|
25
|
+
{
|
|
26
|
+
username: "user1",
|
|
27
|
+
password: "password1",
|
|
28
|
+
role: makeRoles([WellKnownRoles.AuthenticatedUser, WellKnownRoles.ConfigureAdmin, WellKnownRoles.SecurityAdmin])
|
|
29
|
+
},
|
|
30
|
+
{ username: "user2", password: "password2", role: makeRoles([WellKnownRoles.AuthenticatedUser, WellKnownRoles.Operator]) }
|
|
31
|
+
];
|
|
32
|
+
|
|
33
|
+
const userManager = {
|
|
34
|
+
isValidUser(username: string, password: string) {
|
|
35
|
+
const uIndex = users.findIndex((x) => x.username === username);
|
|
36
|
+
if (uIndex < 0) {
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
if (users[uIndex].password !== password) {
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
return true;
|
|
43
|
+
},
|
|
44
|
+
getUserRoles(username: string) {
|
|
45
|
+
const uIndex = users.findIndex((x) => x.username === username);
|
|
46
|
+
if (uIndex < 0) {
|
|
47
|
+
return [];
|
|
48
|
+
}
|
|
49
|
+
const userRole = users[uIndex].role;
|
|
50
|
+
return userRole;
|
|
51
|
+
}
|
|
52
|
+
};
|
|
24
53
|
|
|
25
54
|
async function main() {
|
|
26
|
-
|
|
27
55
|
const argv = await yargs.wrap(132).option("port", {
|
|
28
56
|
alias: "p",
|
|
29
57
|
default: "26543",
|
|
30
58
|
describe: "port to listen"
|
|
31
59
|
}).argv;
|
|
32
60
|
|
|
33
|
-
|
|
34
61
|
const port = parseInt(argv.port, 10) || 26555;
|
|
35
62
|
|
|
36
|
-
const
|
|
63
|
+
const serverOptions: OPCUAServerOptions = {
|
|
37
64
|
port,
|
|
38
65
|
|
|
39
66
|
nodeset_filename: [nodesets.standard],
|
|
40
67
|
|
|
41
|
-
serverCertificateManager: certificateManager
|
|
68
|
+
serverCertificateManager: certificateManager,
|
|
69
|
+
userCertificateManager: certificateManager,
|
|
70
|
+
|
|
71
|
+
userManager
|
|
42
72
|
};
|
|
43
73
|
|
|
44
|
-
process.title = "Node OPCUA Server on port : " +
|
|
74
|
+
process.title = "Node OPCUA Server on port : " + serverOptions.port;
|
|
45
75
|
const tmpFolder = path.join(__dirname, "../certificates/myApp");
|
|
46
76
|
|
|
47
77
|
const applicationGroup = new CertificateManager({
|
|
@@ -49,27 +79,25 @@ async function main() {
|
|
|
49
79
|
});
|
|
50
80
|
await applicationGroup.initialize();
|
|
51
81
|
|
|
52
|
-
const server = new OPCUAServer(
|
|
82
|
+
const server = new OPCUAServer(serverOptions);
|
|
53
83
|
|
|
54
84
|
console.log(" Configuration rootdir = ", server.serverCertificateManager.rootDir);
|
|
55
|
-
|
|
56
85
|
console.log(chalk.yellow(" server PID :"), process.pid);
|
|
57
86
|
|
|
58
|
-
server.
|
|
59
|
-
const addressSpace = server.engine.addressSpace!;
|
|
60
|
-
// to do: expose new nodeid here
|
|
61
|
-
const ns = addressSpace.getNamespaceIndex("http://yourorganisation.org/my_data_type/");
|
|
62
|
-
|
|
63
|
-
await installPushCertificateManagement(addressSpace, {
|
|
64
|
-
applicationGroup: server.serverCertificateManager,
|
|
65
|
-
userTokenGroup: server.userCertificateManager,
|
|
87
|
+
await server.initialize();
|
|
66
88
|
|
|
67
|
-
|
|
68
|
-
|
|
89
|
+
const addressSpace = server.engine.addressSpace!;
|
|
90
|
+
// to do: expose new nodeid here
|
|
91
|
+
const ns = addressSpace.getNamespaceIndex("http://yourorganisation.org/my_data_type/");
|
|
69
92
|
|
|
70
|
-
|
|
93
|
+
await installPushCertificateManagement(addressSpace, {
|
|
94
|
+
applicationGroup: server.serverCertificateManager,
|
|
95
|
+
userTokenGroup: server.userCertificateManager,
|
|
96
|
+
applicationUri: server.serverInfo.applicationUri!
|
|
71
97
|
});
|
|
72
98
|
|
|
99
|
+
console.log("Certificate rejected folder ", server.serverCertificateManager.rejectedFolder);
|
|
100
|
+
|
|
73
101
|
try {
|
|
74
102
|
await server.start();
|
|
75
103
|
} catch (err) {
|
|
@@ -83,7 +111,7 @@ async function main() {
|
|
|
83
111
|
console.log(chalk.yellow(" endpointUrl :"), chalk.cyan(endpointUrl));
|
|
84
112
|
console.log(chalk.yellow("\n server now waiting for connections. CTRL+C to stop"));
|
|
85
113
|
|
|
86
|
-
process.
|
|
114
|
+
process.once("SIGINT", async () => {
|
|
87
115
|
// only work on linux apparently
|
|
88
116
|
await server.shutdown(1000);
|
|
89
117
|
console.log(chalk.red.bold(" shutting down completed "));
|
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
#!/usr/bin/env ts-node
|
|
2
2
|
/* eslint no-process-exit: 0 */
|
|
3
3
|
// tslint:disable:no-console
|
|
4
|
-
import * as chalk from "chalk";
|
|
5
4
|
import * as path from "path";
|
|
6
|
-
import * as yargs from "yargs";
|
|
7
5
|
import * as os from "os";
|
|
8
6
|
|
|
9
|
-
import
|
|
7
|
+
import * as chalk from "chalk";
|
|
8
|
+
import * as yargs from "yargs";
|
|
9
|
+
|
|
10
|
+
import {
|
|
11
|
+
makeApplicationUrn,
|
|
12
|
+
MessageSecurityMode,
|
|
13
|
+
nodesets,
|
|
14
|
+
OPCUAServer,
|
|
15
|
+
OPCUAServerOptions,
|
|
16
|
+
SecurityPolicy,
|
|
17
|
+
ServerSession
|
|
18
|
+
} from "node-opcua";
|
|
10
19
|
|
|
11
20
|
Error.stackTraceLimit = Infinity;
|
|
12
21
|
|
|
@@ -26,9 +35,7 @@ const userManager = {
|
|
|
26
35
|
}
|
|
27
36
|
};
|
|
28
37
|
|
|
29
|
-
|
|
30
38
|
async function main() {
|
|
31
|
-
|
|
32
39
|
const argv = await yargs(process.argv)
|
|
33
40
|
.wrap(132)
|
|
34
41
|
|
|
@@ -47,17 +54,16 @@ async function main() {
|
|
|
47
54
|
default: false,
|
|
48
55
|
describe: "silent - no trace"
|
|
49
56
|
})
|
|
50
|
-
.option("
|
|
57
|
+
.option("maxSessions", {
|
|
51
58
|
alias: "m",
|
|
52
59
|
default: 10
|
|
53
60
|
})
|
|
54
61
|
.help(true).argv;
|
|
55
62
|
|
|
56
|
-
|
|
57
63
|
const port = argv.port || 26543;
|
|
58
64
|
// server_options.alternateHostname = argv.alternateHostname;
|
|
59
65
|
|
|
60
|
-
const server_options = {
|
|
66
|
+
const server_options: OPCUAServerOptions = {
|
|
61
67
|
securityPolicies: [SecurityPolicy.Basic128Rsa15, SecurityPolicy.Basic256],
|
|
62
68
|
|
|
63
69
|
securityModes: [MessageSecurityMode.Sign, MessageSecurityMode.SignAndEncrypt],
|
|
@@ -81,6 +87,12 @@ async function main() {
|
|
|
81
87
|
buildNumber: "1234"
|
|
82
88
|
},
|
|
83
89
|
|
|
90
|
+
serverCapabilities: {
|
|
91
|
+
maxSessions: argv.maxSessions
|
|
92
|
+
},
|
|
93
|
+
|
|
94
|
+
maxConnectionsPerEndpoint: argv.maxSessions,
|
|
95
|
+
|
|
84
96
|
userManager,
|
|
85
97
|
|
|
86
98
|
isAuditing: false
|
|
@@ -88,7 +100,6 @@ async function main() {
|
|
|
88
100
|
|
|
89
101
|
process.title = "Node OPCUA Server on port : " + server_options.port;
|
|
90
102
|
|
|
91
|
-
|
|
92
103
|
const server = new OPCUAServer(server_options);
|
|
93
104
|
|
|
94
105
|
server.on("post_initialize", () => {
|
package/bin/simple_server.js
CHANGED
|
@@ -39,12 +39,12 @@ const argv = yargs(process.argv)
|
|
|
39
39
|
.number("port")
|
|
40
40
|
.default("port", 26543)
|
|
41
41
|
|
|
42
|
-
.number("
|
|
43
|
-
.describe("
|
|
44
|
-
.default("
|
|
42
|
+
.number("maxSessions")
|
|
43
|
+
.describe("maxSessions", "the maximum number of concurrent client session that the server will accept")
|
|
44
|
+
.default("maxSessions", 500)
|
|
45
45
|
|
|
46
|
-
.number("
|
|
47
|
-
.describe("
|
|
46
|
+
.number("maxSubscriptionsPerSession")
|
|
47
|
+
.describe("maxSubscriptionsPerSession", "the maximum number of concurrent subscriptions per session")
|
|
48
48
|
|
|
49
49
|
.boolean("silent")
|
|
50
50
|
.default("silent", false)
|
|
@@ -63,17 +63,16 @@ const argv = yargs(process.argv)
|
|
|
63
63
|
.default("applicationName", "NodeOPCUA-Server")
|
|
64
64
|
|
|
65
65
|
.alias("a", "alternateHostname")
|
|
66
|
-
.alias("m", "
|
|
66
|
+
.alias("m", "maxSessions")
|
|
67
67
|
.alias("n", "applicationName")
|
|
68
68
|
.alias("p", "port")
|
|
69
69
|
|
|
70
70
|
.help(true).argv;
|
|
71
71
|
|
|
72
72
|
const port = argv.port;
|
|
73
|
-
const
|
|
74
|
-
const maxConnectionsPerEndpoint =
|
|
75
|
-
const
|
|
76
|
-
OPCUAServer.MAX_SUBSCRIPTION = maxAllowedSubscriptionNumber;
|
|
73
|
+
const maxSessions = argv.maxSessions;
|
|
74
|
+
const maxConnectionsPerEndpoint = maxSessions;
|
|
75
|
+
const maxSubscriptionsPerSession = argv.maxSubscriptionsPerSession || 50;
|
|
77
76
|
|
|
78
77
|
async function getIpAddresses() {
|
|
79
78
|
const ipAddresses = [];
|
|
@@ -122,12 +121,12 @@ const userManager = {
|
|
|
122
121
|
return true;
|
|
123
122
|
},
|
|
124
123
|
getUserRoles(username) {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
124
|
+
const uIndex = users.findIndex((x) => x.username === username);
|
|
125
|
+
if (uIndex < 0) {
|
|
126
|
+
return [];
|
|
127
|
+
}
|
|
128
|
+
const userRole = users[uIndex].role;
|
|
129
|
+
return userRole;
|
|
131
130
|
}
|
|
132
131
|
};
|
|
133
132
|
|
|
@@ -187,7 +186,6 @@ const paths = envPaths(productUri);
|
|
|
187
186
|
|
|
188
187
|
port,
|
|
189
188
|
|
|
190
|
-
maxAllowedSessionNumber: maxAllowedSessionNumber,
|
|
191
189
|
maxConnectionsPerEndpoint: maxConnectionsPerEndpoint,
|
|
192
190
|
|
|
193
191
|
nodeset_filename: [nodesets.standard, nodesets.di],
|
|
@@ -204,6 +202,10 @@ const paths = envPaths(productUri);
|
|
|
204
202
|
buildNumber: "1234"
|
|
205
203
|
},
|
|
206
204
|
serverCapabilities: {
|
|
205
|
+
maxSessions,
|
|
206
|
+
maxSubscriptionsPerSession,
|
|
207
|
+
maxSubscription: maxSessions * maxSubscriptionsPerSession,
|
|
208
|
+
|
|
207
209
|
maxBrowseContinuationPoints: 10,
|
|
208
210
|
maxHistoryContinuationPoints: 10,
|
|
209
211
|
// maxInactiveLockTime
|
package/dist/mini_server.js
CHANGED
|
@@ -10,9 +10,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
// tslint:disable:no-console
|
|
13
|
-
const chalk = require("chalk");
|
|
14
13
|
const path = require("path");
|
|
15
14
|
const os = require("os");
|
|
15
|
+
const chalk = require("chalk");
|
|
16
16
|
const node_opcua_1 = require("node-opcua");
|
|
17
17
|
Error.stackTraceLimit = Infinity;
|
|
18
18
|
const port = 26544;
|
|
@@ -24,7 +24,6 @@ const serverOptions = {
|
|
|
24
24
|
rootFolder: pkiFolder
|
|
25
25
|
}),
|
|
26
26
|
port,
|
|
27
|
-
maxAllowedSessionNumber: 2,
|
|
28
27
|
maxConnectionsPerEndpoint: 2,
|
|
29
28
|
nodeset_filename: [(0, node_opcua_1.get_mini_nodeset_filename)()],
|
|
30
29
|
serverInfo: {
|
|
@@ -39,6 +38,7 @@ const serverOptions = {
|
|
|
39
38
|
buildNumber: "1234"
|
|
40
39
|
},
|
|
41
40
|
serverCapabilities: {
|
|
41
|
+
maxSessions: 10,
|
|
42
42
|
maxBrowseContinuationPoints: 10,
|
|
43
43
|
maxHistoryContinuationPoints: 10,
|
|
44
44
|
// maxInactiveLockTime
|
package/dist/mini_server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mini_server.js","sourceRoot":"","sources":["../bin/mini_server.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,4BAA4B;AAC5B
|
|
1
|
+
{"version":3,"file":"mini_server.js","sourceRoot":"","sources":["../bin/mini_server.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,4BAA4B;AAC5B,6BAA6B;AAC7B,yBAAyB;AAEzB,+BAA+B;AAE/B,2CAQoB;AACpB,KAAK,CAAC,eAAe,GAAG,QAAQ,CAAC;AAEjC,MAAM,IAAI,GAAG,KAAK,CAAC;AAEnB,sCAAuC;AACvC,MAAM,MAAM,GAAG,QAAQ,CAAC,sBAAsB,CAAC,CAAC,MAAM,CAAC;AACvD,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AAE3C,MAAM,aAAa,GAAuB;IACtC,wBAAwB,EAAE,IAAI,oCAAuB,CAAC;QAClD,UAAU,EAAE,SAAS;KACxB,CAAC;IAEF,IAAI;IAEJ,yBAAyB,EAAE,CAAC;IAE5B,gBAAgB,EAAE,CAAC,IAAA,sCAAyB,GAAE,CAAC;IAE/C,UAAU,EAAE;QACR,cAAc,EAAE,IAAA,+BAAkB,EAAC,EAAE,CAAC,QAAQ,EAAE,EAAE,sBAAsB,CAAC;QACzE,UAAU,EAAE,uBAAuB;QAEnC,eAAe,EAAE,EAAE,IAAI,EAAE,uBAAuB,EAAE,MAAM,EAAE,IAAI,EAAE;QAChE,gBAAgB,E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CAAC,GAAG,CAAC,mBAAmB,EAAE,MAAM,CAAC,CAAC;YACzC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,8BAA8B,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;QAC7H,CAAC,CAAC,CAAC;IACP,CAAC;CAAA;AAED,IAAI,EAAE,CAAC"}
|
|
@@ -27,6 +27,34 @@ const certificateManager = new node_opcua_1.OPCUACertificateManager({
|
|
|
27
27
|
name: "PKI",
|
|
28
28
|
rootFolder: pkiFolder
|
|
29
29
|
});
|
|
30
|
+
const users = [
|
|
31
|
+
{
|
|
32
|
+
username: "user1",
|
|
33
|
+
password: "password1",
|
|
34
|
+
role: (0, node_opcua_1.makeRoles)([node_opcua_1.WellKnownRoles.AuthenticatedUser, node_opcua_1.WellKnownRoles.ConfigureAdmin, node_opcua_1.WellKnownRoles.SecurityAdmin])
|
|
35
|
+
},
|
|
36
|
+
{ username: "user2", password: "password2", role: (0, node_opcua_1.makeRoles)([node_opcua_1.WellKnownRoles.AuthenticatedUser, node_opcua_1.WellKnownRoles.Operator]) }
|
|
37
|
+
];
|
|
38
|
+
const userManager = {
|
|
39
|
+
isValidUser(username, password) {
|
|
40
|
+
const uIndex = users.findIndex((x) => x.username === username);
|
|
41
|
+
if (uIndex < 0) {
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
if (users[uIndex].password !== password) {
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
return true;
|
|
48
|
+
},
|
|
49
|
+
getUserRoles(username) {
|
|
50
|
+
const uIndex = users.findIndex((x) => x.username === username);
|
|
51
|
+
if (uIndex < 0) {
|
|
52
|
+
return [];
|
|
53
|
+
}
|
|
54
|
+
const userRole = users[uIndex].role;
|
|
55
|
+
return userRole;
|
|
56
|
+
}
|
|
57
|
+
};
|
|
30
58
|
function main() {
|
|
31
59
|
return __awaiter(this, void 0, void 0, function* () {
|
|
32
60
|
const argv = yield yargs.wrap(132).option("port", {
|
|
@@ -35,31 +63,32 @@ function main() {
|
|
|
35
63
|
describe: "port to listen"
|
|
36
64
|
}).argv;
|
|
37
65
|
const port = parseInt(argv.port, 10) || 26555;
|
|
38
|
-
const
|
|
66
|
+
const serverOptions = {
|
|
39
67
|
port,
|
|
40
68
|
nodeset_filename: [node_opcua_1.nodesets.standard],
|
|
41
|
-
serverCertificateManager: certificateManager
|
|
69
|
+
serverCertificateManager: certificateManager,
|
|
70
|
+
userCertificateManager: certificateManager,
|
|
71
|
+
userManager
|
|
42
72
|
};
|
|
43
|
-
process.title = "Node OPCUA Server on port : " +
|
|
73
|
+
process.title = "Node OPCUA Server on port : " + serverOptions.port;
|
|
44
74
|
const tmpFolder = path.join(__dirname, "../certificates/myApp");
|
|
45
75
|
const applicationGroup = new node_opcua_pki_1.CertificateManager({
|
|
46
76
|
location: tmpFolder
|
|
47
77
|
});
|
|
48
78
|
yield applicationGroup.initialize();
|
|
49
|
-
const server = new node_opcua_1.OPCUAServer(
|
|
79
|
+
const server = new node_opcua_1.OPCUAServer(serverOptions);
|
|
50
80
|
console.log(" Configuration rootdir = ", server.serverCertificateManager.rootDir);
|
|
51
81
|
console.log(chalk.yellow(" server PID :"), process.pid);
|
|
52
|
-
server.
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}));
|
|
82
|
+
yield server.initialize();
|
|
83
|
+
const addressSpace = server.engine.addressSpace;
|
|
84
|
+
// to do: expose new nodeid here
|
|
85
|
+
const ns = addressSpace.getNamespaceIndex("http://yourorganisation.org/my_data_type/");
|
|
86
|
+
yield (0, node_opcua_server_configuration_1.installPushCertificateManagement)(addressSpace, {
|
|
87
|
+
applicationGroup: server.serverCertificateManager,
|
|
88
|
+
userTokenGroup: server.userCertificateManager,
|
|
89
|
+
applicationUri: server.serverInfo.applicationUri
|
|
90
|
+
});
|
|
91
|
+
console.log("Certificate rejected folder ", server.serverCertificateManager.rejectedFolder);
|
|
63
92
|
try {
|
|
64
93
|
yield server.start();
|
|
65
94
|
}
|
|
@@ -71,7 +100,7 @@ function main() {
|
|
|
71
100
|
console.log(chalk.yellow(" server on port :"), chalk.cyan(server.endpoints[0].port.toString()));
|
|
72
101
|
console.log(chalk.yellow(" endpointUrl :"), chalk.cyan(endpointUrl));
|
|
73
102
|
console.log(chalk.yellow("\n server now waiting for connections. CTRL+C to stop"));
|
|
74
|
-
process.
|
|
103
|
+
process.once("SIGINT", () => __awaiter(this, void 0, void 0, function* () {
|
|
75
104
|
// only work on linux apparently
|
|
76
105
|
yield server.shutdown(1000);
|
|
77
106
|
console.log(chalk.red.bold(" shutting down completed "));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server_with_push_certificate.js","sourceRoot":"","sources":["../bin/server_with_push_certificate.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,+BAA+B;AAC/B,4BAA4B;AAC5B,6BAA6B;AAC7B,+BAA+B;AAE/B,
|
|
1
|
+
{"version":3,"file":"server_with_push_certificate.js","sourceRoot":"","sources":["../bin/server_with_push_certificate.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,+BAA+B;AAC/B,4BAA4B;AAC5B,6BAA6B;AAC7B,+BAA+B;AAE/B,2CAA2H;AAC3H,mDAAoD;AACpD,qFAAmF;AACnF,+BAA+B;AAE/B,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;AAEpD,sCAAuC;AACvC,MAAM,MAAM,GAAG,QAAQ,CAAC,oBAAoB,CAAC,CAAC,MAAM,CAAC;AACrD,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AAE3C,MAAM,kBAAkB,GAAG,IAAI,oCAAuB,C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-12,10 +12,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
/* eslint no-process-exit: 0 */
|
|
14
14
|
// tslint:disable:no-console
|
|
15
|
-
const chalk = require("chalk");
|
|
16
15
|
const path = require("path");
|
|
17
|
-
const yargs = require("yargs");
|
|
18
16
|
const os = require("os");
|
|
17
|
+
const chalk = require("chalk");
|
|
18
|
+
const yargs = require("yargs");
|
|
19
19
|
const node_opcua_1 = require("node-opcua");
|
|
20
20
|
Error.stackTraceLimit = Infinity;
|
|
21
21
|
function constructFilename(filename) {
|
|
@@ -49,7 +49,7 @@ function main() {
|
|
|
49
49
|
default: false,
|
|
50
50
|
describe: "silent - no trace"
|
|
51
51
|
})
|
|
52
|
-
.option("
|
|
52
|
+
.option("maxSessions", {
|
|
53
53
|
alias: "m",
|
|
54
54
|
default: 10
|
|
55
55
|
})
|
|
@@ -73,6 +73,10 @@ function main() {
|
|
|
73
73
|
buildDate: new Date(),
|
|
74
74
|
buildNumber: "1234"
|
|
75
75
|
},
|
|
76
|
+
serverCapabilities: {
|
|
77
|
+
maxSessions: argv.maxSessions
|
|
78
|
+
},
|
|
79
|
+
maxConnectionsPerEndpoint: argv.maxSessions,
|
|
76
80
|
userManager,
|
|
77
81
|
isAuditing: false
|
|
78
82
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"simple_secure_server.js","sourceRoot":"","sources":["../bin/simple_secure_server.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,+BAA+B;AAC/B,4BAA4B;AAC5B,+BAA+B;AAC/B
|
|
1
|
+
{"version":3,"file":"simple_secure_server.js","sourceRoot":"","sources":["../bin/simple_secure_server.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,+BAA+B;AAC/B,4BAA4B;AAC5B,6BAA6B;AAC7B,yBAAyB;AAEzB,+BAA+B;AAC/B,+BAA+B;AAE/B,2CAQoB;AA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AE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-opcua-samples",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.72.0",
|
|
4
4
|
"description": "pure nodejs OPCUA SDK - module -samples",
|
|
5
5
|
"bin": {
|
|
6
6
|
"simple_client": "./dist/simple_client_ts.js",
|
|
@@ -20,13 +20,13 @@
|
|
|
20
20
|
"@types/yargs": "17.0.10",
|
|
21
21
|
"easy-table": "^1.2.0",
|
|
22
22
|
"exit": "^0.1.2",
|
|
23
|
-
"node-opcua": "2.
|
|
23
|
+
"node-opcua": "2.72.0",
|
|
24
24
|
"node-opcua-assert": "2.66.0",
|
|
25
|
-
"node-opcua-pki": "^2.
|
|
26
|
-
"node-opcua-server-configuration": "2.
|
|
25
|
+
"node-opcua-pki": "^2.17.0",
|
|
26
|
+
"node-opcua-server-configuration": "2.72.0",
|
|
27
27
|
"sprintf-js": "^1.1.2",
|
|
28
28
|
"treeify": "^1.1.0",
|
|
29
|
-
"underscore": "^1.13.
|
|
29
|
+
"underscore": "^1.13.4",
|
|
30
30
|
"yargs": "15.4.1"
|
|
31
31
|
},
|
|
32
32
|
"author": "Etienne Rossignon",
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"internet of things"
|
|
45
45
|
],
|
|
46
46
|
"homepage": "http://node-opcua.github.io/",
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "3c5f00e20bf5bef91a1ca3663af149b903760e5c"
|
|
48
48
|
}
|