@usex/mikrotik-mcp 3.9.0 → 3.9.1
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/cli.js +8 -3
- package/dist/index.js +8 -3
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -12753,10 +12753,15 @@ ${result}`;
|
|
|
12753
12753
|
},
|
|
12754
12754
|
async handler(a, ctx) {
|
|
12755
12755
|
ctx.info("Configuring OpenVPN server");
|
|
12756
|
-
const
|
|
12756
|
+
const params = () => new Cmd("/interface ovpn-server server set").opt("certificate", a.certificate).opt("auth", a.auth).opt("cipher", a.cipher).opt("netmask", a.netmask).opt("mode", a.mode).opt("port", a.port).opt("protocol", a.protocol).opt("default-profile", a.default_profile).bool("require-client-certificate", a.require_client_certificate).opt("max-mtu", a.max_mtu);
|
|
12757
|
+
const cmd = params().bool("disabled", a.enabled === undefined ? undefined : !a.enabled).build();
|
|
12757
12758
|
if (cmd === "/interface ovpn-server server set")
|
|
12758
12759
|
return "No updates specified.";
|
|
12759
|
-
|
|
12760
|
+
let result = await executeMikrotikCommand(cmd, ctx);
|
|
12761
|
+
if (a.enabled !== undefined && containsRawParserError(result)) {
|
|
12762
|
+
const legacy = params().bool("enabled", a.enabled).build();
|
|
12763
|
+
result = await executeMikrotikCommand(legacy, ctx);
|
|
12764
|
+
}
|
|
12760
12765
|
if (looksLikeError(result))
|
|
12761
12766
|
return `Failed to configure OpenVPN server: ${result}`;
|
|
12762
12767
|
const details = await executeMikrotikCommand("/interface ovpn-server server print", ctx);
|
|
@@ -23301,7 +23306,7 @@ function registerPrompts(server) {
|
|
|
23301
23306
|
// package.json
|
|
23302
23307
|
var package_default = {
|
|
23303
23308
|
name: "@usex/mikrotik-mcp",
|
|
23304
|
-
version: "3.9.
|
|
23309
|
+
version: "3.9.1",
|
|
23305
23310
|
description: "MCP server for MikroTik RouterOS \u2014 660+ tools over SSH for firewall, NAT, routing, DHCP, DNS, WireGuard, wireless, QoS and more.",
|
|
23306
23311
|
keywords: [
|
|
23307
23312
|
"ai",
|
package/dist/index.js
CHANGED
|
@@ -12765,10 +12765,15 @@ ${result}`;
|
|
|
12765
12765
|
},
|
|
12766
12766
|
async handler(a, ctx) {
|
|
12767
12767
|
ctx.info("Configuring OpenVPN server");
|
|
12768
|
-
const
|
|
12768
|
+
const params = () => new Cmd("/interface ovpn-server server set").opt("certificate", a.certificate).opt("auth", a.auth).opt("cipher", a.cipher).opt("netmask", a.netmask).opt("mode", a.mode).opt("port", a.port).opt("protocol", a.protocol).opt("default-profile", a.default_profile).bool("require-client-certificate", a.require_client_certificate).opt("max-mtu", a.max_mtu);
|
|
12769
|
+
const cmd = params().bool("disabled", a.enabled === undefined ? undefined : !a.enabled).build();
|
|
12769
12770
|
if (cmd === "/interface ovpn-server server set")
|
|
12770
12771
|
return "No updates specified.";
|
|
12771
|
-
|
|
12772
|
+
let result = await executeMikrotikCommand(cmd, ctx);
|
|
12773
|
+
if (a.enabled !== undefined && containsRawParserError(result)) {
|
|
12774
|
+
const legacy = params().bool("enabled", a.enabled).build();
|
|
12775
|
+
result = await executeMikrotikCommand(legacy, ctx);
|
|
12776
|
+
}
|
|
12772
12777
|
if (looksLikeError(result))
|
|
12773
12778
|
return `Failed to configure OpenVPN server: ${result}`;
|
|
12774
12779
|
const details = await executeMikrotikCommand("/interface ovpn-server server print", ctx);
|
|
@@ -21704,7 +21709,7 @@ function selectToolModules(filter = {}, catalog = moduleCatalog) {
|
|
|
21704
21709
|
// package.json
|
|
21705
21710
|
var package_default = {
|
|
21706
21711
|
name: "@usex/mikrotik-mcp",
|
|
21707
|
-
version: "3.9.
|
|
21712
|
+
version: "3.9.1",
|
|
21708
21713
|
description: "MCP server for MikroTik RouterOS \u2014 660+ tools over SSH for firewall, NAT, routing, DHCP, DNS, WireGuard, wireless, QoS and more.",
|
|
21709
21714
|
keywords: [
|
|
21710
21715
|
"ai",
|
package/package.json
CHANGED