@usex/mikrotik-mcp 6.10.0 → 6.12.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/README.md +47 -1078
- package/dist/cli.js +649 -132
- package/dist/index.d.ts +15 -2
- package/dist/index.js +1 -1
- package/dist/shared/{cli-81s63cts.js → cli-cbs63p0r.js} +5477 -5220
- package/dist/shared/{cli-b4kkd56k.js → cli-frg1ynaw.js} +1 -1
- package/dist/shared/{cli-0srgjr3v.js → cli-rbe7s4mf.js} +1 -1
- package/dist/shared/{cli-chcn79z7.js → cli-s9k59ne8.js} +1 -1
- package/dist/shared/{cli-twafzgn3.js → cli-zhfcf33s.js} +1 -1
- package/dist/shared/{library-x66xvb3s.js → library-5qaxx124.js} +1 -1
- package/dist/shared/{library-f89nvhan.js → library-9sjsjtd1.js} +1 -1
- package/dist/shared/{library-thv5s4bs.js → library-he7xy22v.js} +495 -293
- package/dist/shared/{library-sxxt02xq.js → library-je5saqvp.js} +1 -1
- package/dist/shared/{library-2kk6k7zh.js → library-vtet3w1h.js} +1 -1
- package/dist/ui/observability.html +222 -89
- package/package.json +37 -28
- package/schemas/config.schema.json +16 -0
- package/schemas/devtools-manifest.json +1 -1
- package/schemas/tool-catalog.json +416 -9
- package/schemas/tools/apply_plan.json +6 -1
- package/schemas/tools/update_bandwidth_server.json +34 -0
- package/schemas/tools/update_bfd_configuration.json +8 -0
- package/schemas/tools/update_bgp_connection.json +8 -0
- package/schemas/tools/update_bridge.json +8 -0
- package/schemas/tools/update_dns_static.json +8 -0
- package/schemas/tools/update_dot1x_client.json +8 -0
- package/schemas/tools/update_dot1x_server.json +8 -0
- package/schemas/tools/update_filter_rule.json +8 -0
- package/schemas/tools/update_igmp_proxy_interface.json +8 -0
- package/schemas/tools/update_ip_pool.json +8 -0
- package/schemas/tools/update_ipsec_peer.json +8 -0
- package/schemas/tools/update_ipsec_profile.json +8 -0
- package/schemas/tools/update_ipsec_proposal.json +8 -0
- package/schemas/tools/update_ipv6_filter_rule.json +8 -0
- package/schemas/tools/update_ipv6_mangle_rule.json +8 -0
- package/schemas/tools/update_ipv6_nat_rule.json +8 -0
- package/schemas/tools/update_ipv6_nd.json +8 -0
- package/schemas/tools/update_ipv6_pool.json +8 -0
- package/schemas/tools/update_ipv6_raw_rule.json +8 -0
- package/schemas/tools/update_mangle_rule.json +8 -0
- package/schemas/tools/update_nat_rule.json +8 -0
- package/schemas/tools/update_ospf_instance.json +8 -0
- package/schemas/tools/update_ovpn_server.json +8 -0
- package/schemas/tools/update_ppp_profile.json +8 -0
- package/schemas/tools/update_ppp_secret.json +8 -0
- package/schemas/tools/update_queue_interface.json +8 -0
- package/schemas/tools/update_queue_tree.json +8 -0
- package/schemas/tools/update_queue_type.json +8 -0
- package/schemas/tools/update_radius_server.json +8 -0
- package/schemas/tools/update_rip_instance.json +8 -0
- package/schemas/tools/update_route.json +8 -0
- package/schemas/tools/update_routing_filter_rule.json +8 -0
- package/schemas/tools/update_routing_id.json +8 -0
- package/schemas/tools/update_routing_rule.json +8 -0
- package/schemas/tools/update_routing_table.json +8 -0
- package/schemas/tools/update_rpki_session.json +8 -0
- package/schemas/tools/update_simple_queue.json +8 -0
- package/schemas/tools/update_switch.json +8 -0
- package/schemas/tools/update_switch_port.json +8 -0
- package/schemas/tools/update_switch_port_isolation.json +8 -0
- package/schemas/tools/update_switch_rule.json +8 -0
- package/schemas/tools/update_traffic_monitor.json +8 -0
- package/schemas/tools/update_user_manager_user.json +8 -0
- package/schemas/tools/update_vlan_interface.json +8 -0
- package/schemas/tools/update_wireguard_interface.json +8 -0
- package/schemas/tools/update_wireguard_peer.json +8 -0
- package/schemas/tools/update_wireless_interface.json +8 -0
- package/scripts/service.ts +618 -0
- package/scripts/upgrade.ts +7 -0
|
@@ -8518,6 +8518,7 @@ var DeviceConfigSchema2 = object({
|
|
|
8518
8518
|
fallbackHosts: array(union([ipv42(), ipv62()])).max(7).optional(),
|
|
8519
8519
|
username: string().default("admin"),
|
|
8520
8520
|
password: string().default(""),
|
|
8521
|
+
bandwidthAuth: object({ username: string().min(1), password: string().min(1).max(32) }).optional(),
|
|
8521
8522
|
port: exports_coerce.number().int().positive().default(22),
|
|
8522
8523
|
keyFilename: string().optional(),
|
|
8523
8524
|
privateKey: string().optional(),
|
|
@@ -9593,6 +9594,7 @@ function emulateScreen(text) {
|
|
|
9593
9594
|
return lines.map((line) => Array.from(line, (c) => c ?? " ").join("").replace(/\s+$/, ""));
|
|
9594
9595
|
}
|
|
9595
9596
|
function extractCommandOutput(raw, command) {
|
|
9597
|
+
command = command?.replace(/[\r\n]+$/, "");
|
|
9596
9598
|
const lines = emulateScreen(raw);
|
|
9597
9599
|
let start = 1;
|
|
9598
9600
|
if (command !== undefined && lines.length > 0) {
|
|
@@ -9685,6 +9687,7 @@ class MacTelnetConsole {
|
|
|
9685
9687
|
}
|
|
9686
9688
|
async run(cli) {
|
|
9687
9689
|
this.assertOpen();
|
|
9690
|
+
cli = cli.replace(/[\r\n]+$/, "");
|
|
9688
9691
|
this.buffer = "";
|
|
9689
9692
|
this.session.sendInput(enc.encode(`${cli}\r`));
|
|
9690
9693
|
await this.waitFor((buffer) => this.endsWithPrompt(buffer), this.options.commandTimeoutMs, `running over mac-telnet: ${cli}`);
|
|
@@ -10516,7 +10519,7 @@ function stripAnsi(text) {
|
|
|
10516
10519
|
}
|
|
10517
10520
|
var CTRL_X = "\x18";
|
|
10518
10521
|
var PRINT_PAGER_RE = /(?:^|[\r\n])-- \[Q quit\|D dump\|(?:up\||left\||right\|)*down\][ \t\r]*$/;
|
|
10519
|
-
var
|
|
10522
|
+
var SESSION_CLOSED = "The Safe Mode session was closed automatically, so RouterOS reverts changes that were still " + "uncommitted. No restart is needed: read back the device state, then retry.";
|
|
10520
10523
|
var IDLE_TIMEOUT_MS = 15000;
|
|
10521
10524
|
var HARD_CAP_MS = 120000;
|
|
10522
10525
|
function isSafeModeActivated(response) {
|
|
@@ -10542,7 +10545,7 @@ class SafeModeManager2 {
|
|
|
10542
10545
|
channel = null;
|
|
10543
10546
|
active = false;
|
|
10544
10547
|
droppedUnexpectedly = false;
|
|
10545
|
-
|
|
10548
|
+
lastClosure = null;
|
|
10546
10549
|
probeSequence = 0;
|
|
10547
10550
|
queue = Promise.resolve();
|
|
10548
10551
|
commandTimeoutMs = HARD_CAP_MS;
|
|
@@ -10553,7 +10556,7 @@ class SafeModeManager2 {
|
|
|
10553
10556
|
}
|
|
10554
10557
|
this.commandTimeoutMs = commandTimeoutMs;
|
|
10555
10558
|
this.idleTimeoutMs = idleTimeoutMs;
|
|
10556
|
-
return `Safe Mode command timeout: ${commandTimeoutMs}ms; idle timeout: ${idleTimeoutMs}ms. Applies to subsequent commands only; does not change RouterOS rollback timing
|
|
10559
|
+
return `Safe Mode command timeout: ${commandTimeoutMs}ms; idle timeout: ${idleTimeoutMs}ms. Applies to subsequent commands only; does not change RouterOS rollback timing.`;
|
|
10557
10560
|
}
|
|
10558
10561
|
constructor(deviceName) {
|
|
10559
10562
|
this.deviceName = deviceName;
|
|
@@ -10562,7 +10565,12 @@ class SafeModeManager2 {
|
|
|
10562
10565
|
return this.active;
|
|
10563
10566
|
}
|
|
10564
10567
|
get requiresRecovery() {
|
|
10565
|
-
return this.droppedUnexpectedly
|
|
10568
|
+
return this.droppedUnexpectedly;
|
|
10569
|
+
}
|
|
10570
|
+
closeAfterFailure(reason) {
|
|
10571
|
+
this.cleanup();
|
|
10572
|
+
this.droppedUnexpectedly = false;
|
|
10573
|
+
this.lastClosure = `${new Date().toISOString()}: ${reason}`;
|
|
10566
10574
|
}
|
|
10567
10575
|
lock(fn) {
|
|
10568
10576
|
const run = this.queue.then(fn, fn);
|
|
@@ -10576,9 +10584,8 @@ class SafeModeManager2 {
|
|
|
10576
10584
|
enable() {
|
|
10577
10585
|
return this.lock(async () => {
|
|
10578
10586
|
if (this.active)
|
|
10579
|
-
return
|
|
10587
|
+
return "Safe mode is already active.";
|
|
10580
10588
|
this.droppedUnexpectedly = false;
|
|
10581
|
-
this.uncertain = false;
|
|
10582
10589
|
const dc = getDevice2(this.deviceName);
|
|
10583
10590
|
if (dc.mac) {
|
|
10584
10591
|
return "Error: Safe Mode is not supported for a MAC-Telnet device " + `('${this.deviceName}' is reached by MAC ${dc.mac}). ` + "Connect over SSH (configure host/credentials) to use Safe Mode.";
|
|
@@ -10610,23 +10617,22 @@ class SafeModeManager2 {
|
|
|
10610
10617
|
execute(command) {
|
|
10611
10618
|
return this.lock(async () => {
|
|
10612
10619
|
if (this.droppedUnexpectedly) {
|
|
10613
|
-
|
|
10620
|
+
this.droppedUnexpectedly = false;
|
|
10621
|
+
throw new Error("Safe Mode session dropped before commit, so RouterOS reverts its uncommitted changes. " + "This command was NOT sent. Rollback is unverified; read back the device state, then retry.");
|
|
10614
10622
|
}
|
|
10615
10623
|
if (!this.active || !this.channel) {
|
|
10616
|
-
throw new Error("Safe mode session is not active.");
|
|
10624
|
+
throw new Error("Safe mode session is not active (it may have been closed after a failure). This command was NOT sent.");
|
|
10617
10625
|
}
|
|
10618
|
-
if (this.uncertain)
|
|
10619
|
-
throw new Error(UNCERTAIN_SESSION);
|
|
10620
10626
|
const response = this.readUntilPrompt(this.idleTimeoutMs, undefined, this.commandTimeoutMs, true);
|
|
10621
10627
|
this.channel.write(`${command}\r`);
|
|
10622
10628
|
const { text, timedOut } = await response;
|
|
10623
10629
|
if (timedOut) {
|
|
10624
|
-
this.
|
|
10625
|
-
throw new Error(`Safe Mode command did not return a recognized prompt before the timeout (command: ${command}). ` + `Execution may have occurred; do not retry the write blindly. ${
|
|
10630
|
+
this.closeAfterFailure(`command timeout (${command})`);
|
|
10631
|
+
throw new Error(`Safe Mode command did not return a recognized prompt before the timeout (command: ${command}). ` + `Execution may have occurred; do not retry the write blindly. ${SESSION_CLOSED}`);
|
|
10626
10632
|
}
|
|
10627
10633
|
if (classifyPrompt(text) !== "safe") {
|
|
10628
|
-
this.
|
|
10629
|
-
throw new Error(`Safe Mode protection was lost or could not be confirmed. Changes may already be permanent. ${
|
|
10634
|
+
this.closeAfterFailure(`Safe Mode protection lost (${command})`);
|
|
10635
|
+
throw new Error(`Safe Mode protection was lost or could not be confirmed. Changes may already be permanent. ${SESSION_CLOSED}`);
|
|
10630
10636
|
}
|
|
10631
10637
|
return this.extractOutput(text, command);
|
|
10632
10638
|
});
|
|
@@ -10634,28 +10640,29 @@ class SafeModeManager2 {
|
|
|
10634
10640
|
commit() {
|
|
10635
10641
|
return this.lock(async () => {
|
|
10636
10642
|
if (this.droppedUnexpectedly) {
|
|
10643
|
+
this.droppedUnexpectedly = false;
|
|
10637
10644
|
return {
|
|
10638
10645
|
ok: false,
|
|
10639
10646
|
message: "Commit FAILED \u2014 the Safe Mode session dropped. Rollback is unverified; compare device state with the backup before retrying."
|
|
10640
10647
|
};
|
|
10641
10648
|
}
|
|
10642
10649
|
if (!this.active || !this.channel) {
|
|
10643
|
-
|
|
10650
|
+
const last = this.lastClosure ? ` The last session was closed automatically (${this.lastClosure}).` : "";
|
|
10651
|
+
return { ok: true, message: `Safe mode is not active. Nothing to commit.${last}` };
|
|
10644
10652
|
}
|
|
10645
|
-
if (this.uncertain)
|
|
10646
|
-
return { ok: false, message: UNCERTAIN_SESSION };
|
|
10647
10653
|
const before = await this.probeMode();
|
|
10648
10654
|
if (before === "released") {
|
|
10649
|
-
this.
|
|
10655
|
+
this.closeAfterFailure("Safe Mode had exited before commit");
|
|
10650
10656
|
return {
|
|
10651
10657
|
ok: false,
|
|
10652
|
-
message: "Safe Mode exited before commit was requested. Changes may be permanent;
|
|
10658
|
+
message: "Safe Mode exited before commit was requested. Changes may be permanent; the session " + "was closed. Read back the device state against the backup."
|
|
10653
10659
|
};
|
|
10654
10660
|
}
|
|
10655
10661
|
if (before === "unknown") {
|
|
10662
|
+
this.closeAfterFailure("no answer to the pre-commit probe");
|
|
10656
10663
|
return {
|
|
10657
10664
|
ok: false,
|
|
10658
|
-
message:
|
|
10665
|
+
message: `Could not determine Safe Mode state before commit; nothing was committed. ${SESSION_CLOSED}`
|
|
10659
10666
|
};
|
|
10660
10667
|
}
|
|
10661
10668
|
this.channel.write(CTRL_X);
|
|
@@ -10667,12 +10674,13 @@ class SafeModeManager2 {
|
|
|
10667
10674
|
case "safe":
|
|
10668
10675
|
return {
|
|
10669
10676
|
ok: false,
|
|
10670
|
-
message: "Commit NOT completed \u2014 the device is still in Safe Mode (the Ctrl+X commit did not " + "take). Your changes remain held in memory and are NOT yet saved;
|
|
10677
|
+
message: "Commit NOT completed \u2014 the device is still in Safe Mode (the Ctrl+X commit did not " + "take). Your changes remain held in memory and are NOT yet saved; commit again to " + "retry, or roll back to discard them. If retries keep failing, this RouterOS build may " + "not accept an interactive Safe Mode commit over SSH \u2014 apply the change without Safe " + "Mode instead (apply_plan with use_safe_mode=false)."
|
|
10671
10678
|
};
|
|
10672
10679
|
default:
|
|
10680
|
+
this.closeAfterFailure("no prompt after the commit keystroke");
|
|
10673
10681
|
return {
|
|
10674
10682
|
ok: false,
|
|
10675
|
-
message: "Commit
|
|
10683
|
+
message: "Commit outcome unconfirmed \u2014 no prompt seen after commit. The session was closed, so " + "the changes are now either saved or reverted. Read back the device state to see which."
|
|
10676
10684
|
};
|
|
10677
10685
|
}
|
|
10678
10686
|
});
|
|
@@ -10693,9 +10701,10 @@ class SafeModeManager2 {
|
|
|
10693
10701
|
if (this.droppedUnexpectedly) {
|
|
10694
10702
|
return "Safe mode session DROPPED unexpectedly. Rollback is unverified; inspect device state against the backup before retrying writes.";
|
|
10695
10703
|
}
|
|
10696
|
-
if (this.
|
|
10697
|
-
return
|
|
10698
|
-
|
|
10704
|
+
if (this.active)
|
|
10705
|
+
return `Safe mode is ACTIVE (last observed). Command timeout: ${this.commandTimeoutMs}ms; idle timeout: ${this.idleTimeoutMs}ms. ` + "Commit to persist or roll back to revert.";
|
|
10706
|
+
const last = this.lastClosure ? ` Last session was closed automatically (${this.lastClosure}); RouterOS reverts uncommitted changes on close.` : "";
|
|
10707
|
+
return `Safe mode is NOT active. Changes take effect and persist immediately.${last}`;
|
|
10699
10708
|
}
|
|
10700
10709
|
handleUnexpectedDrop = () => {
|
|
10701
10710
|
if (!this.active)
|
|
@@ -10795,7 +10804,6 @@ class SafeModeManager2 {
|
|
|
10795
10804
|
}
|
|
10796
10805
|
cleanup() {
|
|
10797
10806
|
this.active = false;
|
|
10798
|
-
this.uncertain = false;
|
|
10799
10807
|
if (this.channel) {
|
|
10800
10808
|
try {
|
|
10801
10809
|
this.channel.end();
|
|
@@ -10975,6 +10983,7 @@ function parseKvTokens(chunk) {
|
|
|
10975
10983
|
return out;
|
|
10976
10984
|
}
|
|
10977
10985
|
var INDEX_LINE = /^\s*(\d+)\s+(.*)$/;
|
|
10986
|
+
var UNNUMBERED_FLAGS_LINE = /^\s*([A-Z][A-Za-z]*)\s+(?=[A-Za-z][\w.-]*=)(.*)$/;
|
|
10978
10987
|
var LEADING_FLAGS = /^([A-Z][A-Za-z]*)(?=\s|$)/;
|
|
10979
10988
|
function unionColumns(rows) {
|
|
10980
10989
|
const seen = new Set;
|
|
@@ -10995,7 +11004,7 @@ function parseDetailRecords(lines) {
|
|
|
10995
11004
|
const flush = () => {
|
|
10996
11005
|
if (!current)
|
|
10997
11006
|
return;
|
|
10998
|
-
const row = { "#": current.index };
|
|
11007
|
+
const row = current.index ? { "#": current.index } : {};
|
|
10999
11008
|
if (current.flags.trim())
|
|
11000
11009
|
row.flags = current.flags.trim();
|
|
11001
11010
|
if (current.comment.trim())
|
|
@@ -11005,7 +11014,8 @@ function parseDetailRecords(lines) {
|
|
|
11005
11014
|
current = null;
|
|
11006
11015
|
};
|
|
11007
11016
|
for (const line of lines) {
|
|
11008
|
-
const
|
|
11017
|
+
const unnumbered = line.match(UNNUMBERED_FLAGS_LINE);
|
|
11018
|
+
const m = line.match(INDEX_LINE) ?? (unnumbered ? [line, "", `${unnumbered[1]} ${unnumbered[2]}`] : null);
|
|
11009
11019
|
if (m) {
|
|
11010
11020
|
flush();
|
|
11011
11021
|
let rest = m[2];
|
|
@@ -11096,7 +11106,7 @@ function parseColumnarRecords(lines) {
|
|
|
11096
11106
|
function parseRecords(text) {
|
|
11097
11107
|
const lines = text.split(/\r?\n/).filter((l) => !/^\s*(Flags|Columns):/.test(l));
|
|
11098
11108
|
const hasKv = /[A-Za-z][\w.-]*=/.test(text);
|
|
11099
|
-
if (hasKv && lines.some((l) => INDEX_LINE.test(l))) {
|
|
11109
|
+
if (hasKv && lines.some((l) => INDEX_LINE.test(l) || UNNUMBERED_FLAGS_LINE.test(l))) {
|
|
11100
11110
|
const rows = parseDetailRecords(lines);
|
|
11101
11111
|
const hasData = rows.some((r) => Object.keys(r).some((k) => k !== "#" && k !== "flags"));
|
|
11102
11112
|
if (rows.length && hasData)
|
|
@@ -11247,10 +11257,16 @@ async function runOnce(command, deviceName, opts, ctx) {
|
|
|
11247
11257
|
client.disconnect();
|
|
11248
11258
|
}
|
|
11249
11259
|
}
|
|
11260
|
+
var READ_COMMAND_RE = /^\/(?:[^;[\]{}]*\s)?(?:print|export)(?:\s[^;[\]{}]*)?$/;
|
|
11261
|
+
function bypassesSafeMode(command, ctx) {
|
|
11262
|
+
if (ctx.risk === "READ")
|
|
11263
|
+
return true;
|
|
11264
|
+
return ctx.risk === undefined && READ_COMMAND_RE.test(command.trim());
|
|
11265
|
+
}
|
|
11250
11266
|
async function executeMikrotikCommand2(command, ctx, opts) {
|
|
11251
11267
|
const deviceName = resolveDeviceName2(ctx.device);
|
|
11252
11268
|
const safe = getSafeModeManager2(deviceName);
|
|
11253
|
-
if (safe.isActive || safe.requiresRecovery) {
|
|
11269
|
+
if ((safe.isActive || safe.requiresRecovery) && !bypassesSafeMode(command, ctx)) {
|
|
11254
11270
|
ctx.info(`[${deviceName}] Executing (safe mode): ${containerCommandForLog(command)}`);
|
|
11255
11271
|
ctx.transport = "ssh";
|
|
11256
11272
|
return safe.execute(command);
|
|
@@ -11460,6 +11476,15 @@ function splitHostPort(value) {
|
|
|
11460
11476
|
return { host: hostPort[1], port: Number(hostPort[2]) };
|
|
11461
11477
|
return { host: v };
|
|
11462
11478
|
}
|
|
11479
|
+
function unsetFragments(keys) {
|
|
11480
|
+
return (keys ?? []).map((key) => {
|
|
11481
|
+
const name = key.trim().replace(/^!/, "").replaceAll("_", "-");
|
|
11482
|
+
if (!/^[a-z][a-z0-9-]*$/.test(name)) {
|
|
11483
|
+
throw new Error(`Invalid property name to unset: ${JSON.stringify(key)}`);
|
|
11484
|
+
}
|
|
11485
|
+
return `!${name}`;
|
|
11486
|
+
});
|
|
11487
|
+
}
|
|
11463
11488
|
|
|
11464
11489
|
class Cmd {
|
|
11465
11490
|
parts;
|
|
@@ -11487,6 +11512,10 @@ class Cmd {
|
|
|
11487
11512
|
}
|
|
11488
11513
|
return this;
|
|
11489
11514
|
}
|
|
11515
|
+
unset(keys) {
|
|
11516
|
+
this.parts.push(...unsetFragments(keys));
|
|
11517
|
+
return this;
|
|
11518
|
+
}
|
|
11490
11519
|
raw(fragment) {
|
|
11491
11520
|
if (fragment)
|
|
11492
11521
|
this.parts.push(fragment);
|
|
@@ -13690,6 +13719,7 @@ function defineTool2(def) {
|
|
|
13690
13719
|
}
|
|
13691
13720
|
sendLog?.(level, `[${id}] ${message}`);
|
|
13692
13721
|
}, device, id);
|
|
13722
|
+
ctx.risk = risk;
|
|
13693
13723
|
let result;
|
|
13694
13724
|
try {
|
|
13695
13725
|
result = await execute(args, ctx);
|
|
@@ -15606,13 +15636,13 @@ async function undoMigration(id, confirm, selected) {
|
|
|
15606
15636
|
throw new Error("Undo lost Safe Mode or exceeded its time budget.");
|
|
15607
15637
|
await checkedRead(item.undo, createContext(undefined, device));
|
|
15608
15638
|
}
|
|
15609
|
-
const beforeTarget = (await import("./library-
|
|
15610
|
-
const db = await beforeTarget((await import("./library-
|
|
15639
|
+
const beforeTarget = (await import("./library-9sjsjtd1.js")).openSnapshotStore;
|
|
15640
|
+
const db = await beforeTarget((await import("./library-5qaxx124.js")).DEFAULT_SNAPSHOT_DB);
|
|
15611
15641
|
try {
|
|
15612
15642
|
const original = db.get(p.snapshots.target);
|
|
15613
15643
|
if (!original)
|
|
15614
15644
|
throw new Error("Original target snapshot unavailable.");
|
|
15615
|
-
const { normalizeExport } = await import("./library-
|
|
15645
|
+
const { normalizeExport } = await import("./library-je5saqvp.js");
|
|
15616
15646
|
if (normalizeExport((await migrationInventory(device)).export) !== normalizeExport(original.body))
|
|
15617
15647
|
throw new Error("Target differs from its backup. Undo verification failed.");
|
|
15618
15648
|
} finally {
|
|
@@ -23736,6 +23766,7 @@ function interfaceName(description) {
|
|
|
23736
23766
|
const s = string().regex(NO_WHITESPACE, INTERFACE_NAME_MESSAGE);
|
|
23737
23767
|
return description ? s.describe(description) : s;
|
|
23738
23768
|
}
|
|
23769
|
+
var unsetProperties = array(string().regex(/^[a-z][a-z0-9_-]*$/, "Use a bare property name, e.g. 'dst-address'.")).optional().describe("Properties to UNSET (RouterOS `!prop`), so they no longer apply \u2014 e.g. ['dst-address'] " + "removes the destination-address match. snake_case or kebab-case. Not for setting a value.");
|
|
23739
23770
|
|
|
23740
23771
|
// src/tools/bridge.ts
|
|
23741
23772
|
var ProtocolMode = _enum(["none", "rstp", "stp", "mstp"]);
|
|
@@ -23839,6 +23870,7 @@ ${result}`;
|
|
|
23839
23870
|
annotations: WRITE_IDEMPOTENT,
|
|
23840
23871
|
description: "Modifies settings on an existing bridge interface (`/interface bridge set`). " + "Use to rename a bridge (`new_name`), toggle VLAN filtering, change STP/RSTP/MSTP protocol mode, adjust MTU, or enable/disable the bridge. " + "VLAN filtering can interrupt management: read get_vlan_segmentation_guide, verify CPU membership, PVID/admission and recovery access before enabling it LAST. Do not disable existing filtering to simplify migration. " + "For adding or removing member interfaces use `add_bridge_port` / `remove_bridge_port`; " + "for VLAN table entries use `add_bridge_vlan`. " + "Identified by the current bridge `name`; supply only the fields you want to change.",
|
|
23841
23872
|
inputSchema: {
|
|
23873
|
+
unset: unsetProperties,
|
|
23842
23874
|
name: string().describe("Current name of the bridge to update"),
|
|
23843
23875
|
new_name: interfaceName().optional().describe("Rename the bridge to this (no spaces)."),
|
|
23844
23876
|
comment: string().optional(),
|
|
@@ -23873,8 +23905,8 @@ ${result}`;
|
|
|
23873
23905
|
if ((a.arp_inspection || a.ip_source_guard) && !a.confirm_security_disruption)
|
|
23874
23906
|
return "Enabling ARP inspection or IP source guard can clear DHCP bindings and interrupt clients. Review DHCP snooping and trusted ports, then set confirm_security_disruption=true.";
|
|
23875
23907
|
ctx.info(`Updating bridge: name=${a.name}`);
|
|
23876
|
-
const cmd = new Cmd(`/interface bridge set [find name=${quoteValue(a.name)}]`).opt("name", a.new_name).opt("comment", a.comment).bool("vlan-filtering", a.vlan_filtering).opt("protocol-mode", a.protocol_mode).bool("disabled", a.disabled).opt("mtu", a.mtu).opt("ageing-time", a.ageing_time).opt("arp", a.arp).opt("arp-timeout", a.arp_timeout).bool("auto-mac", a.auto_mac).opt("admin-mac", a.admin_mac).opt("priority", a.priority).opt("ether-type", a.ether_type).opt("pvid", a.pvid).opt("frame-types", a.frame_types).bool("ingress-filtering", a.ingress_filtering).bool("dhcp-snooping", a.dhcp_snooping).bool("arp-inspection", a.arp_inspection).bool("ip-source-guard", a.ip_source_guard).opt("mlag-init-delay", a.mlag_init_delay).bool("mlag-lacp-fallback", a.mlag_lacp_fallback).bool("igmp-snooping", a.igmp_snooping).bool("fast-forward", a.fast_forward).bool("mvrp", a.mvrp).opt("forward-delay", a.forward_delay).opt("max-message-age", a.max_message_age).opt("transmit-hold-count", a.transmit_hold_count).build();
|
|
23877
|
-
if (
|
|
23908
|
+
const cmd = new Cmd(`/interface bridge set [find name=${quoteValue(a.name)}]`).opt("name", a.new_name).opt("comment", a.comment).bool("vlan-filtering", a.vlan_filtering).opt("protocol-mode", a.protocol_mode).bool("disabled", a.disabled).opt("mtu", a.mtu).opt("ageing-time", a.ageing_time).opt("arp", a.arp).opt("arp-timeout", a.arp_timeout).bool("auto-mac", a.auto_mac).opt("admin-mac", a.admin_mac).opt("priority", a.priority).opt("ether-type", a.ether_type).opt("pvid", a.pvid).opt("frame-types", a.frame_types).bool("ingress-filtering", a.ingress_filtering).bool("dhcp-snooping", a.dhcp_snooping).bool("arp-inspection", a.arp_inspection).bool("ip-source-guard", a.ip_source_guard).opt("mlag-init-delay", a.mlag_init_delay).bool("mlag-lacp-fallback", a.mlag_lacp_fallback).bool("igmp-snooping", a.igmp_snooping).bool("fast-forward", a.fast_forward).bool("mvrp", a.mvrp).opt("forward-delay", a.forward_delay).opt("max-message-age", a.max_message_age).opt("transmit-hold-count", a.transmit_hold_count).unset(a.unset).build();
|
|
23909
|
+
if (!/[=!]/.test(cmd.slice(cmd.indexOf("]"))))
|
|
23878
23910
|
return "No updates specified.";
|
|
23879
23911
|
const result = await executeMikrotikCommand2(cmd, ctx);
|
|
23880
23912
|
if (looksLikeError(result))
|
|
@@ -24572,6 +24604,44 @@ function diffLines(from, to, opts = {}) {
|
|
|
24572
24604
|
}
|
|
24573
24605
|
|
|
24574
24606
|
// src/tools/change-plan.ts
|
|
24607
|
+
var REVERT_SETTLE_MS = 2000;
|
|
24608
|
+
async function exportConfig(readCtx) {
|
|
24609
|
+
const body = await executeMikrotikCommand2("/export terse", readCtx);
|
|
24610
|
+
if (looksLikeError(body) || !/^\/[a-z]/m.test(body)) {
|
|
24611
|
+
throw new Error("could not read `/export terse` from the device");
|
|
24612
|
+
}
|
|
24613
|
+
return normalizeExport2(body);
|
|
24614
|
+
}
|
|
24615
|
+
async function liveState(readCtx, before, after, mayRevert = true) {
|
|
24616
|
+
const read = () => exportConfig(readCtx).catch(() => null);
|
|
24617
|
+
let live = await read();
|
|
24618
|
+
if (mayRevert && live !== null && live !== before) {
|
|
24619
|
+
await new Promise((resolve) => setTimeout(resolve, REVERT_SETTLE_MS));
|
|
24620
|
+
live = await read();
|
|
24621
|
+
}
|
|
24622
|
+
const label = "DEVICE STATE (read back on a fresh connection)";
|
|
24623
|
+
if (live === null) {
|
|
24624
|
+
return {
|
|
24625
|
+
kind: "unreadable",
|
|
24626
|
+
text: `${label}: could not be read. The device did not answer; check it before retrying.`
|
|
24627
|
+
};
|
|
24628
|
+
}
|
|
24629
|
+
if (live === before) {
|
|
24630
|
+
return {
|
|
24631
|
+
kind: "unchanged",
|
|
24632
|
+
text: `${label}: identical to the pre-change export. No change is on the device.`
|
|
24633
|
+
};
|
|
24634
|
+
}
|
|
24635
|
+
if (after !== undefined && live === after) {
|
|
24636
|
+
return { kind: "applied", text: `${label}: the change IS on the device.` };
|
|
24637
|
+
}
|
|
24638
|
+
const diff = diffLines(before, live, { fromLabel: "before", toLabel: "live" });
|
|
24639
|
+
return {
|
|
24640
|
+
kind: "different",
|
|
24641
|
+
text: `${label}: differs from the pre-change export (+${diff.summary.added}/-${diff.summary.removed}):
|
|
24642
|
+
${diff.unified}`
|
|
24643
|
+
};
|
|
24644
|
+
}
|
|
24575
24645
|
function collectCommands(a) {
|
|
24576
24646
|
const fromArray = (a.commands ?? []).map((c) => c.trim()).filter(Boolean);
|
|
24577
24647
|
const fromScript = a.script ? splitCommands(a.script) : [];
|
|
@@ -24600,53 +24670,107 @@ var changePlanTools = [
|
|
|
24600
24670
|
}),
|
|
24601
24671
|
defineTool2({
|
|
24602
24672
|
name: "apply_plan",
|
|
24603
|
-
title: "Apply RouterOS Change Plan
|
|
24673
|
+
title: "Apply RouterOS Change Plan",
|
|
24604
24674
|
annotations: DANGEROUS,
|
|
24605
|
-
description: "Executes intended RouterOS commands
|
|
24675
|
+
description: "Executes intended RouterOS commands and reports the exact unified diff of what changed, " + "computed from `/export terse` captured before and after on a separate connection. " + "Default (use_safe_mode=true): the steps run inside RouterOS Safe Mode (Ctrl+X over an " + "interactive SSH shell). With confirm=false (default) it applies all steps, captures the " + "diff, then rolls everything back \u2014 a true dry-run. With confirm=true it commits, but ONLY " + "after a fresh connection to the device still works \u2014 a change that would lock you out " + "reverts instead of sticking. If any step fails, or the Safe Mode session times out, the " + "session is closed (RouterOS reverts uncommitted changes), the real device state is read " + "back and compared with the pre-change export, and the result is reported; this tool never " + "leaves a Safe Mode session open and needs no follow-up tool to recover. " + "use_safe_mode=false (only when the user explicitly asks to write without Safe Mode): " + "stores a restore-point snapshot on the MCP host, runs the steps directly (each one is " + "permanent at once, there is no automatic rollback and no dry-run, confirm=true is " + "required), stops at the first error, then reads back and diffs. This mode also works on " + "MAC-Telnet devices; Safe Mode requires SSH. Steps execute in the same safe order that " + "plan_changes computes (additive before destructive). For a no-device preview use " + "plan_changes. Returns the plan summary, per-step log, unified diff, and the outcome.",
|
|
24606
24676
|
inputSchema: {
|
|
24607
24677
|
commands: array(string()).optional(),
|
|
24608
24678
|
script: string().optional(),
|
|
24609
|
-
confirm: boolean().default(false).describe("false = apply, show diff, roll back (dry-run). true = commit if still reachable.")
|
|
24679
|
+
confirm: boolean().default(false).describe("false = apply, show diff, roll back (dry-run). true = commit if still reachable."),
|
|
24680
|
+
use_safe_mode: boolean().default(true).describe("false = write directly without Safe Mode (snapshot first, read-back diff after, no " + "automatic rollback). Use only when the user explicitly asks for it.")
|
|
24610
24681
|
},
|
|
24611
24682
|
async handler(a, ctx) {
|
|
24612
24683
|
const commands = collectCommands(a);
|
|
24613
24684
|
if (commands.length === 0)
|
|
24614
24685
|
return "No commands provided to apply.";
|
|
24615
24686
|
const device = resolveDeviceName2(ctx.device);
|
|
24616
|
-
if (getDevice2(ctx.device).mac) {
|
|
24617
|
-
throw new Error("Safe Mode (and therefore apply_plan) requires SSH; it is not available on a MAC-Telnet device.");
|
|
24618
|
-
}
|
|
24619
24687
|
const plan = buildChangePlan(commands);
|
|
24688
|
+
const planBody = renderPlan(plan).split(`
|
|
24689
|
+
`).slice(2).join(`
|
|
24690
|
+
`);
|
|
24620
24691
|
const safe = getSafeModeManager2(device);
|
|
24692
|
+
const readCtx = { ...ctx, risk: "READ" };
|
|
24693
|
+
if (a.use_safe_mode === false) {
|
|
24694
|
+
if (!a.confirm) {
|
|
24695
|
+
return `APPLY PLAN (direct, no Safe Mode) \u2014 ${device}
|
|
24696
|
+
|
|
24697
|
+
${planBody}
|
|
24698
|
+
|
|
24699
|
+
` + "NOT APPLIED: a dry-run is not possible without Safe Mode. Re-run with confirm=true " + "to write directly, or keep use_safe_mode=true for a dry-run.";
|
|
24700
|
+
}
|
|
24701
|
+
if (safe.isActive) {
|
|
24702
|
+
throw new Error("A Safe Mode session is open on this device. Commit it or roll it back before a direct write.");
|
|
24703
|
+
}
|
|
24704
|
+
const snapshotId = await captureSnapshot(readCtx, "apply_plan direct (pre-change)", true);
|
|
24705
|
+
const before = await exportConfig(readCtx);
|
|
24706
|
+
const log = [];
|
|
24707
|
+
let failure;
|
|
24708
|
+
for (const step of plan.steps) {
|
|
24709
|
+
const out = await executeMikrotikCommand2(step.command, ctx).catch((e) => `failure: ${e instanceof Error ? e.message : String(e)}`);
|
|
24710
|
+
if (looksLikeError(out) || out.startsWith("failure: ")) {
|
|
24711
|
+
failure = `step ${step.index} failed:
|
|
24712
|
+
${step.command}
|
|
24713
|
+
\u2192 ${out.trim()}`;
|
|
24714
|
+
break;
|
|
24715
|
+
}
|
|
24716
|
+
log.push(` \u2713 ${step.command}`);
|
|
24717
|
+
}
|
|
24718
|
+
const state = await liveState(readCtx, before, undefined, false);
|
|
24719
|
+
const body = `APPLY PLAN (direct, no Safe Mode) \u2014 ${device}
|
|
24720
|
+
|
|
24721
|
+
${planBody}
|
|
24722
|
+
|
|
24723
|
+
` + `Restore point: snapshot ${snapshotId} (get_config_snapshot returns its export).
|
|
24724
|
+
` + `Executed ${log.length} of ${plan.steps.length} step(s) directly:
|
|
24725
|
+
${log.join(`
|
|
24726
|
+
`) || " (none)"}
|
|
24727
|
+
|
|
24728
|
+
${state.text}`;
|
|
24729
|
+
if (failure) {
|
|
24730
|
+
throw new Error(`${body}
|
|
24731
|
+
|
|
24732
|
+
FAILED: ${failure}
|
|
24733
|
+
Steps marked \u2713 are permanent; nothing was rolled back.`);
|
|
24734
|
+
}
|
|
24735
|
+
if (state.kind === "unreadable") {
|
|
24736
|
+
throw new Error(`${body}
|
|
24737
|
+
|
|
24738
|
+
All steps ran, but the read-back check failed.`);
|
|
24739
|
+
}
|
|
24740
|
+
return `${body}
|
|
24741
|
+
|
|
24742
|
+
APPLIED: all steps ran and are permanent (verified by the read-back above).`;
|
|
24743
|
+
}
|
|
24744
|
+
if (getDevice2(ctx.device).mac) {
|
|
24745
|
+
throw new Error("Safe Mode requires SSH; it is not available on a MAC-Telnet device. " + "Use use_safe_mode=false to write directly.");
|
|
24746
|
+
}
|
|
24747
|
+
const before = await exportConfig(readCtx);
|
|
24621
24748
|
const enabled = await safe.enable();
|
|
24622
24749
|
if (enabled.startsWith("Error"))
|
|
24623
24750
|
throw new Error(enabled);
|
|
24624
24751
|
const APPLY_BUDGET_MS = 180000;
|
|
24625
24752
|
const startedAt = Date.now();
|
|
24626
|
-
|
|
24627
|
-
|
|
24628
|
-
|
|
24629
|
-
|
|
24630
|
-
|
|
24631
|
-
|
|
24632
|
-
|
|
24633
|
-
|
|
24634
|
-
|
|
24635
|
-
|
|
24636
|
-
|
|
24637
|
-
|
|
24753
|
+
let header;
|
|
24754
|
+
let after;
|
|
24755
|
+
let reachable;
|
|
24756
|
+
try {
|
|
24757
|
+
const log = [];
|
|
24758
|
+
for (const step of plan.steps) {
|
|
24759
|
+
if (Date.now() - startedAt > APPLY_BUDGET_MS) {
|
|
24760
|
+
throw new Error(`aborted after ${Math.round((Date.now() - startedAt) / 1000)}s (time budget exceeded)`);
|
|
24761
|
+
}
|
|
24762
|
+
const out = await safe.execute(step.command);
|
|
24763
|
+
if (looksLikeError(out)) {
|
|
24764
|
+
throw new Error(`step ${step.index} failed:
|
|
24638
24765
|
${step.command}
|
|
24639
24766
|
\u2192 ${out.trim()}`);
|
|
24640
|
-
}
|
|
24641
|
-
log.push(` \u2713 ${step.command}`);
|
|
24642
24767
|
}
|
|
24643
|
-
|
|
24644
|
-
|
|
24645
|
-
|
|
24646
|
-
|
|
24647
|
-
|
|
24648
|
-
`
|
|
24649
|
-
const header = `APPLY PLAN \u2014 ${device}
|
|
24768
|
+
log.push(` \u2713 ${step.command}`);
|
|
24769
|
+
}
|
|
24770
|
+
after = await exportConfig(readCtx);
|
|
24771
|
+
const diff = diffLines(before, after, { fromLabel: "before", toLabel: "after" });
|
|
24772
|
+
reachable = await executeMikrotikCommand2("/system identity print", readCtx).then((out) => !looksLikeError(out), () => false);
|
|
24773
|
+
header = `APPLY PLAN \u2014 ${device}
|
|
24650
24774
|
|
|
24651
24775
|
${planBody}
|
|
24652
24776
|
|
|
@@ -24656,35 +24780,51 @@ ${log.join(`
|
|
|
24656
24780
|
|
|
24657
24781
|
` + `EXACT DIFF (+${diff.summary.added}/-${diff.summary.removed}):
|
|
24658
24782
|
${diff.unified || "(no config change)"}`;
|
|
24659
|
-
|
|
24660
|
-
|
|
24661
|
-
|
|
24662
|
-
|
|
24663
|
-
|
|
24664
|
-
|
|
24665
|
-
|
|
24666
|
-
|
|
24783
|
+
} catch (e) {
|
|
24784
|
+
await safe.rollback().catch(() => {});
|
|
24785
|
+
const msg = e instanceof Error ? e.message : String(e);
|
|
24786
|
+
const state = await liveState(readCtx, before);
|
|
24787
|
+
throw new Error(`apply_plan failed; the Safe Mode session was closed and nothing was committed: ${msg}
|
|
24788
|
+
|
|
24789
|
+
${state.text}`);
|
|
24790
|
+
}
|
|
24667
24791
|
if (!a.confirm) {
|
|
24668
24792
|
await safe.rollback();
|
|
24793
|
+
const state = await liveState(readCtx, before);
|
|
24669
24794
|
return `${header}
|
|
24670
24795
|
|
|
24671
|
-
DRY-RUN:
|
|
24796
|
+
DRY-RUN: Safe Mode session closed to roll back. Re-run with confirm=true to commit.
|
|
24797
|
+
${state.text}`;
|
|
24672
24798
|
}
|
|
24673
24799
|
if (!reachable) {
|
|
24674
24800
|
await safe.rollback();
|
|
24801
|
+
const state = await liveState(readCtx, before);
|
|
24675
24802
|
throw new Error(`${header}
|
|
24676
24803
|
|
|
24677
|
-
ABORTED: the device
|
|
24804
|
+
ABORTED: a new connection to the device failed after applying \u2014 Safe Mode session closed to avoid a lock-out.
|
|
24805
|
+
${state.text}`);
|
|
24678
24806
|
}
|
|
24679
|
-
|
|
24680
|
-
if (!committed.ok)
|
|
24681
|
-
|
|
24807
|
+
let committed = await safe.commit();
|
|
24808
|
+
if (!committed.ok && safe.isActive)
|
|
24809
|
+
committed = await safe.commit();
|
|
24810
|
+
if (committed.ok) {
|
|
24811
|
+
return `${header}
|
|
24682
24812
|
|
|
24683
|
-
|
|
24813
|
+
COMMITTED: changes are now permanent. ${committed.message}`;
|
|
24684
24814
|
}
|
|
24685
|
-
|
|
24815
|
+
if (safe.isActive)
|
|
24816
|
+
await safe.rollback().catch(() => {});
|
|
24817
|
+
const state = await liveState(readCtx, before, after);
|
|
24818
|
+
if (state.kind === "applied") {
|
|
24819
|
+
return `${header}
|
|
24686
24820
|
|
|
24687
|
-
COMMITTED:
|
|
24821
|
+
COMMITTED: the commit confirmation was lost (${committed.message}) but the ` + `Safe Mode session is closed and the change was not reverted.
|
|
24822
|
+
${state.text}`;
|
|
24823
|
+
}
|
|
24824
|
+
throw new Error(`${header}
|
|
24825
|
+
|
|
24826
|
+
COMMIT FAILED: ${committed.message}
|
|
24827
|
+
${state.text}`);
|
|
24688
24828
|
}
|
|
24689
24829
|
})
|
|
24690
24830
|
];
|
|
@@ -28174,7 +28314,7 @@ var cache3 = null;
|
|
|
28174
28314
|
async function gateway() {
|
|
28175
28315
|
if (cache3)
|
|
28176
28316
|
return cache3;
|
|
28177
|
-
const { moduleCatalog } = await import("./library-
|
|
28317
|
+
const { moduleCatalog } = await import("./library-vtet3w1h.js");
|
|
28178
28318
|
const forIndex = [];
|
|
28179
28319
|
const byName = new Map;
|
|
28180
28320
|
for (const mod of moduleCatalog) {
|
|
@@ -28427,7 +28567,7 @@ ${details}` : "Static DNS entry addition completed but unable to verify.";
|
|
|
28427
28567
|
}
|
|
28428
28568
|
async function updateDnsStatic(a, ctx) {
|
|
28429
28569
|
ctx.info(`Updating static DNS entry: entry_id=${a.entry_id}`);
|
|
28430
|
-
const updates =
|
|
28570
|
+
const updates = unsetFragments(a.unset);
|
|
28431
28571
|
if (a.name)
|
|
28432
28572
|
updates.push(`name=${quoteValue(a.name)}`);
|
|
28433
28573
|
if (a.type !== undefined)
|
|
@@ -28608,6 +28748,7 @@ ${result}`;
|
|
|
28608
28748
|
annotations: WRITE_IDEMPOTENT,
|
|
28609
28749
|
description: "Modifies fields on an existing static DNS record (`/ip dns static set`) \u2014 can update the " + "hostname (name), record-type data (address, cname, mx_preference, mx_exchange, text, srv " + "fields), ttl, comment, disabled state, or regexp pattern. Pass an empty string for a field " + 'to clear it (e.g. address="" removes the address field). ' + "The `entry_id` is the `.id` from list_dns_static. " + "To activate or deactivate without touching other fields use enable_dns_static or " + "disable_dns_static. " + "Returns the updated entry's full detail.",
|
|
28610
28750
|
inputSchema: {
|
|
28751
|
+
unset: unsetProperties,
|
|
28611
28752
|
entry_id: string(),
|
|
28612
28753
|
name: string().optional(),
|
|
28613
28754
|
type: string().optional().describe('Record type, e.g. "A", "AAAA", "CNAME", "NS", "FWD", "MX", "SRV", "TXT"'),
|
|
@@ -28961,6 +29102,7 @@ ${result}`;
|
|
|
28961
29102
|
annotations: WRITE_IDEMPOTENT,
|
|
28962
29103
|
description: "Modifies an existing 802.1X authenticator entry (`/interface dot1x server set`) identified by interface name or RouterOS `.id`. " + "Pass `server_id` as a `.id` string (starts with `*`, e.g. `*1` \u2014 obtain from `list_dot1x_servers`) or as the interface name (e.g. `ether2`). " + 'Omit any optional field to leave it unchanged; pass `comment=""` to clear the comment. ' + "For creating a new entry use `add_dot1x_server`; for deletion use `remove_dot1x_server`. " + "Returns the updated entry's full detail after the change.",
|
|
28963
29104
|
inputSchema: {
|
|
29105
|
+
unset: unsetProperties,
|
|
28964
29106
|
server_id: string().describe("Interface name or RouterOS '.id'"),
|
|
28965
29107
|
auth_types: AuthTypes.optional(),
|
|
28966
29108
|
accounting: boolean().optional(),
|
|
@@ -28986,7 +29128,7 @@ ${result}`;
|
|
|
28986
29128
|
cmd.raw(`comment=${quoteValue(a.comment)}`);
|
|
28987
29129
|
if (a.disabled !== undefined)
|
|
28988
29130
|
cmd.raw(`disabled=${yesno(a.disabled)}`);
|
|
28989
|
-
const built = cmd.build();
|
|
29131
|
+
const built = cmd.unset(a.unset).build();
|
|
28990
29132
|
if (built === base)
|
|
28991
29133
|
return "No updates specified.";
|
|
28992
29134
|
const result = await executeMikrotikCommand2(built, ctx);
|
|
@@ -29099,6 +29241,7 @@ ${result}`;
|
|
|
29099
29241
|
annotations: WRITE_IDEMPOTENT,
|
|
29100
29242
|
description: "Modifies an existing 802.1X supplicant client entry (`/interface dot1x client set`) identified by " + "interface name or RouterOS `.id` from list_dot1x_clients. `client_id` accepts an interface name " + "(e.g. `'ether3'`) or a `.id` string starting with `'*'`. Only supplied fields are changed; " + 'pass `comment=""` to clear the comment. ' + "Returns the updated entry's full detail after the change. To add a new supplicant entry use add_dot1x_client; " + "to delete one use remove_dot1x_client.",
|
|
29101
29243
|
inputSchema: {
|
|
29244
|
+
unset: unsetProperties,
|
|
29102
29245
|
client_id: string().describe("Interface name or RouterOS '.id'"),
|
|
29103
29246
|
eap_methods: string().optional(),
|
|
29104
29247
|
identity: string().optional(),
|
|
@@ -29117,7 +29260,7 @@ ${result}`;
|
|
|
29117
29260
|
cmd.raw(`comment=${quoteValue(a.comment)}`);
|
|
29118
29261
|
if (a.disabled !== undefined)
|
|
29119
29262
|
cmd.raw(`disabled=${yesno(a.disabled)}`);
|
|
29120
|
-
const built = cmd.build();
|
|
29263
|
+
const built = cmd.unset(a.unset).build();
|
|
29121
29264
|
if (built === base)
|
|
29122
29265
|
return "No updates specified.";
|
|
29123
29266
|
const result = await executeMikrotikCommand2(built, ctx);
|
|
@@ -32665,7 +32808,7 @@ async function updateFilterRule(a, ctx) {
|
|
|
32665
32808
|
]);
|
|
32666
32809
|
if (misuse)
|
|
32667
32810
|
return `Failed to update firewall filter rule: ${misuse}`;
|
|
32668
|
-
const updates =
|
|
32811
|
+
const updates = unsetFragments(a.unset);
|
|
32669
32812
|
const put = (key, val) => {
|
|
32670
32813
|
if (val === undefined)
|
|
32671
32814
|
return;
|
|
@@ -32922,6 +33065,7 @@ ${result}`;
|
|
|
32922
33065
|
annotations: WRITE_IDEMPOTENT,
|
|
32923
33066
|
description: "Updates an existing IPv4 firewall FILTER rule (`/ip firewall filter`) in place and returns " + "its new detail. To reorder it use move_filter_rule; to toggle it on/off use " + "enable_filter_rule / disable_filter_rule; for IPv6 use update_ipv6_filter_rule. " + 'rule_id: the `.id` from list_filter_rules e.g. "*1" or "0". ' + 'connection_state: comma-separated e.g. "established,related". ' + 'limit: RouterOS rate string e.g. "10,5:packet". ' + 'tcp_flags: RouterOS flag expression e.g. "syn,!ack". ' + 'Pass "" to clear an optional field (e.g. src_address="").',
|
|
32924
33067
|
inputSchema: {
|
|
33068
|
+
unset: unsetProperties,
|
|
32925
33069
|
rule_id: string(),
|
|
32926
33070
|
chain: string().optional(),
|
|
32927
33071
|
action: string().optional(),
|
|
@@ -33084,7 +33228,7 @@ ${results.join(`
|
|
|
33084
33228
|
var resolveNatRuleId = ruleResolver("/ip firewall nat");
|
|
33085
33229
|
async function updateNatRule(a, ctx) {
|
|
33086
33230
|
ctx.info(`Updating NAT rule: rule_id=${a.rule_id}`);
|
|
33087
|
-
const updates =
|
|
33231
|
+
const updates = unsetFragments(a.unset);
|
|
33088
33232
|
const put = (key, val) => {
|
|
33089
33233
|
if (val === undefined)
|
|
33090
33234
|
return;
|
|
@@ -33342,6 +33486,7 @@ ${result}`;
|
|
|
33342
33486
|
annotations: WRITE_IDEMPOTENT,
|
|
33343
33487
|
description: "Modifies fields of an existing IPv4 NAT rule (`/ip firewall nat set`) without recreating it. " + 'rule_id takes the `.id` from list_nat_rules e.g. "*1" or "0"; returns the updated rule\'s full detail. ' + "For IPv6 NAT use update_ipv6_nat_rule; to toggle enabled state only use enable_nat_rule or disable_nat_rule. " + 'to_addresses: single IP or range e.g. "10.0.0.1" or "10.0.0.1-10.0.0.10". ' + 'to_ports: single port or range e.g. "8080" or "8080-8090". ' + 'Pass "" to clear an optional field.',
|
|
33344
33488
|
inputSchema: {
|
|
33489
|
+
unset: unsetProperties,
|
|
33345
33490
|
rule_id: string(),
|
|
33346
33491
|
chain: string().optional(),
|
|
33347
33492
|
action: string().optional(),
|
|
@@ -33468,7 +33613,7 @@ ${result}`;
|
|
|
33468
33613
|
var resolveMangleRuleId = ruleResolver("/ip firewall mangle");
|
|
33469
33614
|
async function updateMangleRule(a, ctx) {
|
|
33470
33615
|
ctx.info(`Updating mangle rule: rule_id=${a.rule_id}`);
|
|
33471
|
-
const updates =
|
|
33616
|
+
const updates = unsetFragments(a.unset);
|
|
33472
33617
|
const put = (key, val) => {
|
|
33473
33618
|
if (val === undefined)
|
|
33474
33619
|
return;
|
|
@@ -33733,6 +33878,7 @@ ${result}`;
|
|
|
33733
33878
|
annotations: WRITE_IDEMPOTENT,
|
|
33734
33879
|
description: "Updates fields on an existing IPv4 mangle rule (`/ip firewall mangle set`) \u2014 change chain, action, match criteria, mark values, DSCP, TTL, MSS, or flags without recreating the rule. " + "To toggle enabled state only use enable_mangle_rule or disable_mangle_rule; for IPv6 mangle use update_ipv6_mangle_rule. " + "rule_id takes the `.id` from list_mangle_rules. " + 'Pass "" (empty string) for an optional field to clear it. ' + "Returns the updated rule's full detail.",
|
|
33735
33880
|
inputSchema: {
|
|
33881
|
+
unset: unsetProperties,
|
|
33736
33882
|
rule_id: string(),
|
|
33737
33883
|
chain: string().optional(),
|
|
33738
33884
|
action: string().optional(),
|
|
@@ -34518,7 +34664,7 @@ async function updatePool(a, ctx) {
|
|
|
34518
34664
|
}
|
|
34519
34665
|
if (a.comment !== undefined)
|
|
34520
34666
|
cmd.raw(`comment=${quoteValue(a.comment)}`);
|
|
34521
|
-
const built = cmd.build();
|
|
34667
|
+
const built = cmd.unset(a.unset).build();
|
|
34522
34668
|
if (built === base)
|
|
34523
34669
|
return "No updates specified.";
|
|
34524
34670
|
const result = await executeMikrotikCommand2(built, ctx);
|
|
@@ -34642,6 +34788,7 @@ ${result}`;
|
|
|
34642
34788
|
annotations: WRITE_IDEMPOTENT,
|
|
34643
34789
|
description: "Modifies an existing IPv4 pool (`/ip pool set`) \u2014 rename it, replace its full ranges" + " string, update the next-pool chain reference, or set a comment. Omit a field to leave" + ' it unchanged; pass `""` (empty string) for `next_pool` to clear the chained-pool' + " reference. Ranges use hyphen notation e.g. `192.168.1.1-192.168.1.100`, multiple" + " ranges comma-separated: `10.0.0.1-10.0.0.50,10.0.0.100-10.0.0.120`. To append ranges" + " without knowing the current set use `expand_ip_pool`. Returns the updated pool detail.",
|
|
34644
34790
|
inputSchema: {
|
|
34791
|
+
unset: unsetProperties,
|
|
34645
34792
|
name: string(),
|
|
34646
34793
|
new_name: string().optional(),
|
|
34647
34794
|
ranges: string().optional().describe('Hyphen-separated range(s) e.g. "192.168.1.1-192.168.1.100". Multiple ranges comma-separated: "10.0.0.1-10.0.0.50,10.0.0.100-10.0.0.120"'),
|
|
@@ -35892,7 +36039,7 @@ ${result}`;
|
|
|
35892
36039
|
var resolveRuleId = ruleResolver("/ipv6 firewall filter");
|
|
35893
36040
|
async function updateFilterRule2(a, ctx) {
|
|
35894
36041
|
ctx.info(`Updating IPv6 firewall filter rule: rule_id=${a.rule_id}`);
|
|
35895
|
-
const updates =
|
|
36042
|
+
const updates = unsetFragments(a.unset);
|
|
35896
36043
|
const put = (key, val) => {
|
|
35897
36044
|
if (val === undefined)
|
|
35898
36045
|
return;
|
|
@@ -36122,6 +36269,7 @@ ${result}`;
|
|
|
36122
36269
|
annotations: WRITE_IDEMPOTENT,
|
|
36123
36270
|
description: "Modifies one or more fields of an existing IPv6 firewall FILTER rule (`/ipv6 firewall filter set`) then returns the updated rule detail. " + "Only supplied fields are changed; omit a field to leave it untouched. " + 'Pass "" (empty string) to clear an optional field (e.g. src_address=""). ' + "To toggle enabled/disabled state only, prefer enable_ipv6_filter_rule or disable_ipv6_filter_rule. " + "For the IPv4 equivalent use update_filter_rule. " + 'rule_id takes the `.id` from list_ipv6_filter_rules e.g. "*1" or "0".',
|
|
36124
36271
|
inputSchema: {
|
|
36272
|
+
unset: unsetProperties,
|
|
36125
36273
|
rule_id: string(),
|
|
36126
36274
|
chain: string().optional(),
|
|
36127
36275
|
action: string().optional(),
|
|
@@ -36251,7 +36399,7 @@ ${result}`;
|
|
|
36251
36399
|
var resolveRuleId2 = ruleResolver("/ipv6 firewall nat");
|
|
36252
36400
|
async function updateNatRule2(a, ctx) {
|
|
36253
36401
|
ctx.info(`Updating IPv6 firewall NAT rule: rule_id=${a.rule_id}`);
|
|
36254
|
-
const updates =
|
|
36402
|
+
const updates = unsetFragments(a.unset);
|
|
36255
36403
|
const put = (key, val) => {
|
|
36256
36404
|
if (val === undefined)
|
|
36257
36405
|
return;
|
|
@@ -36474,6 +36622,7 @@ ${result}`;
|
|
|
36474
36622
|
annotations: WRITE_IDEMPOTENT,
|
|
36475
36623
|
description: "Modifies fields of an existing IPv6 NAT rule (`/ipv6 firewall nat set`) \u2014 use to change action, addresses, ports, chain, or flags without removing and recreating the rule. " + "rule_id takes the `.id` from list_ipv6_nat_rules. " + 'Pass "" for any optional field to clear it (e.g. to_address=""). ' + "For IPv4 use update_nat_rule; for the IPv6 filter table use update_ipv6_filter_rule. " + "To only toggle active state use enable_ipv6_nat_rule or disable_ipv6_nat_rule. " + "Returns the updated rule's full detail.",
|
|
36476
36624
|
inputSchema: {
|
|
36625
|
+
unset: unsetProperties,
|
|
36477
36626
|
rule_id: string(),
|
|
36478
36627
|
chain: string().optional(),
|
|
36479
36628
|
action: string().optional(),
|
|
@@ -36593,7 +36742,7 @@ ${result}`;
|
|
|
36593
36742
|
var resolveRuleId3 = ruleResolver("/ipv6 firewall mangle");
|
|
36594
36743
|
async function updateMangleRule2(a, ctx) {
|
|
36595
36744
|
ctx.info(`Updating IPv6 firewall mangle rule: rule_id=${a.rule_id}`);
|
|
36596
|
-
const updates =
|
|
36745
|
+
const updates = unsetFragments(a.unset);
|
|
36597
36746
|
const put = (key, val) => {
|
|
36598
36747
|
if (val === undefined)
|
|
36599
36748
|
return;
|
|
@@ -36832,6 +36981,7 @@ ${result}`;
|
|
|
36832
36981
|
annotations: WRITE_IDEMPOTENT,
|
|
36833
36982
|
description: "Updates fields on an existing IPv6 mangle rule (`/ipv6 firewall mangle set`) \u2014 change chain, action, match criteria, mark values, DSCP, hop-limit, or flags without recreating the rule. " + "To toggle enabled state only use enable_ipv6_mangle_rule or disable_ipv6_mangle_rule. " + "rule_id takes the `.id` from list_ipv6_mangle_rules. " + 'Pass "" (empty string) for an optional field to clear it. ' + "Returns the updated rule's full detail.",
|
|
36834
36983
|
inputSchema: {
|
|
36984
|
+
unset: unsetProperties,
|
|
36835
36985
|
rule_id: string(),
|
|
36836
36986
|
chain: string().optional(),
|
|
36837
36987
|
action: string().optional(),
|
|
@@ -36958,7 +37108,7 @@ ${result}`;
|
|
|
36958
37108
|
var resolveRuleId4 = ruleResolver("/ipv6 firewall raw");
|
|
36959
37109
|
async function updateRawRule(a, ctx) {
|
|
36960
37110
|
ctx.info(`Updating IPv6 firewall raw rule: rule_id=${a.rule_id}`);
|
|
36961
|
-
const updates =
|
|
37111
|
+
const updates = unsetFragments(a.unset);
|
|
36962
37112
|
const put = (key, val) => {
|
|
36963
37113
|
if (val === undefined)
|
|
36964
37114
|
return;
|
|
@@ -37123,6 +37273,7 @@ ${result}`;
|
|
|
37123
37273
|
annotations: WRITE_IDEMPOTENT,
|
|
37124
37274
|
description: "Modifies fields of an existing IPv6 raw rule (`/ipv6 firewall raw set`) without deleting and " + "recreating it. Use to change chain, action, match criteria (src/dst address, port, protocol, " + "interface, address list), comment, log settings, or enabled state. " + "To reorder a rule use move_ipv6_raw_rule; to toggle only " + "the enabled state use enable_ipv6_raw_rule or disable_ipv6_raw_rule. " + 'rule_id takes the .id from list_ipv6_raw_rules. Pass "" for any optional string field to clear it. ' + "Returns the updated rule's full details.",
|
|
37125
37275
|
inputSchema: {
|
|
37276
|
+
unset: unsetProperties,
|
|
37126
37277
|
rule_id: string(),
|
|
37127
37278
|
chain: string().optional(),
|
|
37128
37279
|
action: string().optional(),
|
|
@@ -37424,6 +37575,7 @@ ${result}`;
|
|
|
37424
37575
|
annotations: WRITE_IDEMPOTENT,
|
|
37425
37576
|
description: "Modify an existing IPv6 Neighbor Discovery / Router Advertisement configuration " + "(`/ipv6 nd set`) by interface name (e.g. 'all', 'ether1') or `.id` \u2014 " + "use this to tune the global 'all' entry or any per-interface override. " + "Selects by `.id` when nd_id starts with '*', otherwise by interface name. " + "For adding a brand-new interface entry use add_ipv6_nd. " + "For changes to advertised prefixes use add_ipv6_nd_prefix or remove_ipv6_nd_prefix. " + "Returns the updated entry's full detail.",
|
|
37426
37577
|
inputSchema: {
|
|
37578
|
+
unset: unsetProperties,
|
|
37427
37579
|
nd_id: string().describe("Interface name (e.g. 'all', 'ether1') or '.id'"),
|
|
37428
37580
|
ra_interval: string().optional(),
|
|
37429
37581
|
ra_delay: string().optional(),
|
|
@@ -37450,7 +37602,7 @@ ${result}`;
|
|
|
37450
37602
|
cmd.raw(`comment=${quoteValue(a.comment)}`);
|
|
37451
37603
|
if (a.disabled !== undefined)
|
|
37452
37604
|
cmd.raw(`disabled=${yesno(a.disabled)}`);
|
|
37453
|
-
const built = cmd.build();
|
|
37605
|
+
const built = cmd.unset(a.unset).build();
|
|
37454
37606
|
if (built === base)
|
|
37455
37607
|
return "No updates specified.";
|
|
37456
37608
|
const result = await executeMikrotikCommand2(built, ctx);
|
|
@@ -37727,6 +37879,7 @@ ${result}`;
|
|
|
37727
37879
|
annotations: WRITE_IDEMPOTENT,
|
|
37728
37880
|
description: "Updates an existing IPv6 prefix pool (`/ipv6 pool set`) \u2014 modifies the pool's " + "name, prefix block, delegation size, or comment. " + "Use `list_ipv6_pools` to find the current pool `name` before updating. " + 'Pass comment="" to clear the comment. ' + "Returns the updated pool's full detail after the change.",
|
|
37729
37881
|
inputSchema: {
|
|
37882
|
+
unset: unsetProperties,
|
|
37730
37883
|
name: string(),
|
|
37731
37884
|
new_name: string().optional(),
|
|
37732
37885
|
prefix: string().optional(),
|
|
@@ -37745,7 +37898,7 @@ ${result}`;
|
|
|
37745
37898
|
cmd.set("prefix-length", a.prefix_length);
|
|
37746
37899
|
if (a.comment !== undefined)
|
|
37747
37900
|
cmd.raw(`comment=${quoteValue(a.comment)}`);
|
|
37748
|
-
const built = cmd.build();
|
|
37901
|
+
const built = cmd.unset(a.unset).build();
|
|
37749
37902
|
if (built === base)
|
|
37750
37903
|
return "No updates specified.";
|
|
37751
37904
|
const result = await executeMikrotikCommand2(built, ctx);
|
|
@@ -38081,6 +38234,7 @@ ${result}`;
|
|
|
38081
38234
|
annotations: WRITE_IDEMPOTENT,
|
|
38082
38235
|
description: "Updates an existing IPsec phase-1 profile (`/ip ipsec profile set`) by name \u2014" + " changes IKE algorithm, lifetime, NAT-T, or DPD settings without recreating the profile." + " For phase-2 algorithm changes use update_ipsec_proposal; for peer endpoint changes use" + " update_ipsec_peer. Supply only the fields to change; unchanged fields are left as-is." + " Returns the updated profile detail on success.",
|
|
38083
38236
|
inputSchema: {
|
|
38237
|
+
unset: unsetProperties,
|
|
38084
38238
|
name: string().describe("Current name of the IPsec profile to update"),
|
|
38085
38239
|
new_name: string().optional(),
|
|
38086
38240
|
dh_group: string().optional(),
|
|
@@ -38095,7 +38249,7 @@ ${result}`;
|
|
|
38095
38249
|
async handler(a, ctx) {
|
|
38096
38250
|
ctx.info(`Updating IPsec profile: name=${a.name}`);
|
|
38097
38251
|
const base = `/ip ipsec profile set [find name="${a.name}"]`;
|
|
38098
|
-
const cmd = new Cmd(base).opt("name", a.new_name).opt("dh-group", a.dh_group).opt("enc-algorithm", a.enc_algorithm).opt("hash-algorithm", a.hash_algorithm).opt("prf-algorithm", a.prf_algorithm).opt("lifetime", a.lifetime).bool("nat-traversal", a.nat_traversal).opt("dpd-interval", a.dpd_interval).opt("dpd-maximum-failures", a.dpd_maximum_failures).build();
|
|
38252
|
+
const cmd = new Cmd(base).opt("name", a.new_name).opt("dh-group", a.dh_group).opt("enc-algorithm", a.enc_algorithm).opt("hash-algorithm", a.hash_algorithm).opt("prf-algorithm", a.prf_algorithm).opt("lifetime", a.lifetime).bool("nat-traversal", a.nat_traversal).opt("dpd-interval", a.dpd_interval).opt("dpd-maximum-failures", a.dpd_maximum_failures).unset(a.unset).build();
|
|
38099
38253
|
if (cmd === base)
|
|
38100
38254
|
return "No updates specified.";
|
|
38101
38255
|
const result = await executeMikrotikCommand2(cmd, ctx);
|
|
@@ -38193,6 +38347,7 @@ ${result}`;
|
|
|
38193
38347
|
annotations: WRITE_IDEMPOTENT,
|
|
38194
38348
|
description: "Updates an existing IPsec peer entry (`/ip ipsec peer set`) by name \u2014 changes" + " remote address, exchange mode, profile, local address, or passive flag without" + " removing and recreating the peer." + " For IKE algorithm changes use update_ipsec_profile; for auth credential changes" + " use create_ipsec_identity or remove_ipsec_identity (identities have no update tool)." + " Supply only the fields to change; unchanged fields are left as-is." + " Returns the updated peer detail on success.",
|
|
38195
38349
|
inputSchema: {
|
|
38350
|
+
unset: unsetProperties,
|
|
38196
38351
|
name: string().describe("Current name of the IPsec peer to update"),
|
|
38197
38352
|
new_name: string().optional(),
|
|
38198
38353
|
address: string().optional(),
|
|
@@ -38207,7 +38362,7 @@ ${result}`;
|
|
|
38207
38362
|
async handler(a, ctx) {
|
|
38208
38363
|
ctx.info(`Updating IPsec peer: name=${a.name}`);
|
|
38209
38364
|
const base = `/ip ipsec peer set [find name="${a.name}"]`;
|
|
38210
|
-
const cmd = new Cmd(base).opt("name", a.new_name).opt("address", a.address).opt("profile", a.profile).opt("exchange-mode", a.exchange_mode).opt("local-address", a.local_address).opt("port", a.port).bool("passive", a.passive).opt("comment", a.comment).bool("disabled", a.disabled).build();
|
|
38365
|
+
const cmd = new Cmd(base).opt("name", a.new_name).opt("address", a.address).opt("profile", a.profile).opt("exchange-mode", a.exchange_mode).opt("local-address", a.local_address).opt("port", a.port).bool("passive", a.passive).opt("comment", a.comment).bool("disabled", a.disabled).unset(a.unset).build();
|
|
38211
38366
|
if (cmd === base)
|
|
38212
38367
|
return "No updates specified.";
|
|
38213
38368
|
const result = await executeMikrotikCommand2(cmd, ctx);
|
|
@@ -38373,6 +38528,7 @@ ${result}`;
|
|
|
38373
38528
|
annotations: WRITE_IDEMPOTENT,
|
|
38374
38529
|
description: "Updates an existing IPsec phase-2 proposal (`/ip ipsec proposal set`) by name \u2014" + " changes ESP/AH auth algorithms, encryption algorithms, PFS group, or SA lifetime" + " without recreating the proposal." + " For IKE/phase-1 algorithm changes use update_ipsec_profile." + " Supply only the fields to change; unchanged fields are left as-is." + " Returns the updated proposal detail on success.",
|
|
38375
38530
|
inputSchema: {
|
|
38531
|
+
unset: unsetProperties,
|
|
38376
38532
|
name: string().describe("Current name of the IPsec proposal to update"),
|
|
38377
38533
|
new_name: string().optional(),
|
|
38378
38534
|
auth_algorithms: string().optional(),
|
|
@@ -38384,7 +38540,7 @@ ${result}`;
|
|
|
38384
38540
|
async handler(a, ctx) {
|
|
38385
38541
|
ctx.info(`Updating IPsec proposal: name=${a.name}`);
|
|
38386
38542
|
const base = `/ip ipsec proposal set [find name="${a.name}"]`;
|
|
38387
|
-
const cmd = new Cmd(base).opt("name", a.new_name).opt("auth-algorithms", a.auth_algorithms).opt("enc-algorithms", a.enc_algorithms).opt("pfs-group", a.pfs_group).opt("lifetime", a.lifetime).bool("disabled", a.disabled).build();
|
|
38543
|
+
const cmd = new Cmd(base).opt("name", a.new_name).opt("auth-algorithms", a.auth_algorithms).opt("enc-algorithms", a.enc_algorithms).opt("pfs-group", a.pfs_group).opt("lifetime", a.lifetime).bool("disabled", a.disabled).unset(a.unset).build();
|
|
38388
38544
|
if (cmd === base)
|
|
38389
38545
|
return "No updates specified.";
|
|
38390
38546
|
const result = await executeMikrotikCommand2(cmd, ctx);
|
|
@@ -40146,7 +40302,7 @@ var iran_asns_default = {
|
|
|
40146
40302
|
entries: [
|
|
40147
40303
|
{
|
|
40148
40304
|
asn: "AS1756",
|
|
40149
|
-
name: "Hamyar
|
|
40305
|
+
name: "Hamyar - Shiraz Hamyar Co., IR"
|
|
40150
40306
|
},
|
|
40151
40307
|
{
|
|
40152
40308
|
asn: "AS3263",
|
|
@@ -40178,7 +40334,7 @@ var iran_asns_default = {
|
|
|
40178
40334
|
},
|
|
40179
40335
|
{
|
|
40180
40336
|
asn: "AS9147",
|
|
40181
|
-
name: "
|
|
40337
|
+
name: "Homaye Jahan Nama - Homaye Jahan Nama Co. ( Private Joint Stock), IR"
|
|
40182
40338
|
},
|
|
40183
40339
|
{
|
|
40184
40340
|
asn: "AS12660",
|
|
@@ -40190,7 +40346,7 @@ var iran_asns_default = {
|
|
|
40190
40346
|
},
|
|
40191
40347
|
{
|
|
40192
40348
|
asn: "AS12880",
|
|
40193
|
-
name: "DCI
|
|
40349
|
+
name: "DCI - Iran Information Technology Company PJSC, IR"
|
|
40194
40350
|
},
|
|
40195
40351
|
{
|
|
40196
40352
|
asn: "AS13231",
|
|
@@ -40202,7 +40358,7 @@ var iran_asns_default = {
|
|
|
40202
40358
|
},
|
|
40203
40359
|
{
|
|
40204
40360
|
asn: "AS15611",
|
|
40205
|
-
name: "IROST
|
|
40361
|
+
name: "IROST - Iranian Research Organization for Science & Technology, IR"
|
|
40206
40362
|
},
|
|
40207
40363
|
{
|
|
40208
40364
|
asn: "AS15907",
|
|
@@ -40210,11 +40366,11 @@ var iran_asns_default = {
|
|
|
40210
40366
|
},
|
|
40211
40367
|
{
|
|
40212
40368
|
asn: "AS16018",
|
|
40213
|
-
name: "SepahBank
|
|
40369
|
+
name: "SepahBank - Public JSC Bank Sepah, IR"
|
|
40214
40370
|
},
|
|
40215
40371
|
{
|
|
40216
40372
|
asn: "AS16235",
|
|
40217
|
-
name: "POYANAZM
|
|
40373
|
+
name: "POYANAZM - Pouya Nazm Najafabad Computer Co(PJS), IR"
|
|
40218
40374
|
},
|
|
40219
40375
|
{
|
|
40220
40376
|
asn: "AS16286",
|
|
@@ -40226,7 +40382,7 @@ var iran_asns_default = {
|
|
|
40226
40382
|
},
|
|
40227
40383
|
{
|
|
40228
40384
|
asn: "AS16320",
|
|
40229
|
-
name: "Eniac-Tech
|
|
40385
|
+
name: "Eniac-Tech - Fanavaran Eniac Rayaneh PJSC, IR"
|
|
40230
40386
|
},
|
|
40231
40387
|
{
|
|
40232
40388
|
asn: "AS16322",
|
|
@@ -40242,7 +40398,7 @@ var iran_asns_default = {
|
|
|
40242
40398
|
},
|
|
40243
40399
|
{
|
|
40244
40400
|
asn: "AS21341",
|
|
40245
|
-
name: "SINET
|
|
40401
|
+
name: "SINET - Soroush Rasanheh Company Ltd, IR"
|
|
40246
40402
|
},
|
|
40247
40403
|
{
|
|
40248
40404
|
asn: "AS21419",
|
|
@@ -40274,23 +40430,23 @@ var iran_asns_default = {
|
|
|
40274
40430
|
},
|
|
40275
40431
|
{
|
|
40276
40432
|
asn: "AS29068",
|
|
40277
|
-
name: "
|
|
40433
|
+
name: "University of Tehran - University of Tehran, IR"
|
|
40278
40434
|
},
|
|
40279
40435
|
{
|
|
40280
40436
|
asn: "AS29077",
|
|
40281
|
-
name: "PARSCYBERIAN
|
|
40437
|
+
name: "PARSCYBERIAN - MOSHAVERIN PARSAYE BARIN Company Ltd., IR"
|
|
40282
40438
|
},
|
|
40283
40439
|
{
|
|
40284
40440
|
asn: "AS29079",
|
|
40285
|
-
name: "IRNA
|
|
40441
|
+
name: "IRNA - IRNA, IR"
|
|
40286
40442
|
},
|
|
40287
40443
|
{
|
|
40288
40444
|
asn: "AS29577",
|
|
40289
|
-
name: "
|
|
40445
|
+
name: "Isfahan University - Isfahan University of Technology, IR"
|
|
40290
40446
|
},
|
|
40291
40447
|
{
|
|
40292
40448
|
asn: "AS30902",
|
|
40293
|
-
name: "neda
|
|
40449
|
+
name: "neda - Moasese Gostaresh Etelaat Va Ertebatat Farhangi Neda Rayaneh, IR"
|
|
40294
40450
|
},
|
|
40295
40451
|
{
|
|
40296
40452
|
asn: "AS31175",
|
|
@@ -40298,15 +40454,15 @@ var iran_asns_default = {
|
|
|
40298
40454
|
},
|
|
40299
40455
|
{
|
|
40300
40456
|
asn: "AS31182",
|
|
40301
|
-
name: "
|
|
40457
|
+
name: "Saman Bank - Saman Bank PJSC, IR"
|
|
40302
40458
|
},
|
|
40303
40459
|
{
|
|
40304
40460
|
asn: "AS31303",
|
|
40305
|
-
name: "NIOC
|
|
40461
|
+
name: "NIOC - National Iranian Oil Company, IR"
|
|
40306
40462
|
},
|
|
40307
40463
|
{
|
|
40308
40464
|
asn: "AS31476",
|
|
40309
|
-
name: "MORVA
|
|
40465
|
+
name: "MORVA - Morva System Engineering Technical Company Private Joint Stock, IR"
|
|
40310
40466
|
},
|
|
40311
40467
|
{
|
|
40312
40468
|
asn: "AS31549",
|
|
@@ -40322,7 +40478,7 @@ var iran_asns_default = {
|
|
|
40322
40478
|
},
|
|
40323
40479
|
{
|
|
40324
40480
|
asn: "AS34513",
|
|
40325
|
-
name: "TSTonline
|
|
40481
|
+
name: "TSTonline - Tarashe Sabz Tehran Co. Ltd., IR"
|
|
40326
40482
|
},
|
|
40327
40483
|
{
|
|
40328
40484
|
asn: "AS34592",
|
|
@@ -40346,7 +40502,7 @@ var iran_asns_default = {
|
|
|
40346
40502
|
},
|
|
40347
40503
|
{
|
|
40348
40504
|
asn: "AS35043",
|
|
40349
|
-
name: "ALLAMEH-UNIVERSITY
|
|
40505
|
+
name: "ALLAMEH-UNIVERSITY - Allameh Tabataba'i University, IR"
|
|
40350
40506
|
},
|
|
40351
40507
|
{
|
|
40352
40508
|
asn: "AS35088",
|
|
@@ -40354,15 +40510,15 @@ var iran_asns_default = {
|
|
|
40354
40510
|
},
|
|
40355
40511
|
{
|
|
40356
40512
|
asn: "AS35285",
|
|
40357
|
-
name: "IRNIC
|
|
40513
|
+
name: "IRNIC - Institute for Research in Fundamental Sciences, IR"
|
|
40358
40514
|
},
|
|
40359
40515
|
{
|
|
40360
40516
|
asn: "AS35615",
|
|
40361
|
-
name: "MEB
|
|
40517
|
+
name: "MEB - Middle East Bank (PJSC), IR"
|
|
40362
40518
|
},
|
|
40363
40519
|
{
|
|
40364
40520
|
asn: "AS35690",
|
|
40365
|
-
name: "IRANINSURANCE
|
|
40521
|
+
name: "IRANINSURANCE - IRAN INSURANCE JOINT STOCK COMPANY, IR"
|
|
40366
40522
|
},
|
|
40367
40523
|
{
|
|
40368
40524
|
asn: "AS35766",
|
|
@@ -40374,11 +40530,11 @@ var iran_asns_default = {
|
|
|
40374
40530
|
},
|
|
40375
40531
|
{
|
|
40376
40532
|
asn: "AS39200",
|
|
40377
|
-
name: "IRNICAnyCAST
|
|
40533
|
+
name: "IRNICAnyCAST - Institute for Research in Fundamental Sciences, IR"
|
|
40378
40534
|
},
|
|
40379
40535
|
{
|
|
40380
40536
|
asn: "AS39308",
|
|
40381
|
-
name: "ASK
|
|
40537
|
+
name: "ASK - ANDISHE SABZ KHAZAR CO. P.J.S., IR"
|
|
40382
40538
|
},
|
|
40383
40539
|
{
|
|
40384
40540
|
asn: "AS39364",
|
|
@@ -40394,7 +40550,7 @@ var iran_asns_default = {
|
|
|
40394
40550
|
},
|
|
40395
40551
|
{
|
|
40396
40552
|
asn: "AS39571",
|
|
40397
|
-
name: "Sadad
|
|
40553
|
+
name: "Sadad - Sadad Informatics Corporation PJSC, IR"
|
|
40398
40554
|
},
|
|
40399
40555
|
{
|
|
40400
40556
|
asn: "AS39650",
|
|
@@ -40410,7 +40566,7 @@ var iran_asns_default = {
|
|
|
40410
40566
|
},
|
|
40411
40567
|
{
|
|
40412
40568
|
asn: "AS41620",
|
|
40413
|
-
name: "IUSTCC
|
|
40569
|
+
name: "IUSTCC - Iran University Of Science and Technology, IR"
|
|
40414
40570
|
},
|
|
40415
40571
|
{
|
|
40416
40572
|
asn: "AS41856",
|
|
@@ -40418,7 +40574,7 @@ var iran_asns_default = {
|
|
|
40418
40574
|
},
|
|
40419
40575
|
{
|
|
40420
40576
|
asn: "AS41881",
|
|
40421
|
-
name: "Fanava
|
|
40577
|
+
name: "Fanava - Fanava Group, IR"
|
|
40422
40578
|
},
|
|
40423
40579
|
{
|
|
40424
40580
|
asn: "AS42019",
|
|
@@ -40430,11 +40586,11 @@ var iran_asns_default = {
|
|
|
40430
40586
|
},
|
|
40431
40587
|
{
|
|
40432
40588
|
asn: "AS42337",
|
|
40433
|
-
name: "RESPINA
|
|
40589
|
+
name: "RESPINA - Respina Networks & Beyond PJSC, IR"
|
|
40434
40590
|
},
|
|
40435
40591
|
{
|
|
40436
40592
|
asn: "AS42440",
|
|
40437
|
-
name: "RDG
|
|
40593
|
+
name: "RDG - Rayaneh Danesh Golestan Complex P.J.S. Co., IR"
|
|
40438
40594
|
},
|
|
40439
40595
|
{
|
|
40440
40596
|
asn: "AS42468",
|
|
@@ -40442,7 +40598,7 @@ var iran_asns_default = {
|
|
|
40442
40598
|
},
|
|
40443
40599
|
{
|
|
40444
40600
|
asn: "AS42586",
|
|
40445
|
-
name: "IRIB
|
|
40601
|
+
name: "IRIB - IRIB (Islamic Republic of Iran Broadcasting), IR"
|
|
40446
40602
|
},
|
|
40447
40603
|
{
|
|
40448
40604
|
asn: "AS42750",
|
|
@@ -40450,7 +40606,7 @@ var iran_asns_default = {
|
|
|
40450
40606
|
},
|
|
40451
40607
|
{
|
|
40452
40608
|
asn: "AS42867",
|
|
40453
|
-
name: "NIOCI
|
|
40609
|
+
name: "NIOCI - National Iranian Oil Company PJSC, IR"
|
|
40454
40610
|
},
|
|
40455
40611
|
{
|
|
40456
40612
|
asn: "AS42907",
|
|
@@ -40458,7 +40614,7 @@ var iran_asns_default = {
|
|
|
40458
40614
|
},
|
|
40459
40615
|
{
|
|
40460
40616
|
asn: "AS42915",
|
|
40461
|
-
name: "SAPCO
|
|
40617
|
+
name: "SAPCO - Engeneering Designing and Supply the parts of Iran Khodro PJSC, IR"
|
|
40462
40618
|
},
|
|
40463
40619
|
{
|
|
40464
40620
|
asn: "AS42990",
|
|
@@ -40486,7 +40642,7 @@ var iran_asns_default = {
|
|
|
40486
40642
|
},
|
|
40487
40643
|
{
|
|
40488
40644
|
asn: "AS43415",
|
|
40489
|
-
name: "SITSCO
|
|
40645
|
+
name: "SITSCO - Secure Infrastructure of Transactional Services Company PJSC, IR"
|
|
40490
40646
|
},
|
|
40491
40647
|
{
|
|
40492
40648
|
asn: "AS43487",
|
|
@@ -40494,7 +40650,7 @@ var iran_asns_default = {
|
|
|
40494
40650
|
},
|
|
40495
40651
|
{
|
|
40496
40652
|
asn: "AS43510",
|
|
40497
|
-
name: "MEHVARMACHINE
|
|
40653
|
+
name: "MEHVARMACHINE - Mehvar Machine, IR"
|
|
40498
40654
|
},
|
|
40499
40655
|
{
|
|
40500
40656
|
asn: "AS43528",
|
|
@@ -40510,7 +40666,7 @@ var iran_asns_default = {
|
|
|
40510
40666
|
},
|
|
40511
40667
|
{
|
|
40512
40668
|
asn: "AS43965",
|
|
40513
|
-
name: "TUMS-IR
|
|
40669
|
+
name: "TUMS-IR - Tehran University of Medical Science, IR"
|
|
40514
40670
|
},
|
|
40515
40671
|
{
|
|
40516
40672
|
asn: "AS44045",
|
|
@@ -40518,7 +40674,7 @@ var iran_asns_default = {
|
|
|
40518
40674
|
},
|
|
40519
40675
|
{
|
|
40520
40676
|
asn: "AS44090",
|
|
40521
|
-
name: "MahanNet
|
|
40677
|
+
name: "MahanNet - Enteghal Dadeh Mahan Co. PJSC, IR"
|
|
40522
40678
|
},
|
|
40523
40679
|
{
|
|
40524
40680
|
asn: "AS44208",
|
|
@@ -40530,11 +40686,11 @@ var iran_asns_default = {
|
|
|
40530
40686
|
},
|
|
40531
40687
|
{
|
|
40532
40688
|
asn: "AS44244",
|
|
40533
|
-
name: "IranCell
|
|
40689
|
+
name: "IranCell - Iran Cell Service and Communication Company, IR"
|
|
40534
40690
|
},
|
|
40535
40691
|
{
|
|
40536
40692
|
asn: "AS44285",
|
|
40537
|
-
name: "SEFROYEKPARDAZENG
|
|
40693
|
+
name: "SEFROYEKPARDAZENG - Sefroyek Pardaz Engineering PJSC, IR"
|
|
40538
40694
|
},
|
|
40539
40695
|
{
|
|
40540
40696
|
asn: "AS44375",
|
|
@@ -40546,7 +40702,7 @@ var iran_asns_default = {
|
|
|
40546
40702
|
},
|
|
40547
40703
|
{
|
|
40548
40704
|
asn: "AS44410",
|
|
40549
|
-
name: "ENTEKHAB
|
|
40705
|
+
name: "ENTEKHAB - Towse'eh Sarmayeh Gozari Entekhab Group PJSC, IR"
|
|
40550
40706
|
},
|
|
40551
40707
|
{
|
|
40552
40708
|
asn: "AS44436",
|
|
@@ -40562,7 +40718,7 @@ var iran_asns_default = {
|
|
|
40562
40718
|
},
|
|
40563
40719
|
{
|
|
40564
40720
|
asn: "AS44889",
|
|
40565
|
-
name: "AZMA
|
|
40721
|
+
name: "AZMA - Farhang Azma Communications Company LTD, IR"
|
|
40566
40722
|
},
|
|
40567
40723
|
{
|
|
40568
40724
|
asn: "AS44932",
|
|
@@ -40578,7 +40734,7 @@ var iran_asns_default = {
|
|
|
40578
40734
|
},
|
|
40579
40735
|
{
|
|
40580
40736
|
asn: "AS47262",
|
|
40581
|
-
name: "HAMARA
|
|
40737
|
+
name: "HAMARA - Hamara System Tabriz Engineering Company, IR"
|
|
40582
40738
|
},
|
|
40583
40739
|
{
|
|
40584
40740
|
asn: "AS47308",
|
|
@@ -40586,7 +40742,7 @@ var iran_asns_default = {
|
|
|
40586
40742
|
},
|
|
40587
40743
|
{
|
|
40588
40744
|
asn: "AS47330",
|
|
40589
|
-
name: "Mobinnet
|
|
40745
|
+
name: "Mobinnet - Mobin Net Communication Company (Private Joint Stock), IR"
|
|
40590
40746
|
},
|
|
40591
40747
|
{
|
|
40592
40748
|
asn: "AS47376",
|
|
@@ -40598,7 +40754,7 @@ var iran_asns_default = {
|
|
|
40598
40754
|
},
|
|
40599
40755
|
{
|
|
40600
40756
|
asn: "AS47558",
|
|
40601
|
-
name: "kntu
|
|
40757
|
+
name: "kntu - Kajeh Nasir Toosi University of Technology, IR"
|
|
40602
40758
|
},
|
|
40603
40759
|
{
|
|
40604
40760
|
asn: "AS47603",
|
|
@@ -40606,15 +40762,15 @@ var iran_asns_default = {
|
|
|
40606
40762
|
},
|
|
40607
40763
|
{
|
|
40608
40764
|
asn: "AS47817",
|
|
40609
|
-
name: "PSRGD
|
|
40765
|
+
name: "PSRGD - Bank Pasargad PJSC, IR"
|
|
40610
40766
|
},
|
|
40611
40767
|
{
|
|
40612
40768
|
asn: "AS47843",
|
|
40613
|
-
name: "TANA
|
|
40769
|
+
name: "TANA - TOSE'EH ERTEBATAT NOVIN ARIA CO PJS, IR"
|
|
40614
40770
|
},
|
|
40615
40771
|
{
|
|
40616
40772
|
asn: "AS47981",
|
|
40617
|
-
name: "IUMS
|
|
40773
|
+
name: "IUMS - Iran University of Medical Sciences, IR"
|
|
40618
40774
|
},
|
|
40619
40775
|
{
|
|
40620
40776
|
asn: "AS48029",
|
|
@@ -40630,7 +40786,7 @@ var iran_asns_default = {
|
|
|
40630
40786
|
},
|
|
40631
40787
|
{
|
|
40632
40788
|
asn: "AS48159",
|
|
40633
|
-
name: "TIC
|
|
40789
|
+
name: "TIC - Telecommunication Infrastructure Company, IR"
|
|
40634
40790
|
},
|
|
40635
40791
|
{
|
|
40636
40792
|
asn: "AS48281",
|
|
@@ -40638,15 +40794,15 @@ var iran_asns_default = {
|
|
|
40638
40794
|
},
|
|
40639
40795
|
{
|
|
40640
40796
|
asn: "AS48289",
|
|
40641
|
-
name: "DSA
|
|
40797
|
+
name: "DSA - Dadeh Pardazan Sabz Alborz Co.(P.J.S.), IR"
|
|
40642
40798
|
},
|
|
40643
40799
|
{
|
|
40644
40800
|
asn: "AS48309",
|
|
40645
|
-
name: "AGS
|
|
40801
|
+
name: "AGS - Ariana Gostar Spadana (PJSC), IR"
|
|
40646
40802
|
},
|
|
40647
40803
|
{
|
|
40648
40804
|
asn: "AS48359",
|
|
40649
|
-
name: "Hesabgar
|
|
40805
|
+
name: "Hesabgar - Hesabgar Pardaz Gharb PJSC, IR"
|
|
40650
40806
|
},
|
|
40651
40807
|
{
|
|
40652
40808
|
asn: "AS48391",
|
|
@@ -40654,7 +40810,7 @@ var iran_asns_default = {
|
|
|
40654
40810
|
},
|
|
40655
40811
|
{
|
|
40656
40812
|
asn: "AS48431",
|
|
40657
|
-
name: "MAXNET
|
|
40813
|
+
name: "MAXNET - Bozorg Net-e Aria, IR"
|
|
40658
40814
|
},
|
|
40659
40815
|
{
|
|
40660
40816
|
asn: "AS48434",
|
|
@@ -40666,7 +40822,7 @@ var iran_asns_default = {
|
|
|
40666
40822
|
},
|
|
40667
40823
|
{
|
|
40668
40824
|
asn: "AS48555",
|
|
40669
|
-
name: "IRITCO
|
|
40825
|
+
name: "IRITCO - Iranian Information Technology PJSC, IR"
|
|
40670
40826
|
},
|
|
40671
40827
|
{
|
|
40672
40828
|
asn: "AS48601",
|
|
@@ -40674,15 +40830,15 @@ var iran_asns_default = {
|
|
|
40674
40830
|
},
|
|
40675
40831
|
{
|
|
40676
40832
|
asn: "AS48608",
|
|
40677
|
-
name: "Mellat
|
|
40833
|
+
name: "Mellat - Mellat Insurance Public Joint Stock Company, IR"
|
|
40678
40834
|
},
|
|
40679
40835
|
{
|
|
40680
40836
|
asn: "AS48715",
|
|
40681
|
-
name: "SEFROYEKPARDAZENG
|
|
40837
|
+
name: "SEFROYEKPARDAZENG - Sefroyek Pardaz Engineering PJSC, IR"
|
|
40682
40838
|
},
|
|
40683
40839
|
{
|
|
40684
40840
|
asn: "AS48762",
|
|
40685
|
-
name: "IAA
|
|
40841
|
+
name: "IAA - Iran Aseman Airlines PJSC, IR"
|
|
40686
40842
|
},
|
|
40687
40843
|
{
|
|
40688
40844
|
asn: "AS48898",
|
|
@@ -40706,15 +40862,15 @@ var iran_asns_default = {
|
|
|
40706
40862
|
},
|
|
40707
40863
|
{
|
|
40708
40864
|
asn: "AS49103",
|
|
40709
|
-
name: "IR-ASRETELECOM
|
|
40865
|
+
name: "IR-ASRETELECOM - Asr-e Enteghal-e Dadeha Company (Private J.S.), IR"
|
|
40710
40866
|
},
|
|
40711
40867
|
{
|
|
40712
40868
|
asn: "AS49148",
|
|
40713
|
-
name: "ADPDIGITAL
|
|
40869
|
+
name: "ADPDIGITAL - Atieh Dadeh Pardaz PJSC, IR"
|
|
40714
40870
|
},
|
|
40715
40871
|
{
|
|
40716
40872
|
asn: "AS49207",
|
|
40717
|
-
name: "SANGANCO
|
|
40873
|
+
name: "SANGANCO - Sangan Khorasan Steel Mineral Industry Company (JSC), IR"
|
|
40718
40874
|
},
|
|
40719
40875
|
{
|
|
40720
40876
|
asn: "AS49228",
|
|
@@ -40726,7 +40882,7 @@ var iran_asns_default = {
|
|
|
40726
40882
|
},
|
|
40727
40883
|
{
|
|
40728
40884
|
asn: "AS49433",
|
|
40729
|
-
name: "RFB
|
|
40885
|
+
name: "RFB - Bank Refah Kargaran, IR"
|
|
40730
40886
|
},
|
|
40731
40887
|
{
|
|
40732
40888
|
asn: "AS49556",
|
|
@@ -40738,7 +40894,7 @@ var iran_asns_default = {
|
|
|
40738
40894
|
},
|
|
40739
40895
|
{
|
|
40740
40896
|
asn: "AS49666",
|
|
40741
|
-
name: "TIC-GW
|
|
40897
|
+
name: "TIC-GW - Telecommunication Infrastructure Company, IR"
|
|
40742
40898
|
},
|
|
40743
40899
|
{
|
|
40744
40900
|
asn: "AS49680",
|
|
@@ -40754,7 +40910,7 @@ var iran_asns_default = {
|
|
|
40754
40910
|
},
|
|
40755
40911
|
{
|
|
40756
40912
|
asn: "AS49847",
|
|
40757
|
-
name: "RAYAZMA
|
|
40913
|
+
name: "RAYAZMA - Pardazeshgar Ray Azma Co. Ltd., IR"
|
|
40758
40914
|
},
|
|
40759
40915
|
{
|
|
40760
40916
|
asn: "AS49972",
|
|
@@ -40782,15 +40938,15 @@ var iran_asns_default = {
|
|
|
40782
40938
|
},
|
|
40783
40939
|
{
|
|
40784
40940
|
asn: "AS50558",
|
|
40785
|
-
name: "SYSTEC
|
|
40941
|
+
name: "SYSTEC - Rayaneh Pardazan Baran Co. Ltd., IR"
|
|
40786
40942
|
},
|
|
40787
40943
|
{
|
|
40788
40944
|
asn: "AS50692",
|
|
40789
|
-
name: "IKCO
|
|
40945
|
+
name: "IKCO - Iran Khodro Co. P.J.S., IR"
|
|
40790
40946
|
},
|
|
40791
40947
|
{
|
|
40792
40948
|
asn: "AS50733",
|
|
40793
|
-
name: "Bina
|
|
40949
|
+
name: "Bina - Ertebat Gostaran Bina PJSC, IR"
|
|
40794
40950
|
},
|
|
40795
40951
|
{
|
|
40796
40952
|
asn: "AS50749",
|
|
@@ -40802,11 +40958,11 @@ var iran_asns_default = {
|
|
|
40802
40958
|
},
|
|
40803
40959
|
{
|
|
40804
40960
|
asn: "AS50810",
|
|
40805
|
-
name: "Mobinnet
|
|
40961
|
+
name: "Mobinnet - Mobin Net Communication Company (Private Joint Stock), IR"
|
|
40806
40962
|
},
|
|
40807
40963
|
{
|
|
40808
40964
|
asn: "AS50855",
|
|
40809
|
-
name: "rqbank
|
|
40965
|
+
name: "rqbank - Resalat Interest-free loaning Bank PJS, IR"
|
|
40810
40966
|
},
|
|
40811
40967
|
{
|
|
40812
40968
|
asn: "AS51026",
|
|
@@ -40818,7 +40974,7 @@ var iran_asns_default = {
|
|
|
40818
40974
|
},
|
|
40819
40975
|
{
|
|
40820
40976
|
asn: "AS51235",
|
|
40821
|
-
name: "ADG
|
|
40977
|
+
name: "ADG - ARAAX DADEH GOSTAR information and communication Development Co (Private Joint Stock), IR"
|
|
40822
40978
|
},
|
|
40823
40979
|
{
|
|
40824
40980
|
asn: "AS51241",
|
|
@@ -40838,7 +40994,7 @@ var iran_asns_default = {
|
|
|
40838
40994
|
},
|
|
40839
40995
|
{
|
|
40840
40996
|
asn: "AS51431",
|
|
40841
|
-
name: "IR-AVABARID
|
|
40997
|
+
name: "IR-AVABARID - Rasaneh Avabarid Private Joint Stock Company, IR"
|
|
40842
40998
|
},
|
|
40843
40999
|
{
|
|
40844
41000
|
asn: "AS51433",
|
|
@@ -40862,19 +41018,19 @@ var iran_asns_default = {
|
|
|
40862
41018
|
},
|
|
40863
41019
|
{
|
|
40864
41020
|
asn: "AS51732",
|
|
40865
|
-
name: "MAPNA
|
|
41021
|
+
name: "MAPNA - MAPNA Power Plants Development & Construction PLC, IR"
|
|
40866
41022
|
},
|
|
40867
41023
|
{
|
|
40868
41024
|
asn: "AS51777",
|
|
40869
|
-
name: "ALBORZ
|
|
41025
|
+
name: "ALBORZ - Alborz Insurance Company, IR"
|
|
40870
41026
|
},
|
|
40871
41027
|
{
|
|
40872
41028
|
asn: "AS51785",
|
|
40873
|
-
name: "Karafarin
|
|
41029
|
+
name: "Karafarin - Karafarin Bank Plc., IR"
|
|
40874
41030
|
},
|
|
40875
41031
|
{
|
|
40876
41032
|
asn: "AS51889",
|
|
40877
|
-
name: "GPDN
|
|
41033
|
+
name: "GPDN - Gostaresh Pardazesh Dana Negar Co.(PJSC), IR"
|
|
40878
41034
|
},
|
|
40879
41035
|
{
|
|
40880
41036
|
asn: "AS52049",
|
|
@@ -40886,7 +41042,7 @@ var iran_asns_default = {
|
|
|
40886
41042
|
},
|
|
40887
41043
|
{
|
|
40888
41044
|
asn: "AS52140",
|
|
40889
|
-
name: "UNHCR-IR
|
|
41045
|
+
name: "UNHCR-IR - United Nations High Commissioner for Refugees, IR"
|
|
40890
41046
|
},
|
|
40891
41047
|
{
|
|
40892
41048
|
asn: "AS52155",
|
|
@@ -40894,7 +41050,7 @@ var iran_asns_default = {
|
|
|
40894
41050
|
},
|
|
40895
41051
|
{
|
|
40896
41052
|
asn: "AS52196",
|
|
40897
|
-
name: "TREC
|
|
41053
|
+
name: "TREC - Tehran Regional Electricity Joint Stock Company, IR"
|
|
40898
41054
|
},
|
|
40899
41055
|
{
|
|
40900
41056
|
asn: "AS52209",
|
|
@@ -40906,7 +41062,7 @@ var iran_asns_default = {
|
|
|
40906
41062
|
},
|
|
40907
41063
|
{
|
|
40908
41064
|
asn: "AS56402",
|
|
40909
|
-
name: "DADEHGOSTAR
|
|
41065
|
+
name: "DADEHGOSTAR - Dadeh Gostar Asr Novin P.J.S. Co., IR"
|
|
40910
41066
|
},
|
|
40911
41067
|
{
|
|
40912
41068
|
asn: "AS56461",
|
|
@@ -40922,11 +41078,11 @@ var iran_asns_default = {
|
|
|
40922
41078
|
},
|
|
40923
41079
|
{
|
|
40924
41080
|
asn: "AS56503",
|
|
40925
|
-
name: 'BADR
|
|
41081
|
+
name: 'BADR - PJSC "Badr Rayan Jonoob", IR'
|
|
40926
41082
|
},
|
|
40927
41083
|
{
|
|
40928
41084
|
asn: "AS56547",
|
|
40929
|
-
name: "TMUNICIPALITY
|
|
41085
|
+
name: "TMUNICIPALITY - Tehran Municipality ICT Organization, IR"
|
|
40930
41086
|
},
|
|
40931
41087
|
{
|
|
40932
41088
|
asn: "AS56548",
|
|
@@ -40934,7 +41090,7 @@ var iran_asns_default = {
|
|
|
40934
41090
|
},
|
|
40935
41091
|
{
|
|
40936
41092
|
asn: "AS56616",
|
|
40937
|
-
name: "Sharif
|
|
41093
|
+
name: "Sharif - Tarahan Shabake Sharif LTD, IR"
|
|
40938
41094
|
},
|
|
40939
41095
|
{
|
|
40940
41096
|
asn: "AS56632",
|
|
@@ -40950,7 +41106,7 @@ var iran_asns_default = {
|
|
|
40950
41106
|
},
|
|
40951
41107
|
{
|
|
40952
41108
|
asn: "AS56765",
|
|
40953
|
-
name: "SBU
|
|
41109
|
+
name: "SBU - Shahid Beheshti university, IR"
|
|
40954
41110
|
},
|
|
40955
41111
|
{
|
|
40956
41112
|
asn: "AS57027",
|
|
@@ -40958,7 +41114,7 @@ var iran_asns_default = {
|
|
|
40958
41114
|
},
|
|
40959
41115
|
{
|
|
40960
41116
|
asn: "AS57067",
|
|
40961
|
-
name: "IRDC
|
|
41117
|
+
name: "IRDC - KEYANA Information Technology Co. Ltd., IR"
|
|
40962
41118
|
},
|
|
40963
41119
|
{
|
|
40964
41120
|
asn: "AS57218",
|
|
@@ -40966,7 +41122,7 @@ var iran_asns_default = {
|
|
|
40966
41122
|
},
|
|
40967
41123
|
{
|
|
40968
41124
|
asn: "AS57230",
|
|
40969
|
-
name: "Ariawebco
|
|
41125
|
+
name: "Ariawebco - Aria Web Development LLC, IR"
|
|
40970
41126
|
},
|
|
40971
41127
|
{
|
|
40972
41128
|
asn: "AS57235",
|
|
@@ -41006,7 +41162,7 @@ var iran_asns_default = {
|
|
|
41006
41162
|
},
|
|
41007
41163
|
{
|
|
41008
41164
|
asn: "AS57574",
|
|
41009
|
-
name: "AGRIBANK
|
|
41165
|
+
name: "AGRIBANK - Agriculture Bank PJSC, IR"
|
|
41010
41166
|
},
|
|
41011
41167
|
{
|
|
41012
41168
|
asn: "AS57577",
|
|
@@ -41038,7 +41194,7 @@ var iran_asns_default = {
|
|
|
41038
41194
|
},
|
|
41039
41195
|
{
|
|
41040
41196
|
asn: "AS58053",
|
|
41041
|
-
name: "TAMIKCO
|
|
41197
|
+
name: "TAMIKCO - Tam Iran Khodro Company, IR"
|
|
41042
41198
|
},
|
|
41043
41199
|
{
|
|
41044
41200
|
asn: "AS58080",
|
|
@@ -41058,7 +41214,7 @@ var iran_asns_default = {
|
|
|
41058
41214
|
},
|
|
41059
41215
|
{
|
|
41060
41216
|
asn: "AS58169",
|
|
41061
|
-
name: "IGMC
|
|
41217
|
+
name: "IGMC - Iran Grid Management Company (IGMC), IR"
|
|
41062
41218
|
},
|
|
41063
41219
|
{
|
|
41064
41220
|
asn: "AS58192",
|
|
@@ -41090,7 +41246,7 @@ var iran_asns_default = {
|
|
|
41090
41246
|
},
|
|
41091
41247
|
{
|
|
41092
41248
|
asn: "AS58333",
|
|
41093
|
-
name: "SamanInsurance
|
|
41249
|
+
name: "SamanInsurance - Saman Insurance Co. (Public Joint Stock), IR"
|
|
41094
41250
|
},
|
|
41095
41251
|
{
|
|
41096
41252
|
asn: "AS59431",
|
|
@@ -41106,7 +41262,7 @@ var iran_asns_default = {
|
|
|
41106
41262
|
},
|
|
41107
41263
|
{
|
|
41108
41264
|
asn: "AS59501",
|
|
41109
|
-
name: "RahbordHooshmand-Shahr
|
|
41265
|
+
name: "RahbordHooshmand-Shahr - Rahbord Houshmand Shahr PJSC, IR"
|
|
41110
41266
|
},
|
|
41111
41267
|
{
|
|
41112
41268
|
asn: "AS59506",
|
|
@@ -41142,7 +41298,7 @@ var iran_asns_default = {
|
|
|
41142
41298
|
},
|
|
41143
41299
|
{
|
|
41144
41300
|
asn: "AS59708",
|
|
41145
|
-
name: "Rayanhamafza
|
|
41301
|
+
name: "Rayanhamafza - Rayan Hamafza Company Public Joint Stock, IR"
|
|
41146
41302
|
},
|
|
41147
41303
|
{
|
|
41148
41304
|
asn: "AS59754",
|
|
@@ -41150,7 +41306,7 @@ var iran_asns_default = {
|
|
|
41150
41306
|
},
|
|
41151
41307
|
{
|
|
41152
41308
|
asn: "AS59757",
|
|
41153
|
-
name: "Sarmadins
|
|
41309
|
+
name: "Sarmadins - Sarmad Insurance PJSC, IR"
|
|
41154
41310
|
},
|
|
41155
41311
|
{
|
|
41156
41312
|
asn: "AS59794",
|
|
@@ -41158,11 +41314,11 @@ var iran_asns_default = {
|
|
|
41158
41314
|
},
|
|
41159
41315
|
{
|
|
41160
41316
|
asn: "AS59797",
|
|
41161
|
-
name: "IPMI
|
|
41317
|
+
name: "IPMI - Industrial Projects Management Company (P.J.S) of Iran, IR"
|
|
41162
41318
|
},
|
|
41163
41319
|
{
|
|
41164
41320
|
asn: "AS59838",
|
|
41165
|
-
name: "NAK
|
|
41321
|
+
name: "NAK - Naghsh Awal Keyfiat PJSC, IR"
|
|
41166
41322
|
},
|
|
41167
41323
|
{
|
|
41168
41324
|
asn: "AS59882",
|
|
@@ -41170,15 +41326,15 @@ var iran_asns_default = {
|
|
|
41170
41326
|
},
|
|
41171
41327
|
{
|
|
41172
41328
|
asn: "AS59884",
|
|
41173
|
-
name: "PTC
|
|
41329
|
+
name: "PTC - PERSIA TELECOM COMPANY, IR"
|
|
41174
41330
|
},
|
|
41175
41331
|
{
|
|
41176
41332
|
asn: "AS59912",
|
|
41177
|
-
name: "ZNU
|
|
41333
|
+
name: "ZNU - University of Zanjan, IR"
|
|
41178
41334
|
},
|
|
41179
41335
|
{
|
|
41180
41336
|
asn: "AS59961",
|
|
41181
|
-
name: "RMTO
|
|
41337
|
+
name: "RMTO - Road Maintenance & Transportation Organization, IR"
|
|
41182
41338
|
},
|
|
41183
41339
|
{
|
|
41184
41340
|
asn: "AS59962",
|
|
@@ -41198,7 +41354,7 @@ var iran_asns_default = {
|
|
|
41198
41354
|
},
|
|
41199
41355
|
{
|
|
41200
41356
|
asn: "AS60148",
|
|
41201
|
-
name: "ITO
|
|
41357
|
+
name: "ITO - Iran Information Technology Company PJSC, IR"
|
|
41202
41358
|
},
|
|
41203
41359
|
{
|
|
41204
41360
|
asn: "AS60178",
|
|
@@ -41218,7 +41374,7 @@ var iran_asns_default = {
|
|
|
41218
41374
|
},
|
|
41219
41375
|
{
|
|
41220
41376
|
asn: "AS60340",
|
|
41221
|
-
name: "saipa
|
|
41377
|
+
name: "saipa - Iranian company of Saipa automobile manufacturing Public Joint Stock, IR"
|
|
41222
41378
|
},
|
|
41223
41379
|
{
|
|
41224
41380
|
asn: "AS60374",
|
|
@@ -41226,7 +41382,7 @@ var iran_asns_default = {
|
|
|
41226
41382
|
},
|
|
41227
41383
|
{
|
|
41228
41384
|
asn: "AS60407",
|
|
41229
|
-
name: "TOURISMBANK
|
|
41385
|
+
name: "TOURISMBANK - Tourism Bank (Public Joint Stock), IR"
|
|
41230
41386
|
},
|
|
41231
41387
|
{
|
|
41232
41388
|
asn: "AS60423",
|
|
@@ -41234,11 +41390,11 @@ var iran_asns_default = {
|
|
|
41234
41390
|
},
|
|
41235
41391
|
{
|
|
41236
41392
|
asn: "AS60516",
|
|
41237
|
-
name: "GHAVAMIN
|
|
41393
|
+
name: "GHAVAMIN - Bank Ghavamin (Public Joint Stock), IR"
|
|
41238
41394
|
},
|
|
41239
41395
|
{
|
|
41240
41396
|
asn: "AS60562",
|
|
41241
|
-
name: "FAS
|
|
41397
|
+
name: "FAS - Ministry Of Health and Medical Education, IR"
|
|
41242
41398
|
},
|
|
41243
41399
|
{
|
|
41244
41400
|
asn: "AS60577",
|
|
@@ -41250,7 +41406,7 @@ var iran_asns_default = {
|
|
|
41250
41406
|
},
|
|
41251
41407
|
{
|
|
41252
41408
|
asn: "AS60627",
|
|
41253
|
-
name: "RA
|
|
41409
|
+
name: "RA - Rayankadeh Apadana Company Ltd, IR"
|
|
41254
41410
|
},
|
|
41255
41411
|
{
|
|
41256
41412
|
asn: "AS60631",
|
|
@@ -41270,11 +41426,11 @@ var iran_asns_default = {
|
|
|
41270
41426
|
},
|
|
41271
41427
|
{
|
|
41272
41428
|
asn: "AS60811",
|
|
41273
|
-
name: "SaipaYadak
|
|
41429
|
+
name: "SaipaYadak - Saipa Yadak Co. PLC, IR"
|
|
41274
41430
|
},
|
|
41275
41431
|
{
|
|
41276
41432
|
asn: "AS60887",
|
|
41277
|
-
name: "IRISA
|
|
41433
|
+
name: "IRISA - International Systems Engineering & Automation Company PJS, IR"
|
|
41278
41434
|
},
|
|
41279
41435
|
{
|
|
41280
41436
|
asn: "AS60976",
|
|
@@ -41282,11 +41438,11 @@ var iran_asns_default = {
|
|
|
41282
41438
|
},
|
|
41283
41439
|
{
|
|
41284
41440
|
asn: "AS61036",
|
|
41285
|
-
name: "FanavaDP
|
|
41441
|
+
name: "FanavaDP - Fanava Group, IR"
|
|
41286
41442
|
},
|
|
41287
41443
|
{
|
|
41288
41444
|
asn: "AS61055",
|
|
41289
|
-
name: "IranHOST
|
|
41445
|
+
name: "IranHOST - Roshangar Rayaneh Tehran Co. Ltd., IR"
|
|
41290
41446
|
},
|
|
41291
41447
|
{
|
|
41292
41448
|
asn: "AS61061",
|
|
@@ -41298,23 +41454,23 @@ var iran_asns_default = {
|
|
|
41298
41454
|
},
|
|
41299
41455
|
{
|
|
41300
41456
|
asn: "AS61173",
|
|
41301
|
-
name: "GWSN
|
|
41457
|
+
name: "GWSN - Green Web Samaneh Novin PJSC, IR"
|
|
41302
41458
|
},
|
|
41303
41459
|
{
|
|
41304
41460
|
asn: "AS61176",
|
|
41305
|
-
name: "CDI
|
|
41461
|
+
name: "CDI - City Development and Innovation PJSC, IR"
|
|
41306
41462
|
},
|
|
41307
41463
|
{
|
|
41308
41464
|
asn: "AS61209",
|
|
41309
|
-
name: "USB
|
|
41465
|
+
name: "USB - University of Sistan and Baluchestan, IR"
|
|
41310
41466
|
},
|
|
41311
41467
|
{
|
|
41312
41468
|
asn: "AS61239",
|
|
41313
|
-
name: "NRDC
|
|
41469
|
+
name: "NRDC - Naji Research & Development Company Private Join-Stock, IR"
|
|
41314
41470
|
},
|
|
41315
41471
|
{
|
|
41316
41472
|
asn: "AS61246",
|
|
41317
|
-
name: "IRIMO
|
|
41473
|
+
name: "IRIMO - IRAN METEOROLOGICAL ORGANIZATION, IR"
|
|
41318
41474
|
},
|
|
41319
41475
|
{
|
|
41320
41476
|
asn: "AS61248",
|
|
@@ -41330,7 +41486,7 @@ var iran_asns_default = {
|
|
|
41330
41486
|
},
|
|
41331
41487
|
{
|
|
41332
41488
|
asn: "AS61386",
|
|
41333
|
-
name: "TASNIM
|
|
41489
|
+
name: "TASNIM - Ati Sazan Farhang Tasnim Intitute, IR"
|
|
41334
41490
|
},
|
|
41335
41491
|
{
|
|
41336
41492
|
asn: "AS61962",
|
|
@@ -41338,7 +41494,7 @@ var iran_asns_default = {
|
|
|
41338
41494
|
},
|
|
41339
41495
|
{
|
|
41340
41496
|
asn: "AS62039",
|
|
41341
|
-
name: "Mapna
|
|
41497
|
+
name: "Mapna - Iran Power Plant Projects Management (MAPNA) PJS, IR"
|
|
41342
41498
|
},
|
|
41343
41499
|
{
|
|
41344
41500
|
asn: "AS62048",
|
|
@@ -41362,7 +41518,7 @@ var iran_asns_default = {
|
|
|
41362
41518
|
},
|
|
41363
41519
|
{
|
|
41364
41520
|
asn: "AS62198",
|
|
41365
|
-
name: "ACFC
|
|
41521
|
+
name: "ACFC - Melal Credit Company (Public Joint Stock), IR"
|
|
41366
41522
|
},
|
|
41367
41523
|
{
|
|
41368
41524
|
asn: "AS62229",
|
|
@@ -41378,11 +41534,11 @@ var iran_asns_default = {
|
|
|
41378
41534
|
},
|
|
41379
41535
|
{
|
|
41380
41536
|
asn: "AS62265",
|
|
41381
|
-
name: "Mahan-Air
|
|
41537
|
+
name: "Mahan-Air - Mahan Air PJSC, IR"
|
|
41382
41538
|
},
|
|
41383
41539
|
{
|
|
41384
41540
|
asn: "AS62318",
|
|
41385
|
-
name: "Bimeh-Ma
|
|
41541
|
+
name: "Bimeh-Ma - Bimeh Ma PJSC, IR"
|
|
41386
41542
|
},
|
|
41387
41543
|
{
|
|
41388
41544
|
asn: "AS62334",
|
|
@@ -41390,7 +41546,7 @@ var iran_asns_default = {
|
|
|
41390
41546
|
},
|
|
41391
41547
|
{
|
|
41392
41548
|
asn: "AS62367",
|
|
41393
|
-
name: "PNA
|
|
41549
|
+
name: "PNA - Pardakht Nowin Arian PJSC, IR"
|
|
41394
41550
|
},
|
|
41395
41551
|
{
|
|
41396
41552
|
asn: "AS62442",
|
|
@@ -41402,7 +41558,7 @@ var iran_asns_default = {
|
|
|
41402
41558
|
},
|
|
41403
41559
|
{
|
|
41404
41560
|
asn: "AS64422",
|
|
41405
|
-
name: "SIMRA
|
|
41561
|
+
name: "SIMRA - SIMA RAYAN SHARIF COMPANY (LTD.), IR"
|
|
41406
41562
|
},
|
|
41407
41563
|
{
|
|
41408
41564
|
asn: "AS64434",
|
|
@@ -41414,7 +41570,7 @@ var iran_asns_default = {
|
|
|
41414
41570
|
},
|
|
41415
41571
|
{
|
|
41416
41572
|
asn: "AS197207",
|
|
41417
|
-
name: "MCCI
|
|
41573
|
+
name: "MCCI - Mobile Communication Company of Iran PLC, IR"
|
|
41418
41574
|
},
|
|
41419
41575
|
{
|
|
41420
41576
|
asn: "AS197330",
|
|
@@ -41446,7 +41602,7 @@ var iran_asns_default = {
|
|
|
41446
41602
|
},
|
|
41447
41603
|
{
|
|
41448
41604
|
asn: "AS198569",
|
|
41449
|
-
name: "Rahanet
|
|
41605
|
+
name: "Rahanet - Rahanet Zanjan Co. (Private Joint-Stock), IR"
|
|
41450
41606
|
},
|
|
41451
41607
|
{
|
|
41452
41608
|
asn: "AS198926",
|
|
@@ -41486,7 +41642,7 @@ var iran_asns_default = {
|
|
|
41486
41642
|
},
|
|
41487
41643
|
{
|
|
41488
41644
|
asn: "AS200370",
|
|
41489
|
-
name: "FPCC
|
|
41645
|
+
name: "FPCC - Farzanegan Pars Communications Company PJS, IR"
|
|
41490
41646
|
},
|
|
41491
41647
|
{
|
|
41492
41648
|
asn: "AS200376",
|
|
@@ -41502,7 +41658,7 @@ var iran_asns_default = {
|
|
|
41502
41658
|
},
|
|
41503
41659
|
{
|
|
41504
41660
|
asn: "AS200554",
|
|
41505
|
-
name: "KimiaCloud
|
|
41661
|
+
name: "KimiaCloud - Dade Pardaz Kimia Pouyesh PJS., IR"
|
|
41506
41662
|
},
|
|
41507
41663
|
{
|
|
41508
41664
|
asn: "AS200645",
|
|
@@ -41510,7 +41666,7 @@ var iran_asns_default = {
|
|
|
41510
41666
|
},
|
|
41511
41667
|
{
|
|
41512
41668
|
asn: "AS200796",
|
|
41513
|
-
name: "DPA
|
|
41669
|
+
name: "DPA - Data Pardaz Afraz Private Joint Stock Company, IR"
|
|
41514
41670
|
},
|
|
41515
41671
|
{
|
|
41516
41672
|
asn: "AS200816",
|
|
@@ -41566,7 +41722,7 @@ var iran_asns_default = {
|
|
|
41566
41722
|
},
|
|
41567
41723
|
{
|
|
41568
41724
|
asn: "AS201871",
|
|
41569
|
-
name: "TIC
|
|
41725
|
+
name: "TIC - Tehran Internet Co., IR"
|
|
41570
41726
|
},
|
|
41571
41727
|
{
|
|
41572
41728
|
asn: "AS201999",
|
|
@@ -41586,11 +41742,11 @@ var iran_asns_default = {
|
|
|
41586
41742
|
},
|
|
41587
41743
|
{
|
|
41588
41744
|
asn: "AS202468",
|
|
41589
|
-
name: "AbrArvan
|
|
41745
|
+
name: "AbrArvan - Noyan Abr Arvan Co. ( Private Joint Stock), IR"
|
|
41590
41746
|
},
|
|
41591
41747
|
{
|
|
41592
41748
|
asn: "AS202571",
|
|
41593
|
-
name: "kharazmi
|
|
41749
|
+
name: "kharazmi - Kharazmi University, IR"
|
|
41594
41750
|
},
|
|
41595
41751
|
{
|
|
41596
41752
|
asn: "AS202601",
|
|
@@ -41642,7 +41798,7 @@ var iran_asns_default = {
|
|
|
41642
41798
|
},
|
|
41643
41799
|
{
|
|
41644
41800
|
asn: "AS203558",
|
|
41645
|
-
name: "Fanap-DC
|
|
41801
|
+
name: "Fanap-DC - Tose'h Fanavari Ertebabat Pasargad Arian Co. PJS, IR"
|
|
41646
41802
|
},
|
|
41647
41803
|
{
|
|
41648
41804
|
asn: "AS203616",
|
|
@@ -41690,7 +41846,7 @@ var iran_asns_default = {
|
|
|
41690
41846
|
},
|
|
41691
41847
|
{
|
|
41692
41848
|
asn: "AS204105",
|
|
41693
|
-
name: "Payabastar
|
|
41849
|
+
name: "Payabastar - Paya Bastar Arina Co. Private J.S., IR"
|
|
41694
41850
|
},
|
|
41695
41851
|
{
|
|
41696
41852
|
asn: "AS204203",
|
|
@@ -41734,7 +41890,7 @@ var iran_asns_default = {
|
|
|
41734
41890
|
},
|
|
41735
41891
|
{
|
|
41736
41892
|
asn: "AS204812",
|
|
41737
|
-
name: "ParsTamin
|
|
41893
|
+
name: "ParsTamin - Pars Tamin Navid Company (Private Joint-Stock), IR"
|
|
41738
41894
|
},
|
|
41739
41895
|
{
|
|
41740
41896
|
asn: "AS204813",
|
|
@@ -41798,7 +41954,7 @@ var iran_asns_default = {
|
|
|
41798
41954
|
},
|
|
41799
41955
|
{
|
|
41800
41956
|
asn: "AS205550",
|
|
41801
|
-
name: "TCEC
|
|
41957
|
+
name: "TCEC - Tejarat Iranian Technology infrastructure PJSC, IR"
|
|
41802
41958
|
},
|
|
41803
41959
|
{
|
|
41804
41960
|
asn: "AS205560",
|
|
@@ -41830,7 +41986,7 @@ var iran_asns_default = {
|
|
|
41830
41986
|
},
|
|
41831
41987
|
{
|
|
41832
41988
|
asn: "AS205837",
|
|
41833
|
-
name: "SADADPSP
|
|
41989
|
+
name: "SADADPSP - Sadad Electronic Payment Company P.J.S., IR"
|
|
41834
41990
|
},
|
|
41835
41991
|
{
|
|
41836
41992
|
asn: "AS205883",
|
|
@@ -41838,7 +41994,7 @@ var iran_asns_default = {
|
|
|
41838
41994
|
},
|
|
41839
41995
|
{
|
|
41840
41996
|
asn: "AS205894",
|
|
41841
|
-
name: "EDBI
|
|
41997
|
+
name: "EDBI - Export Development Bank of Iran - Public Joint Stock, IR"
|
|
41842
41998
|
},
|
|
41843
41999
|
{
|
|
41844
42000
|
asn: "AS205899",
|
|
@@ -41990,7 +42146,7 @@ var iran_asns_default = {
|
|
|
41990
42146
|
},
|
|
41991
42147
|
{
|
|
41992
42148
|
asn: "AS208896",
|
|
41993
|
-
name: "IR-ADA
|
|
42149
|
+
name: "IR-ADA - Asr-e Danesh Afzar Company (Private J.S.), IR"
|
|
41994
42150
|
},
|
|
41995
42151
|
{
|
|
41996
42152
|
asn: "AS209079",
|
|
@@ -41998,11 +42154,11 @@ var iran_asns_default = {
|
|
|
41998
42154
|
},
|
|
41999
42155
|
{
|
|
42000
42156
|
asn: "AS209279",
|
|
42001
|
-
name: "POSHTVAR
|
|
42157
|
+
name: "POSHTVAR - Padideh Sazan Poshtvar Co. PJS, IR"
|
|
42002
42158
|
},
|
|
42003
42159
|
{
|
|
42004
42160
|
asn: "AS209462",
|
|
42005
|
-
name: "hosco
|
|
42161
|
+
name: "hosco - South Hormozgan Steel PJSC, IR"
|
|
42006
42162
|
},
|
|
42007
42163
|
{
|
|
42008
42164
|
asn: "AS209596",
|
|
@@ -42026,7 +42182,7 @@ var iran_asns_default = {
|
|
|
42026
42182
|
},
|
|
42027
42183
|
{
|
|
42028
42184
|
asn: "AS210392",
|
|
42029
|
-
name: "AriaOxin
|
|
42185
|
+
name: "AriaOxin - Azarakhsh Ava-e Ahvaz Co, IR"
|
|
42030
42186
|
},
|
|
42031
42187
|
{
|
|
42032
42188
|
asn: "AS210405",
|
|
@@ -42046,7 +42202,7 @@ var iran_asns_default = {
|
|
|
42046
42202
|
},
|
|
42047
42203
|
{
|
|
42048
42204
|
asn: "AS210583",
|
|
42049
|
-
name: "KHATAMUNI
|
|
42205
|
+
name: "KHATAMUNI - Khatam Academic Institute, IR"
|
|
42050
42206
|
},
|
|
42051
42207
|
{
|
|
42052
42208
|
asn: "AS210603",
|
|
@@ -42118,7 +42274,7 @@ var iran_asns_default = {
|
|
|
42118
42274
|
},
|
|
42119
42275
|
{
|
|
42120
42276
|
asn: "AS211670",
|
|
42121
|
-
name: "FASA
|
|
42277
|
+
name: "FASA - Fasa University, IR"
|
|
42122
42278
|
},
|
|
42123
42279
|
{
|
|
42124
42280
|
asn: "AS211703",
|
|
@@ -42126,7 +42282,7 @@ var iran_asns_default = {
|
|
|
42126
42282
|
},
|
|
42127
42283
|
{
|
|
42128
42284
|
asn: "AS211705",
|
|
42129
|
-
name: "IEC
|
|
42285
|
+
name: "IEC - Iranian Electronic Counter Anzali Free Zone(Private Joint Stock Company), IR"
|
|
42130
42286
|
},
|
|
42131
42287
|
{
|
|
42132
42288
|
asn: "AS211881",
|
|
@@ -42154,7 +42310,7 @@ var iran_asns_default = {
|
|
|
42154
42310
|
},
|
|
42155
42311
|
{
|
|
42156
42312
|
asn: "AS212080",
|
|
42157
|
-
name: "NEGIN
|
|
42313
|
+
name: "NEGIN - Karafarini va FANAVARIHAYEH Novin Negin Pars Co PJS, IR"
|
|
42158
42314
|
},
|
|
42159
42315
|
{
|
|
42160
42316
|
asn: "AS212161",
|
|
@@ -42182,11 +42338,11 @@ var iran_asns_default = {
|
|
|
42182
42338
|
},
|
|
42183
42339
|
{
|
|
42184
42340
|
asn: "AS212355",
|
|
42185
|
-
name: "Emdadkhodro-Iran
|
|
42341
|
+
name: "Emdadkhodro-Iran - Emdadkhodro Iran, IR"
|
|
42186
42342
|
},
|
|
42187
42343
|
{
|
|
42188
42344
|
asn: "AS212476",
|
|
42189
|
-
name: "SepehrPayment
|
|
42345
|
+
name: "SepehrPayment - Barmak Khotvaneh, IR"
|
|
42190
42346
|
},
|
|
42191
42347
|
{
|
|
42192
42348
|
asn: "AS212544",
|
|
@@ -42194,7 +42350,7 @@ var iran_asns_default = {
|
|
|
42194
42350
|
},
|
|
42195
42351
|
{
|
|
42196
42352
|
asn: "AS212607",
|
|
42197
|
-
name: "POUYANIT
|
|
42353
|
+
name: "POUYANIT - Saeid Shahrokhi, IR"
|
|
42198
42354
|
},
|
|
42199
42355
|
{
|
|
42200
42356
|
asn: "AS212631",
|
|
@@ -42246,7 +42402,7 @@ var iran_asns_default = {
|
|
|
42246
42402
|
},
|
|
42247
42403
|
{
|
|
42248
42404
|
asn: "AS213732",
|
|
42249
|
-
name: "PEP
|
|
42405
|
+
name: "PEP - Peyman Ertebatat Pouya Company (Ltd), IR"
|
|
42250
42406
|
},
|
|
42251
42407
|
{
|
|
42252
42408
|
asn: "AS213759",
|
|
@@ -42346,7 +42502,7 @@ var iran_asns_default = {
|
|
|
42346
42502
|
},
|
|
42347
42503
|
{
|
|
42348
42504
|
asn: "AS214805",
|
|
42349
|
-
name: "RoyaGard
|
|
42505
|
+
name: "RoyaGard - Kimiyagaran Padideh Modern Company LLC, IR"
|
|
42350
42506
|
},
|
|
42351
42507
|
{
|
|
42352
42508
|
asn: "AS214824",
|
|
@@ -42386,7 +42542,7 @@ var iran_asns_default = {
|
|
|
42386
42542
|
},
|
|
42387
42543
|
{
|
|
42388
42544
|
asn: "AS215351",
|
|
42389
|
-
name: "MGADMIN
|
|
42545
|
+
name: "MGADMIN - Mohammadreza Gholami, IR"
|
|
42390
42546
|
},
|
|
42391
42547
|
{
|
|
42392
42548
|
asn: "AS215496",
|
|
@@ -42422,7 +42578,7 @@ var iran_asns_default = {
|
|
|
42422
42578
|
},
|
|
42423
42579
|
{
|
|
42424
42580
|
asn: "AS215850",
|
|
42425
|
-
name: "EVTSP
|
|
42581
|
+
name: "EVTSP - PJSC Toseh Etemad Vosoogh Gostar, IR"
|
|
42426
42582
|
},
|
|
42427
42583
|
{
|
|
42428
42584
|
asn: "AS215892",
|
|
@@ -42430,7 +42586,7 @@ var iran_asns_default = {
|
|
|
42430
42586
|
},
|
|
42431
42587
|
{
|
|
42432
42588
|
asn: "AS215938",
|
|
42433
|
-
name: "Ertebanet
|
|
42589
|
+
name: "Ertebanet - Mizban Pardazesh Nasle Farda PJSC, IR"
|
|
42434
42590
|
},
|
|
42435
42591
|
{
|
|
42436
42592
|
asn: "AS215974",
|
|
@@ -42474,7 +42630,7 @@ var iran_asns_default = {
|
|
|
42474
42630
|
},
|
|
42475
42631
|
{
|
|
42476
42632
|
asn: "AS218970",
|
|
42477
|
-
name: "CHOMIK
|
|
42633
|
+
name: "CHOMIK - Amin NezhadKahnoji, IR"
|
|
42478
42634
|
},
|
|
42479
42635
|
{
|
|
42480
42636
|
asn: "AS219019",
|
|
@@ -42494,7 +42650,7 @@ var iran_asns_default = {
|
|
|
42494
42650
|
},
|
|
42495
42651
|
{
|
|
42496
42652
|
asn: "AS219466",
|
|
42497
|
-
name: "MEHRANHOST
|
|
42653
|
+
name: "MEHRANHOST - Mehran Saeedikia, IR"
|
|
42498
42654
|
}
|
|
42499
42655
|
]
|
|
42500
42656
|
};
|
|
@@ -43119,7 +43275,7 @@ ${result}`;
|
|
|
43119
43275
|
name: "update_bandwidth_server",
|
|
43120
43276
|
title: "Update Bandwidth Test Server Settings",
|
|
43121
43277
|
annotations: WRITE_IDEMPOTENT,
|
|
43122
|
-
description: "Configures the bandwidth-test server (`/tool bandwidth-server set`) \u2014 " + "enables or disables the server, toggles client authentication, caps concurrent " + "sessions,
|
|
43278
|
+
description: "Configures the bandwidth-test server (`/tool bandwidth-server set`) \u2014 " + "enables or disables the server, toggles client authentication, caps concurrent " + "sessions, sets the UDP port allocation base and restricts client IP prefixes. " + "An empty allowlist allows all clients; retain authentication and firewall restrictions. " + "To inspect current values before changing them use `get_bandwidth_server`. " + `Returns the updated settings block after applying changes.
|
|
43123
43279
|
|
|
43124
43280
|
` + `Arguments:
|
|
43125
43281
|
` + " `enabled`: accept incoming bandwidth-test sessions.\n" + " `authenticate`: require valid device credentials from test clients.\n" + " `max_sessions`: cap concurrent test sessions.\n" + " `allocate_udp_ports_from`: first UDP port used for test streams.",
|
|
@@ -43127,11 +43283,17 @@ ${result}`;
|
|
|
43127
43283
|
enabled: boolean().optional(),
|
|
43128
43284
|
authenticate: boolean().optional(),
|
|
43129
43285
|
max_sessions: number().int().min(1).optional(),
|
|
43130
|
-
allocate_udp_ports_from: number().int().optional()
|
|
43286
|
+
allocate_udp_ports_from: number().int().optional(),
|
|
43287
|
+
allowed_addresses4: array(union([ipv42(), cidrv42()])).optional(),
|
|
43288
|
+
allowed_addresses6: array(union([ipv62(), cidrv62()])).optional()
|
|
43131
43289
|
},
|
|
43132
43290
|
async handler(a, ctx) {
|
|
43133
43291
|
ctx.info("Updating bandwidth-server settings");
|
|
43134
43292
|
const cmd = new Cmd("/tool bandwidth-server set").bool("enabled", a.enabled).bool("authenticate", a.authenticate).opt("max-sessions", a.max_sessions).opt("allocate-udp-ports-from", a.allocate_udp_ports_from);
|
|
43293
|
+
if (a.allowed_addresses4 !== undefined)
|
|
43294
|
+
cmd.set("allowed-addresses4", a.allowed_addresses4.join(","));
|
|
43295
|
+
if (a.allowed_addresses6 !== undefined)
|
|
43296
|
+
cmd.set("allowed-addresses6", a.allowed_addresses6.join(","));
|
|
43135
43297
|
const built = cmd.build();
|
|
43136
43298
|
if (built === "/tool bandwidth-server set")
|
|
43137
43299
|
return "No updates specified.";
|
|
@@ -44109,6 +44271,7 @@ ${result}`;
|
|
|
44109
44271
|
annotations: WRITE_IDEMPOTENT,
|
|
44110
44272
|
description: "Modifies an existing traffic-monitor entry by name (`/tool traffic-monitor set [find name=...]`) \u2014 " + "for changing the watched interface, traffic direction (`received`/`transmitted`), trigger condition " + "(`above`/`below`/`always`), threshold (bits/second), or on-event script without removing and re-adding. " + "Supply only the fields to change; omitted fields are left unchanged. " + 'Pass `comment=""` to clear the comment. ' + "Returns the updated entry's full detail. " + "To create a new entry use `add_traffic_monitor`.",
|
|
44111
44273
|
inputSchema: {
|
|
44274
|
+
unset: unsetProperties,
|
|
44112
44275
|
name: string(),
|
|
44113
44276
|
interface: string().optional(),
|
|
44114
44277
|
traffic: Traffic.optional(),
|
|
@@ -44126,7 +44289,7 @@ ${result}`;
|
|
|
44126
44289
|
cmd.raw(`comment=${quoteValue(a.comment)}`);
|
|
44127
44290
|
if (a.disabled !== undefined)
|
|
44128
44291
|
cmd.raw(`disabled=${yesno(a.disabled)}`);
|
|
44129
|
-
const built = cmd.build();
|
|
44292
|
+
const built = cmd.unset(a.unset).build();
|
|
44130
44293
|
if (built === base)
|
|
44131
44294
|
return "No updates specified.";
|
|
44132
44295
|
const result = await executeMikrotikCommand2(built, ctx);
|
|
@@ -44608,6 +44771,7 @@ ${result}`;
|
|
|
44608
44771
|
annotations: WRITE_IDEMPOTENT,
|
|
44609
44772
|
description: "Modify a named OpenVPN server instance (`/interface ovpn-server server set [find name=...]`) on" + " the RouterOS 7.17+ multi-server model \u2014 change port, protocol, mode, certificate, auth/cipher," + " netmask, max_mtu, default_profile, mac_address, comment or require_client_certificate without" + " recreating it. To toggle only the enabled state use enable_ovpn_server / disable_ovpn_server." + " To create a server use add_ovpn_server; to remove one use remove_ovpn_server. For the legacy" + " single-server menu use set_ovpn_server. Returns the updated server's detail.",
|
|
44610
44773
|
inputSchema: {
|
|
44774
|
+
unset: unsetProperties,
|
|
44611
44775
|
name: string().describe("Existing OpenVPN server instance name"),
|
|
44612
44776
|
port: number().int().optional(),
|
|
44613
44777
|
protocol: _enum(["tcp", "udp"]).optional(),
|
|
@@ -44626,7 +44790,7 @@ ${result}`;
|
|
|
44626
44790
|
async handler(a, ctx) {
|
|
44627
44791
|
ctx.info(`Updating OpenVPN server: name=${a.name}`);
|
|
44628
44792
|
const base = `/interface ovpn-server server set [find name="${a.name}"]`;
|
|
44629
|
-
const cmd = new Cmd(base).opt("port", a.port).opt("protocol", a.protocol).opt("mode", a.mode).opt("netmask", a.netmask).opt("mac-address", a.mac_address).opt("certificate", a.certificate).opt("auth", a.auth).opt("cipher", a.cipher).opt("tls-version", a.tls_version).opt("max-mtu", a.max_mtu).opt("default-profile", a.default_profile).bool("require-client-certificate", a.require_client_certificate).opt("comment", a.comment).build();
|
|
44793
|
+
const cmd = new Cmd(base).opt("port", a.port).opt("protocol", a.protocol).opt("mode", a.mode).opt("netmask", a.netmask).opt("mac-address", a.mac_address).opt("certificate", a.certificate).opt("auth", a.auth).opt("cipher", a.cipher).opt("tls-version", a.tls_version).opt("max-mtu", a.max_mtu).opt("default-profile", a.default_profile).bool("require-client-certificate", a.require_client_certificate).opt("comment", a.comment).unset(a.unset).build();
|
|
44630
44794
|
if (cmd === base)
|
|
44631
44795
|
return "No updates specified.";
|
|
44632
44796
|
const count = await executeMikrotikCommand2(`/interface ovpn-server server print count-only where name="${a.name}"`, ctx);
|
|
@@ -44977,6 +45141,7 @@ ${result}`;
|
|
|
44977
45141
|
annotations: WRITE_IDEMPOTENT,
|
|
44978
45142
|
description: "Modifies an existing PPP profile's settings (`/ppp profile set [find name=...]`). " + "Targets the profile by its current name; supply `new_name` to rename it. Any combination of fields can be updated \u2014 local/remote address, DNS, rate-limit (e.g. '10M/10M'), encryption, TCP-MSS, bridge, only-one. " + "For updating VPN user credentials use update_ppp_secret instead. " + "Returns the profile's updated detail after the change.",
|
|
44979
45143
|
inputSchema: {
|
|
45144
|
+
unset: unsetProperties,
|
|
44980
45145
|
name: string().describe("Current name of the PPP profile to update"),
|
|
44981
45146
|
new_name: string().optional(),
|
|
44982
45147
|
local_address: string().optional(),
|
|
@@ -45005,8 +45170,8 @@ ${result}`;
|
|
|
45005
45170
|
},
|
|
45006
45171
|
async handler(a, ctx) {
|
|
45007
45172
|
ctx.info(`Updating PPP profile: name=${a.name}`);
|
|
45008
|
-
const cmd = new Cmd(`/ppp profile set [find name="${a.name}"]`).opt("name", a.new_name).opt("local-address", a.local_address).opt("remote-address", a.remote_address).opt("dns-server", a.dns_server).opt("wins-server", a.wins_server).opt("address-list", a.address_list).opt("incoming-filter", a.incoming_filter).opt("outgoing-filter", a.outgoing_filter).opt("rate-limit", a.rate_limit).opt("session-timeout", a.session_timeout).opt("idle-timeout", a.idle_timeout).opt("use-encryption", a.use_encryption).opt("use-mpls", a.use_mpls).opt("use-compression", a.use_compression).opt("change-tcp-mss", a.change_tcp_mss).opt("only-one", a.only_one).opt("bridge", a.bridge).opt("bridge-horizon", a.bridge_horizon).opt("bridge-path-cost", a.bridge_path_cost).opt("bridge-port-priority", a.bridge_port_priority).opt("dhcpv6-pd-pool", a.dhcpv6_pd_pool).opt("on-up", a.on_up).opt("on-down", a.on_down).opt("comment", a.comment).build();
|
|
45009
|
-
if (
|
|
45173
|
+
const cmd = new Cmd(`/ppp profile set [find name="${a.name}"]`).opt("name", a.new_name).opt("local-address", a.local_address).opt("remote-address", a.remote_address).opt("dns-server", a.dns_server).opt("wins-server", a.wins_server).opt("address-list", a.address_list).opt("incoming-filter", a.incoming_filter).opt("outgoing-filter", a.outgoing_filter).opt("rate-limit", a.rate_limit).opt("session-timeout", a.session_timeout).opt("idle-timeout", a.idle_timeout).opt("use-encryption", a.use_encryption).opt("use-mpls", a.use_mpls).opt("use-compression", a.use_compression).opt("change-tcp-mss", a.change_tcp_mss).opt("only-one", a.only_one).opt("bridge", a.bridge).opt("bridge-horizon", a.bridge_horizon).opt("bridge-path-cost", a.bridge_path_cost).opt("bridge-port-priority", a.bridge_port_priority).opt("dhcpv6-pd-pool", a.dhcpv6_pd_pool).opt("on-up", a.on_up).opt("on-down", a.on_down).opt("comment", a.comment).unset(a.unset).build();
|
|
45174
|
+
if (!/[=!]/.test(cmd.slice(cmd.indexOf("]"))))
|
|
45010
45175
|
return "No updates specified.";
|
|
45011
45176
|
const result = await executeMikrotikCommand2(cmd, ctx);
|
|
45012
45177
|
if (looksLikeError(result))
|
|
@@ -45108,6 +45273,7 @@ ${redactSecrets(result)}`;
|
|
|
45108
45273
|
annotations: WRITE_IDEMPOTENT,
|
|
45109
45274
|
description: "Modifies an existing PPP secret \u2014 a VPN user credential (`/ppp secret set [find name=...]`). " + "Targets the account by its current username; supply `new_name` to rename it. Any combination of fields can be changed \u2014 password, service restriction (any/l2tp/pptp/sstp/ovpn/pppoe), profile, local/remote address, caller-id, comment, or disabled state. " + "For updating connection templates (rate-limit, encryption, DNS) use update_ppp_profile instead. " + "Password is redacted in the returned output. Returns the account's updated detail after the change.",
|
|
45110
45275
|
inputSchema: {
|
|
45276
|
+
unset: unsetProperties,
|
|
45111
45277
|
name: string().describe("Current username of the secret to update"),
|
|
45112
45278
|
new_name: string().optional(),
|
|
45113
45279
|
password: string().optional(),
|
|
@@ -45124,8 +45290,8 @@ ${redactSecrets(result)}`;
|
|
|
45124
45290
|
},
|
|
45125
45291
|
async handler(a, ctx) {
|
|
45126
45292
|
ctx.info(`Updating PPP secret: name=${a.name}`);
|
|
45127
|
-
const cmd = new Cmd(`/ppp secret set [find name="${a.name}"]`).opt("name", a.new_name).opt("password", a.password).opt("service", a.service).opt("profile", a.profile).opt("local-address", a.local_address).opt("remote-address", a.remote_address).opt("routes", a.routes).opt("caller-id", a.caller_id).opt("limit-bytes-in", a.limit_bytes_in).opt("limit-bytes-out", a.limit_bytes_out).opt("comment", a.comment).bool("disabled", a.disabled).build();
|
|
45128
|
-
if (
|
|
45293
|
+
const cmd = new Cmd(`/ppp secret set [find name="${a.name}"]`).opt("name", a.new_name).opt("password", a.password).opt("service", a.service).opt("profile", a.profile).opt("local-address", a.local_address).opt("remote-address", a.remote_address).opt("routes", a.routes).opt("caller-id", a.caller_id).opt("limit-bytes-in", a.limit_bytes_in).opt("limit-bytes-out", a.limit_bytes_out).opt("comment", a.comment).bool("disabled", a.disabled).unset(a.unset).build();
|
|
45294
|
+
if (!/[=!]/.test(cmd.slice(cmd.indexOf("]"))))
|
|
45129
45295
|
return "No updates specified.";
|
|
45130
45296
|
const result = await executeMikrotikCommand2(cmd, ctx);
|
|
45131
45297
|
if (looksLikeError(result))
|
|
@@ -45512,6 +45678,7 @@ ${result}`;
|
|
|
45512
45678
|
annotations: WRITE_IDEMPOTENT,
|
|
45513
45679
|
description: "Modifies an existing queue discipline (`/queue type set [find name=...]`). Supports renaming (`new_name`) and changing CAKE- or PCQ-specific parameters (cake_flowmode, cake_nat, cake_overhead, pcq_rate, pcq_classifier, etc.). Does not change the queue `kind` \u2014 to switch algorithm, remove and recreate the type with `remove_queue_type` then `create_queue_type`. Returns updated detail; if no parameters are provided returns 'No updates specified.' Use `get_queue_type` to confirm current values first.",
|
|
45514
45680
|
inputSchema: {
|
|
45681
|
+
unset: unsetProperties,
|
|
45515
45682
|
name: string(),
|
|
45516
45683
|
new_name: string().optional(),
|
|
45517
45684
|
cake_flowmode: string().optional(),
|
|
@@ -45541,8 +45708,8 @@ ${result}`;
|
|
|
45541
45708
|
},
|
|
45542
45709
|
async handler(a, ctx) {
|
|
45543
45710
|
ctx.info(`Updating queue type: name=${a.name}`);
|
|
45544
|
-
const cmd = new Cmd(`/queue type set [find name="${a.name}"]`).opt("name", a.new_name).opt("cake-flowmode", a.cake_flowmode).bool("cake-nat", a.cake_nat).opt("cake-overhead", a.cake_overhead).opt("cake-mpu", a.cake_mpu).opt("cake-diffserv", a.cake_diffserv).opt("cake-ack-filter", a.cake_ack_filter).opt("cake-rtt", a.cake_rtt).bool("cake-wash", a.cake_wash).opt("cake-overhead-scheme", a.cake_overhead_scheme).opt("cake-bandwidth", a.cake_bandwidth).opt("cake-atm", a.cake_atm).bool("cake-autorate-ingress", a.cake_autorate_ingress).opt("cake-memlimit", a.cake_memlimit).opt("pcq-rate", a.pcq_rate).opt("pcq-limit", a.pcq_limit).opt("pcq-classifier", a.pcq_classifier).opt("pcq-total-limit", a.pcq_total_limit).opt("pcq-burst-rate", a.pcq_burst_rate).opt("pcq-burst-threshold", a.pcq_burst_threshold).opt("pcq-burst-time", a.pcq_burst_time).opt("pcq-src-address-mask", a.pcq_src_address_mask).opt("pcq-dst-address-mask", a.pcq_dst_address_mask).opt("pcq-src-address6-mask", a.pcq_src_address6_mask).opt("pcq-dst-address6-mask", a.pcq_dst_address6_mask).build();
|
|
45545
|
-
if (
|
|
45711
|
+
const cmd = new Cmd(`/queue type set [find name="${a.name}"]`).opt("name", a.new_name).opt("cake-flowmode", a.cake_flowmode).bool("cake-nat", a.cake_nat).opt("cake-overhead", a.cake_overhead).opt("cake-mpu", a.cake_mpu).opt("cake-diffserv", a.cake_diffserv).opt("cake-ack-filter", a.cake_ack_filter).opt("cake-rtt", a.cake_rtt).bool("cake-wash", a.cake_wash).opt("cake-overhead-scheme", a.cake_overhead_scheme).opt("cake-bandwidth", a.cake_bandwidth).opt("cake-atm", a.cake_atm).bool("cake-autorate-ingress", a.cake_autorate_ingress).opt("cake-memlimit", a.cake_memlimit).opt("pcq-rate", a.pcq_rate).opt("pcq-limit", a.pcq_limit).opt("pcq-classifier", a.pcq_classifier).opt("pcq-total-limit", a.pcq_total_limit).opt("pcq-burst-rate", a.pcq_burst_rate).opt("pcq-burst-threshold", a.pcq_burst_threshold).opt("pcq-burst-time", a.pcq_burst_time).opt("pcq-src-address-mask", a.pcq_src_address_mask).opt("pcq-dst-address-mask", a.pcq_dst_address_mask).opt("pcq-src-address6-mask", a.pcq_src_address6_mask).opt("pcq-dst-address6-mask", a.pcq_dst_address6_mask).unset(a.unset).build();
|
|
45712
|
+
if (!/[=!]/.test(cmd.slice(cmd.indexOf("]"))))
|
|
45546
45713
|
return "No updates specified.";
|
|
45547
45714
|
const result = await executeMikrotikCommand2(cmd, ctx);
|
|
45548
45715
|
if (looksLikeError(result))
|
|
@@ -45646,6 +45813,7 @@ ${result}`;
|
|
|
45646
45813
|
annotations: WRITE_IDEMPOTENT,
|
|
45647
45814
|
description: "Modifies an existing queue tree node (`/queue tree set [find name=...]`). Accepts `new_name`, `parent`, `queue` (qdisc reference from `create_queue_type`), `packet_mark`, bandwidth params (`max_limit`, `limit_at`, `burst_limit`, `burst_threshold` as RouterOS rate strings e.g. '10M', '512k', '1G'; `burst_time` e.g. '8s'), `priority` (1 highest \u2013 8 lowest), `comment`, and `disabled`. Returns updated detail; if no parameters are specified returns 'No updates specified.' Use `get_queue_tree` to confirm current state before updating. For simple per-target queues use `update_simple_queue`.",
|
|
45648
45815
|
inputSchema: {
|
|
45816
|
+
unset: unsetProperties,
|
|
45649
45817
|
name: string(),
|
|
45650
45818
|
new_name: string().optional(),
|
|
45651
45819
|
parent: string().optional(),
|
|
@@ -45663,8 +45831,8 @@ ${result}`;
|
|
|
45663
45831
|
},
|
|
45664
45832
|
async handler(a, ctx) {
|
|
45665
45833
|
ctx.info(`Updating queue tree: name=${a.name}`);
|
|
45666
|
-
const cmd = new Cmd(`/queue tree set [find name="${a.name}"]`).opt("name", a.new_name).opt("parent", a.parent).opt("queue", a.queue).opt("packet-mark", a.packet_mark).opt("max-limit", a.max_limit).opt("limit-at", a.limit_at).opt("burst-limit", a.burst_limit).opt("burst-threshold", a.burst_threshold).opt("burst-time", a.burst_time).opt("bucket-size", a.bucket_size).opt("priority", a.priority).opt("comment", a.comment).bool("disabled", a.disabled).build();
|
|
45667
|
-
if (
|
|
45834
|
+
const cmd = new Cmd(`/queue tree set [find name="${a.name}"]`).opt("name", a.new_name).opt("parent", a.parent).opt("queue", a.queue).opt("packet-mark", a.packet_mark).opt("max-limit", a.max_limit).opt("limit-at", a.limit_at).opt("burst-limit", a.burst_limit).opt("burst-threshold", a.burst_threshold).opt("burst-time", a.burst_time).opt("bucket-size", a.bucket_size).opt("priority", a.priority).opt("comment", a.comment).bool("disabled", a.disabled).unset(a.unset).build();
|
|
45835
|
+
if (!/[=!]/.test(cmd.slice(cmd.indexOf("]"))))
|
|
45668
45836
|
return "No updates specified.";
|
|
45669
45837
|
const result = await executeMikrotikCommand2(cmd, ctx);
|
|
45670
45838
|
if (looksLikeError(result))
|
|
@@ -45805,6 +45973,7 @@ ${result}`;
|
|
|
45805
45973
|
annotations: WRITE_IDEMPOTENT,
|
|
45806
45974
|
description: "Modifies an existing per-target rate-limiting entry (`/queue simple set [find name=...]`). Accepts `new_name`, `target` (IP/CIDR or interface e.g. '192.168.1.0/24', 'ether1'), `dst`, bandwidth params (`max_limit`, `limit_at`, `burst_limit`, `burst_threshold` as 'UL/DL' or single value e.g. '10M/10M', '5M'; `burst_time` e.g. '8s'), `queue` (qdisc reference), `parent`, `priority` (1 highest \u2013 8 lowest), `packet_marks`, `comment`, and `disabled`. Returns updated detail; if no parameters are provided returns 'No updates specified.' Use `get_simple_queue` to confirm current state first. For hierarchical queue nodes use `update_queue_tree`.",
|
|
45807
45975
|
inputSchema: {
|
|
45976
|
+
unset: unsetProperties,
|
|
45808
45977
|
name: string(),
|
|
45809
45978
|
new_name: string().optional(),
|
|
45810
45979
|
target: string().optional().describe('IP/CIDR or interface e.g. "192.168.1.0/24" or "ether1"'),
|
|
@@ -45825,8 +45994,8 @@ ${result}`;
|
|
|
45825
45994
|
},
|
|
45826
45995
|
async handler(a, ctx) {
|
|
45827
45996
|
ctx.info(`Updating simple queue: name=${a.name}`);
|
|
45828
|
-
const cmd = new Cmd(`/queue simple set [find name="${a.name}"]`).opt("name", a.new_name).opt("target", a.target).opt("dst", a.dst).opt("max-limit", a.max_limit).opt("limit-at", a.limit_at).opt("burst-limit", a.burst_limit).opt("burst-threshold", a.burst_threshold).opt("burst-time", a.burst_time).opt("bucket-size", a.bucket_size).opt("queue", a.queue).opt("parent", a.parent).opt("priority", a.priority).opt("packet-marks", a.packet_marks).opt("time", a.time).opt("comment", a.comment).bool("disabled", a.disabled).build();
|
|
45829
|
-
if (
|
|
45997
|
+
const cmd = new Cmd(`/queue simple set [find name="${a.name}"]`).opt("name", a.new_name).opt("target", a.target).opt("dst", a.dst).opt("max-limit", a.max_limit).opt("limit-at", a.limit_at).opt("burst-limit", a.burst_limit).opt("burst-threshold", a.burst_threshold).opt("burst-time", a.burst_time).opt("bucket-size", a.bucket_size).opt("queue", a.queue).opt("parent", a.parent).opt("priority", a.priority).opt("packet-marks", a.packet_marks).opt("time", a.time).opt("comment", a.comment).bool("disabled", a.disabled).unset(a.unset).build();
|
|
45998
|
+
if (!/[=!]/.test(cmd.slice(cmd.indexOf("]"))))
|
|
45830
45999
|
return "No updates specified.";
|
|
45831
46000
|
const result = await executeMikrotikCommand2(cmd, ctx);
|
|
45832
46001
|
if (looksLikeError(result))
|
|
@@ -45937,13 +46106,14 @@ ${result}`;
|
|
|
45937
46106
|
annotations: WRITE_IDEMPOTENT,
|
|
45938
46107
|
description: "Assign a queue type to a specific interface (`/queue interface set`) \u2014 controls which egress queuing discipline is applied to outbound traffic on that interface. " + "Use this to switch between built-in types such as 'ethernet-default' or 'only-hardware-queue', or to apply a custom queue type defined under /queue type. " + "This does NOT create a bandwidth-limiting queue; for that use create_simple_queue (simple rate-limit) or create_queue_tree (hierarchical/HTB shaping). " + "Accepts the interface name (e.g. 'ether1') or RouterOS '.id' (from list_queue_interfaces) as interface_id; " + "if the id begins with '*' it is matched by .id, otherwise by interface name. " + "Returns the updated entry detail on success.",
|
|
45939
46108
|
inputSchema: {
|
|
46109
|
+
unset: unsetProperties,
|
|
45940
46110
|
interface_id: string().describe("Interface name (e.g. 'ether1') or RouterOS '.id'"),
|
|
45941
46111
|
queue: string().describe("Queue-type name to apply to the interface")
|
|
45942
46112
|
},
|
|
45943
46113
|
async handler(a, ctx) {
|
|
45944
46114
|
ctx.info(`Updating queue interface: interface_id=${a.interface_id}`);
|
|
45945
46115
|
const selector = a.interface_id.startsWith("*") ? `.id="${a.interface_id}"` : `interface="${a.interface_id}"`;
|
|
45946
|
-
const cmd = new Cmd(`/queue interface set [find ${selector}]`).set("queue", a.queue).build();
|
|
46116
|
+
const cmd = new Cmd(`/queue interface set [find ${selector}]`).set("queue", a.queue).unset(a.unset).build();
|
|
45947
46117
|
const result = await executeMikrotikCommand2(cmd, ctx);
|
|
45948
46118
|
if (looksLikeError(result))
|
|
45949
46119
|
return `Failed to update queue interface: ${result}`;
|
|
@@ -46573,6 +46743,7 @@ ${redactSecrets(result)}`;
|
|
|
46573
46743
|
annotations: WRITE_IDEMPOTENT,
|
|
46574
46744
|
description: "Updates one or more fields on an existing RADIUS server entry (`/radius set <id>`) \u2014" + " use to change the address, shared secret, services, ports, timeout, realm, or enabled" + " state without recreating the entry. The `radius_id` is the `.id` returned by" + " `list_radius_servers`. Returns the updated entry's full detail with the shared secret" + " redacted. To create a new entry use `add_radius_server`; to toggle enabled state only" + " use `enable_radius_server` or `disable_radius_server`.",
|
|
46575
46745
|
inputSchema: {
|
|
46746
|
+
unset: unsetProperties,
|
|
46576
46747
|
radius_id: string().describe("RADIUS entry internal .id, e.g. '*1'"),
|
|
46577
46748
|
address: string().optional(),
|
|
46578
46749
|
secret: string().optional(),
|
|
@@ -46592,8 +46763,8 @@ ${redactSecrets(result)}`;
|
|
|
46592
46763
|
},
|
|
46593
46764
|
async handler(a, ctx) {
|
|
46594
46765
|
ctx.info(`Updating RADIUS server: radius_id=${a.radius_id}`);
|
|
46595
|
-
const cmd = new Cmd(`/radius set ${a.radius_id}`).opt("address", a.address).opt("secret", a.secret).opt("service", a.service).opt("authentication-port", a.authentication_port).opt("accounting-port", a.accounting_port).opt("timeout", a.timeout).opt("src-address", a.src_address).opt("realm", a.realm).opt("called-id", a.called_id).opt("domain", a.domain).opt("protocol", a.protocol).opt("certificate", a.certificate).bool("accounting-backup", a.accounting_backup).opt("comment", a.comment).bool("disabled", a.disabled).build();
|
|
46596
|
-
if (
|
|
46766
|
+
const cmd = new Cmd(`/radius set ${a.radius_id}`).opt("address", a.address).opt("secret", a.secret).opt("service", a.service).opt("authentication-port", a.authentication_port).opt("accounting-port", a.accounting_port).opt("timeout", a.timeout).opt("src-address", a.src_address).opt("realm", a.realm).opt("called-id", a.called_id).opt("domain", a.domain).opt("protocol", a.protocol).opt("certificate", a.certificate).bool("accounting-backup", a.accounting_backup).opt("comment", a.comment).bool("disabled", a.disabled).unset(a.unset).build();
|
|
46767
|
+
if (!/[=!]/.test(cmd))
|
|
46597
46768
|
return "No updates specified.";
|
|
46598
46769
|
const result = await executeMikrotikCommand2(cmd, ctx);
|
|
46599
46770
|
if (looksLikeError(result))
|
|
@@ -48124,6 +48295,7 @@ ${result}`;
|
|
|
48124
48295
|
annotations: WRITE_IDEMPOTENT,
|
|
48125
48296
|
description: "Modifies an existing IPv4 static route (`/ip route set`) \u2014 change its gateway, dst-address, " + "distance, scope, routing-table, VRF interface, preferred-source, or gateway check method. " + "`route_id` is the `*N` `.id` from list_routes. " + 'Pass an empty string ("") for `routing_table`, `vrf_interface`, or `pref_src` to clear those fields. ' + "For toggling active state without editing attributes use enable_route / disable_route. " + "Returns the updated route detail.",
|
|
48126
48297
|
inputSchema: {
|
|
48298
|
+
unset: unsetProperties,
|
|
48127
48299
|
route_id: string().describe('"*N" or "N" from list output e.g. "*3"'),
|
|
48128
48300
|
dst_address: string().optional().describe('CIDR e.g. "192.168.1.0/24"'),
|
|
48129
48301
|
gateway: string().optional(),
|
|
@@ -48177,7 +48349,7 @@ ${result}`;
|
|
|
48177
48349
|
cmd.bool("suppress-hw-offload", a.suppress_hw_offload);
|
|
48178
48350
|
if (a.type !== undefined)
|
|
48179
48351
|
cmd.raw(routeTypeArg(a.type, true));
|
|
48180
|
-
const built = cmd.build();
|
|
48352
|
+
const built = cmd.unset(a.unset).build();
|
|
48181
48353
|
if (built === base)
|
|
48182
48354
|
return "No updates specified.";
|
|
48183
48355
|
const result = await executeMikrotikCommand2(built, ctx);
|
|
@@ -48264,7 +48436,7 @@ ${result}`;
|
|
|
48264
48436
|
name: "check_route_path",
|
|
48265
48437
|
title: "Check IPv4 Route Path",
|
|
48266
48438
|
annotations: READ,
|
|
48267
|
-
description: "Resolves which nexthop RouterOS would use for a given IPv4 destination " + '\u2014 answers "which gateway will this packet take?" without sending any traffic. ' + "Version-aware: uses `/ip route check` on
|
|
48439
|
+
description: "Resolves which nexthop RouterOS would use for a given IPv4 destination " + '\u2014 answers "which gateway will this packet take?" without sending any traffic. ' + "Version-aware: uses `/ip route check` only on a device known to run v6; on v7+ (and " + "when the version is unknown) it uses " + "`/ip route print where <dest> in dst-address active=yes` and never sends the check " + "command. Optionally scoped by `routing_table` (v7) / `routing_mark` (v6) " + "for policy-routing table lookups. " + "For listing all known routes use list_routes; for a named-table view use get_routing_table. " + "Returns the resolved nexthop and interface detail.",
|
|
48268
48440
|
inputSchema: {
|
|
48269
48441
|
destination: string(),
|
|
48270
48442
|
routing_table: string().optional().describe('Policy-routing table name (v7) or routing-mark (v6), e.g. "VPN"')
|
|
@@ -48272,12 +48444,17 @@ ${result}`;
|
|
|
48272
48444
|
async handler(a, ctx) {
|
|
48273
48445
|
ctx.info(`Checking route path to: ${a.destination}`);
|
|
48274
48446
|
const table = a.routing_table;
|
|
48275
|
-
const
|
|
48276
|
-
|
|
48277
|
-
|
|
48278
|
-
|
|
48447
|
+
const major = (await getCapabilities(ctx.device).catch(() => {
|
|
48448
|
+
return;
|
|
48449
|
+
}))?.version?.major;
|
|
48450
|
+
if (major !== undefined && major < 7) {
|
|
48451
|
+
const v6Cmd = new Cmd(`/ip route check ${a.destination}`).opt("routing-mark", table).build();
|
|
48452
|
+
const v6Result = await executeMikrotikCommand2(v6Cmd, ctx);
|
|
48453
|
+
if (!commandUnsupported(v6Result) && !looksLikeError(v6Result) && !isEmpty(v6Result)) {
|
|
48454
|
+
return `ROUTE PATH TO ${a.destination}:
|
|
48279
48455
|
|
|
48280
48456
|
${v6Result}`;
|
|
48457
|
+
}
|
|
48281
48458
|
}
|
|
48282
48459
|
const where = [`${a.destination} in dst-address`, "active=yes"];
|
|
48283
48460
|
if (table && table !== "main")
|
|
@@ -48455,6 +48632,7 @@ ${result}`;
|
|
|
48455
48632
|
annotations: WRITE_IDEMPOTENT,
|
|
48456
48633
|
description: "Updates an existing BFD timer-profile entry (`/routing bfd configuration set`) by its `.id` " + "(obtain from `list_bfd_configurations`). Adjusts `interfaces`, `vrf`, `min_rx`/`min_tx` intervals " + '(e.g. "200ms"), `multiplier`, `comment`, or `disabled` state. To toggle enabled state only use ' + "`set_bfd_configuration_enabled`. Returns the updated entry's full detail.",
|
|
48457
48634
|
inputSchema: {
|
|
48635
|
+
unset: unsetProperties,
|
|
48458
48636
|
config_id: string().describe('Configuration id, e.g. "*1"'),
|
|
48459
48637
|
interfaces: string().optional(),
|
|
48460
48638
|
vrf: string().optional(),
|
|
@@ -48473,7 +48651,7 @@ ${result}`;
|
|
|
48473
48651
|
cmd.set("comment", a.comment);
|
|
48474
48652
|
if (a.disabled !== undefined)
|
|
48475
48653
|
cmd.bool("disabled", a.disabled);
|
|
48476
|
-
const built = cmd.build();
|
|
48654
|
+
const built = cmd.unset(a.unset).build();
|
|
48477
48655
|
if (built === base)
|
|
48478
48656
|
return "No updates specified.";
|
|
48479
48657
|
const result = await executeMikrotikCommand2(built, ctx);
|
|
@@ -48694,6 +48872,7 @@ ${details}`;
|
|
|
48694
48872
|
annotations: WRITE_IDEMPOTENT,
|
|
48695
48873
|
description: 'Modifies settings of an existing BGP connection by name (`/routing bgp connection set [find name="<name>"]`). ' + "Only supplied fields are changed; omitted fields are left unchanged. To enable or disable a connection " + "without touching other settings use `set_bgp_connection_enabled`. To delete a connection use " + "`remove_bgp_connection`. Returns the full updated connection detail on success.",
|
|
48696
48874
|
inputSchema: {
|
|
48875
|
+
unset: unsetProperties,
|
|
48697
48876
|
name: string().describe("Existing BGP connection name"),
|
|
48698
48877
|
remote_address: string().optional(),
|
|
48699
48878
|
remote_as: number().int().optional(),
|
|
@@ -48752,7 +48931,7 @@ ${details}`;
|
|
|
48752
48931
|
cmd.set("comment", a.comment);
|
|
48753
48932
|
if (a.disabled !== undefined)
|
|
48754
48933
|
cmd.bool("disabled", a.disabled);
|
|
48755
|
-
const built = cmd.build();
|
|
48934
|
+
const built = cmd.unset(a.unset).build();
|
|
48756
48935
|
if (built === base)
|
|
48757
48936
|
return "No updates specified.";
|
|
48758
48937
|
const result = await executeMikrotikCommand2(built, ctx);
|
|
@@ -48966,6 +49145,7 @@ ${result}`;
|
|
|
48966
49145
|
annotations: WRITE_IDEMPOTENT,
|
|
48967
49146
|
description: "Updates an existing routing filter rule's chain, script expression, comment, or enabled state " + "(`/routing filter rule set`) on RouterOS v7. `rule_id` takes the `.id` from list_routing_filter_rules " + '(e.g. `"*3"`). Returns the updated rule\'s full detail. ' + "To toggle only enabled/disabled state use set_routing_filter_rule_enabled.",
|
|
48968
49147
|
inputSchema: {
|
|
49148
|
+
unset: unsetProperties,
|
|
48969
49149
|
rule_id: string().describe('Rule id, e.g. "*3"'),
|
|
48970
49150
|
chain: string().optional(),
|
|
48971
49151
|
rule: string().optional(),
|
|
@@ -48984,7 +49164,7 @@ ${result}`;
|
|
|
48984
49164
|
cmd.set("comment", a.comment);
|
|
48985
49165
|
if (a.disabled !== undefined)
|
|
48986
49166
|
cmd.bool("disabled", a.disabled);
|
|
48987
|
-
const built = cmd.build();
|
|
49167
|
+
const built = cmd.unset(a.unset).build();
|
|
48988
49168
|
if (built === base)
|
|
48989
49169
|
return "No updates specified.";
|
|
48990
49170
|
const result = await executeMikrotikCommand2(built, ctx);
|
|
@@ -49225,6 +49405,7 @@ ${details}`;
|
|
|
49225
49405
|
annotations: WRITE_IDEMPOTENT,
|
|
49226
49406
|
description: "Modifies an existing Router-ID instance (`/routing id set [find name=...]`). " + "Supply any combination of fields to change; omitted fields are left untouched. " + 'Pass `""` for `id` to clear the fixed router-id (RouterOS unsets it with `!id`); ' + 'pass `""` for `select_dynamic_id` to clear dynamic interface selection (`!select-dynamic-id`). ' + "Use `add_routing_id` to create a new instance; " + "use `set_routing_id_enabled` to toggle enabled state without changing other properties. " + "For updating IPv4 routes use `update_route`; for policy routing rules use `update_routing_rule`. " + "Returns the updated instance's full detail.",
|
|
49227
49407
|
inputSchema: {
|
|
49408
|
+
unset: unsetProperties,
|
|
49228
49409
|
name: string().describe("Existing Router-ID instance name"),
|
|
49229
49410
|
id: string().optional().describe('IPv4 router-id, or "" to clear'),
|
|
49230
49411
|
select_dynamic_id: string().optional().describe('Interface/loopback name, or "" to clear'),
|
|
@@ -49244,7 +49425,7 @@ ${details}`;
|
|
|
49244
49425
|
cmd.set("comment", a.comment);
|
|
49245
49426
|
if (a.disabled !== undefined)
|
|
49246
49427
|
cmd.bool("disabled", a.disabled);
|
|
49247
|
-
const built = cmd.build();
|
|
49428
|
+
const built = cmd.unset(a.unset).build();
|
|
49248
49429
|
if (built === base)
|
|
49249
49430
|
return "No updates specified.";
|
|
49250
49431
|
const result = await executeMikrotikCommand2(built, ctx);
|
|
@@ -49389,6 +49570,7 @@ ${result}`;
|
|
|
49389
49570
|
annotations: WRITE_IDEMPOTENT,
|
|
49390
49571
|
description: "Update an existing IGMP proxy interface entry by name (`/routing igmp-proxy interface set " + "[find interface=...]`). Modifies the upstream/downstream role, alternative subnets, TTL threshold, " + "comment, or disabled state of the named interface. For adding a new interface use " + "`add_igmp_proxy_interface`; to toggle only the enabled state use `set_igmp_proxy_interface_enabled`. " + "Returns updated interface detail on success.",
|
|
49391
49572
|
inputSchema: {
|
|
49573
|
+
unset: unsetProperties,
|
|
49392
49574
|
interface: string().describe("Existing IGMP-proxy interface name"),
|
|
49393
49575
|
upstream: boolean().optional(),
|
|
49394
49576
|
alternative_subnets: string().optional(),
|
|
@@ -49406,7 +49588,7 @@ ${result}`;
|
|
|
49406
49588
|
cmd.set("comment", a.comment);
|
|
49407
49589
|
if (a.disabled !== undefined)
|
|
49408
49590
|
cmd.bool("disabled", a.disabled);
|
|
49409
|
-
const built = cmd.build();
|
|
49591
|
+
const built = cmd.unset(a.unset).build();
|
|
49410
49592
|
if (built === base)
|
|
49411
49593
|
return "No updates specified.";
|
|
49412
49594
|
const result = await executeMikrotikCommand2(built, ctx);
|
|
@@ -49583,6 +49765,7 @@ ${details}`;
|
|
|
49583
49765
|
annotations: WRITE_IDEMPOTENT,
|
|
49584
49766
|
description: "Update an existing OSPF instance (`/routing ospf instance set`) by name \u2014 change router-id, " + "redistribution list, import/export filter chains, originate-default policy, comment, or disabled state. " + "Only supplied fields are modified; omitting a field leaves it unchanged. " + "`name` identifies the target instance (use list_ospf_instances to find names). " + "Returns the updated instance detail. To remove an instance entirely use remove_ospf_instance.",
|
|
49585
49767
|
inputSchema: {
|
|
49768
|
+
unset: unsetProperties,
|
|
49586
49769
|
name: string().describe("Existing OSPF instance name"),
|
|
49587
49770
|
router_id: string().optional(),
|
|
49588
49771
|
redistribute: string().optional(),
|
|
@@ -49607,7 +49790,7 @@ ${details}`;
|
|
|
49607
49790
|
cmd.set("comment", a.comment);
|
|
49608
49791
|
if (a.disabled !== undefined)
|
|
49609
49792
|
cmd.bool("disabled", a.disabled);
|
|
49610
|
-
const built = cmd.build();
|
|
49793
|
+
const built = cmd.unset(a.unset).build();
|
|
49611
49794
|
if (built === base)
|
|
49612
49795
|
return "No updates specified.";
|
|
49613
49796
|
const result = await executeMikrotikCommand2(built, ctx);
|
|
@@ -50132,6 +50315,7 @@ ${details}`;
|
|
|
50132
50315
|
annotations: WRITE_IDEMPOTENT,
|
|
50133
50316
|
description: "Modify an existing RIP process instance (`/routing rip instance set`) identified by its name. Use to " + "change redistribution policy, filter chains, router-id, or enabled/disabled state without recreating the " + "instance. Obtain the name from list_rip_instances. For creating a new instance use add_rip_instance; for " + "removing one use remove_rip_instance. Returns the updated instance's detail. Requires RouterOS v7 with " + "the routing package.",
|
|
50134
50317
|
inputSchema: {
|
|
50318
|
+
unset: unsetProperties,
|
|
50135
50319
|
name: string().describe("Existing RIP instance name"),
|
|
50136
50320
|
router_id: string().optional(),
|
|
50137
50321
|
routing_table: string().optional().describe("Routing table to install routes into"),
|
|
@@ -50150,7 +50334,7 @@ ${details}`;
|
|
|
50150
50334
|
cmd.set("comment", a.comment);
|
|
50151
50335
|
if (a.disabled !== undefined)
|
|
50152
50336
|
cmd.bool("disabled", a.disabled);
|
|
50153
|
-
const built = cmd.build();
|
|
50337
|
+
const built = cmd.unset(a.unset).build();
|
|
50154
50338
|
if (built === base)
|
|
50155
50339
|
return "No updates specified.";
|
|
50156
50340
|
const result = await executeMikrotikCommand2(built, ctx);
|
|
@@ -50375,6 +50559,7 @@ ${result}`;
|
|
|
50375
50559
|
annotations: WRITE_IDEMPOTENT,
|
|
50376
50560
|
description: "Modifies an existing RPKI RTR session (`/routing rpki set`) by its `.id`. Use `list_rpki_sessions` to " + 'obtain the `session_id` (e.g. "*1"). Updatable fields include `address`, `port`, interval timings ' + '(`refresh_interval`, `expire_interval`, `retry_interval`, e.g. "10m", "30s", "2h"), `comment`, and ' + "`disabled`. To toggle enabled/disabled only, prefer `set_rpki_session_enabled`. Returns the updated session " + "detail.",
|
|
50377
50561
|
inputSchema: {
|
|
50562
|
+
unset: unsetProperties,
|
|
50378
50563
|
session_id: string().describe('Session id, e.g. "*1"'),
|
|
50379
50564
|
address: string().optional(),
|
|
50380
50565
|
port: number().int().optional(),
|
|
@@ -50392,7 +50577,7 @@ ${result}`;
|
|
|
50392
50577
|
cmd.set("comment", a.comment);
|
|
50393
50578
|
if (a.disabled !== undefined)
|
|
50394
50579
|
cmd.bool("disabled", a.disabled);
|
|
50395
|
-
const built = cmd.build();
|
|
50580
|
+
const built = cmd.unset(a.unset).build();
|
|
50396
50581
|
if (built === base)
|
|
50397
50582
|
return "No updates specified.";
|
|
50398
50583
|
const result = await executeMikrotikCommand2(built, ctx);
|
|
@@ -50572,6 +50757,7 @@ ${result}`;
|
|
|
50572
50757
|
annotations: WRITE_IDEMPOTENT,
|
|
50573
50758
|
description: "Modify an existing policy routing rule (`/routing rule set`) by its `.id` (obtain from `list_routing_rules`). " + 'Pass `""` for `src_address`, `dst_address`, `routing_mark`, `interface`, or `table` to clear that field. ' + "Requires RouterOS v7 with the routing package. For updating static routes use `update_route`. " + "Returns the rule's updated detail after applying changes.",
|
|
50574
50759
|
inputSchema: {
|
|
50760
|
+
unset: unsetProperties,
|
|
50575
50761
|
rule_id: string().describe('Rule id, e.g. "*3"'),
|
|
50576
50762
|
action: _enum(ACTIONS).optional(),
|
|
50577
50763
|
table: string().optional(),
|
|
@@ -50605,7 +50791,7 @@ ${result}`;
|
|
|
50605
50791
|
cmd.set("comment", a.comment);
|
|
50606
50792
|
if (a.disabled !== undefined)
|
|
50607
50793
|
cmd.bool("disabled", a.disabled);
|
|
50608
|
-
const built = cmd.build();
|
|
50794
|
+
const built = cmd.unset(a.unset).build();
|
|
50609
50795
|
if (built === base)
|
|
50610
50796
|
return "No updates specified.";
|
|
50611
50797
|
const result = await executeMikrotikCommand2(built, ctx);
|
|
@@ -50735,6 +50921,7 @@ ${details}`;
|
|
|
50735
50921
|
annotations: WRITE_IDEMPOTENT,
|
|
50736
50922
|
description: "Modifies an existing routing table (`/routing table set [find name=\u2026]`) \u2014 changes its `fib` flag, " + "`comment`, or `disabled` state. " + "To create a new table use `add_routing_table`; to toggle only the enabled/disabled state use `set_routing_table_enabled`. " + "No-ops safely if no optional arguments are provided. " + "Returns the updated table's full detail record on success.",
|
|
50737
50923
|
inputSchema: {
|
|
50924
|
+
unset: unsetProperties,
|
|
50738
50925
|
name: string().describe("Existing routing table name"),
|
|
50739
50926
|
fib: boolean().optional().describe("Install routes into the FIB"),
|
|
50740
50927
|
comment: string().optional(),
|
|
@@ -50749,7 +50936,7 @@ ${details}`;
|
|
|
50749
50936
|
cmd.set("comment", a.comment);
|
|
50750
50937
|
if (a.disabled !== undefined)
|
|
50751
50938
|
cmd.bool("disabled", a.disabled);
|
|
50752
|
-
const built = cmd.build();
|
|
50939
|
+
const built = cmd.unset(a.unset).build();
|
|
50753
50940
|
if (built === base)
|
|
50754
50941
|
return "No updates specified.";
|
|
50755
50942
|
const result = await executeMikrotikCommand2(built, ctx);
|
|
@@ -50806,7 +50993,7 @@ var safeModeTools = [
|
|
|
50806
50993
|
name: "set_safe_mode_timeout",
|
|
50807
50994
|
title: "Set Safe Mode Command Timeouts",
|
|
50808
50995
|
annotations: WRITE,
|
|
50809
|
-
description: "Set per-device MCP Safe Mode command deadlines before or during a session. Applies only to subsequent commands. Increase for slow exports, decrease for faster failure detection. Does not change RouterOS rollback timing
|
|
50996
|
+
description: "Set per-device MCP Safe Mode command deadlines before or during a session. Applies only to subsequent commands. Increase for slow exports, decrease for faster failure detection. Does not change RouterOS rollback timing or MCP client deadlines. Settings are in-memory and reset on MCP restart. Defaults: command 120000ms, idle 15000ms.",
|
|
50810
50997
|
inputSchema: {
|
|
50811
50998
|
commandTimeoutMs: number().int().min(1000).max(600000).describe("Absolute command deadline in milliseconds."),
|
|
50812
50999
|
idleTimeoutMs: number().int().min(1000).max(600000).describe("Maximum silence in milliseconds; must not exceed commandTimeoutMs.")
|
|
@@ -50819,7 +51006,7 @@ var safeModeTools = [
|
|
|
50819
51006
|
name: "safe_mode_status",
|
|
50820
51007
|
title: "Get Safe Mode Session Status",
|
|
50821
51008
|
annotations: READ,
|
|
50822
|
-
description: "Queries the Safe Mode SSH session state for the targeted device \u2014 reports whether a Safe Mode window is currently open (active) or closed." + " Safe Mode (RouterOS Ctrl+X) stages all configuration changes in memory for automatic revert on disconnect; this tool does not modify any state." + " Returns a status string indicating whether Safe Mode is currently active." + " Use enable_safe_mode to open a session, commit_safe_mode to persist staged changes, or rollback_safe_mode to discard them.",
|
|
51009
|
+
description: "Queries the Safe Mode SSH session state for the targeted device \u2014 reports whether a Safe Mode window is currently open (active) or closed, and why the last session was closed automatically, if it was." + " Safe Mode (RouterOS Ctrl+X) stages all configuration changes in memory for automatic revert on disconnect; this tool does not modify any state." + " Returns a status string indicating whether Safe Mode is currently active." + " Use enable_safe_mode to open a session, commit_safe_mode to persist staged changes, or rollback_safe_mode to discard them.",
|
|
50823
51010
|
handler(_a, ctx) {
|
|
50824
51011
|
const device = resolveDeviceName2(ctx.device);
|
|
50825
51012
|
ctx.info(`[${device}] Checking safe mode status`);
|
|
@@ -50834,7 +51021,10 @@ var safeModeTools = [
|
|
|
50834
51021
|
async handler(_a, ctx) {
|
|
50835
51022
|
const device = resolveDeviceName2(ctx.device);
|
|
50836
51023
|
ctx.info(`[${device}] Enabling MikroTik safe mode`);
|
|
50837
|
-
|
|
51024
|
+
const result = await getSafeModeManager2(device).enable();
|
|
51025
|
+
if (result.startsWith("Error"))
|
|
51026
|
+
throw new Error(result.replace(/^Error:\s*/, ""));
|
|
51027
|
+
return result;
|
|
50838
51028
|
}
|
|
50839
51029
|
}),
|
|
50840
51030
|
defineTool2({
|
|
@@ -50845,14 +51035,17 @@ var safeModeTools = [
|
|
|
50845
51035
|
async handler(_a, ctx) {
|
|
50846
51036
|
const device = resolveDeviceName2(ctx.device);
|
|
50847
51037
|
ctx.info(`[${device}] Committing safe mode changes`);
|
|
50848
|
-
|
|
51038
|
+
const result = await getSafeModeManager2(device).commit();
|
|
51039
|
+
if (!result.ok)
|
|
51040
|
+
throw new Error(result.message);
|
|
51041
|
+
return result.message;
|
|
50849
51042
|
}
|
|
50850
51043
|
}),
|
|
50851
51044
|
defineTool2({
|
|
50852
51045
|
name: "rollback_safe_mode",
|
|
50853
51046
|
title: "Roll Back Safe Mode Changes",
|
|
50854
51047
|
annotations: WRITE,
|
|
50855
|
-
description: "Closes the targeted Safe Mode SSH session to request RouterOS automatic rollback. Completion is unverified and may be delayed; compare live configuration against a backup before retrying writes." + " Use this when staged changes are incorrect or need to be abandoned without saving." + " To persist staged changes instead, use commit_safe_mode." + " Check current Safe Mode state with safe_mode_status.",
|
|
51048
|
+
description: "Closes the targeted Safe Mode SSH session to request RouterOS automatic rollback. Completion is unverified and may be delayed; compare live configuration against a backup before retrying writes. A session that times out or loses its prompt is closed automatically, so this tool is never required to recover." + " Use this when staged changes are incorrect or need to be abandoned without saving." + " To persist staged changes instead, use commit_safe_mode." + " Check current Safe Mode state with safe_mode_status.",
|
|
50856
51049
|
async handler(_a, ctx) {
|
|
50857
51050
|
const device = resolveDeviceName2(ctx.device);
|
|
50858
51051
|
ctx.info(`[${device}] Rolling back safe mode changes`);
|
|
@@ -53404,7 +53597,7 @@ var riskByTool = null;
|
|
|
53404
53597
|
async function riskIndex() {
|
|
53405
53598
|
if (riskByTool)
|
|
53406
53599
|
return riskByTool;
|
|
53407
|
-
const { moduleCatalog } = await import("./library-
|
|
53600
|
+
const { moduleCatalog } = await import("./library-vtet3w1h.js");
|
|
53408
53601
|
const index = new Map;
|
|
53409
53602
|
for (const mod of moduleCatalog) {
|
|
53410
53603
|
for (const tool of mod.tools)
|
|
@@ -57298,7 +57491,7 @@ var capabilityTools = [
|
|
|
57298
57491
|
];
|
|
57299
57492
|
|
|
57300
57493
|
// src/tools/alerts.ts
|
|
57301
|
-
var NO_ENGINE = "Alerting is not configured. Add an `alerts` block to your config file with at least one " + "channel, then reload \u2014 see
|
|
57494
|
+
var NO_ENGINE = "Alerting is not configured. Add an `alerts` block to your config file with at least one " + "channel, then reload \u2014 see the Alerting guide in the documentation website.";
|
|
57302
57495
|
function renderRules() {
|
|
57303
57496
|
const engine = getAlertEngine();
|
|
57304
57497
|
if (!engine)
|
|
@@ -57863,6 +58056,7 @@ ${result}`;
|
|
|
57863
58056
|
|
|
57864
58057
|
` + "Returns updated switch details on success.",
|
|
57865
58058
|
inputSchema: {
|
|
58059
|
+
unset: unsetProperties,
|
|
57866
58060
|
switch_id: string().describe("Switch name (e.g. 'switch1') or RouterOS '.id'"),
|
|
57867
58061
|
name: string().optional().describe("Rename the switch"),
|
|
57868
58062
|
cpu_flow_control: boolean().optional(),
|
|
@@ -57877,7 +58071,7 @@ ${result}`;
|
|
|
57877
58071
|
const selector = a.switch_id.startsWith("*") ? `.id="${a.switch_id}"` : `name="${a.switch_id}"`;
|
|
57878
58072
|
const base = `/interface ethernet switch set [find ${selector}]`;
|
|
57879
58073
|
const cmd = new Cmd(base).opt("name", a.name).bool("cpu-flow-control", a.cpu_flow_control).opt("mirror-source", a.mirror_source).opt("mirror-target", a.mirror_target).opt("mirror-egress", a.mirror_egress).opt("mirror-egress-target", a.mirror_egress_target).bool("switch-all-ports", a.switch_all_ports);
|
|
57880
|
-
const built = cmd.build();
|
|
58074
|
+
const built = cmd.unset(a.unset).build();
|
|
57881
58075
|
if (built === base)
|
|
57882
58076
|
return "No updates specified.";
|
|
57883
58077
|
const result = await executeMikrotikCommand2(built, ctx);
|
|
@@ -57950,6 +58144,7 @@ ${result}`;
|
|
|
57950
58144
|
` + ` 'always-strip', or 'add-if-missing'.
|
|
57951
58145
|
` + " default_vlan_id: PVID for untagged ingress ('auto', 'none', or a number).",
|
|
57952
58146
|
inputSchema: {
|
|
58147
|
+
unset: unsetProperties,
|
|
57953
58148
|
port_id: string().describe("Port name (e.g. 'ether1') or RouterOS '.id'"),
|
|
57954
58149
|
default_vlan_id: string().optional().describe("PVID: 'auto', 'none', or a VLAN id number"),
|
|
57955
58150
|
vlan_mode: VlanMode.optional(),
|
|
@@ -57961,7 +58156,7 @@ ${result}`;
|
|
|
57961
58156
|
const selector = a.port_id.startsWith("*") ? `.id="${a.port_id}"` : `name="${a.port_id}"`;
|
|
57962
58157
|
const base = `/interface ethernet switch port set [find ${selector}]`;
|
|
57963
58158
|
const cmd = new Cmd(base).opt("default-vlan-id", a.default_vlan_id).opt("vlan-mode", a.vlan_mode).opt("vlan-header", a.vlan_header).bool("force-vlan-id", a.force_vlan_id);
|
|
57964
|
-
const built = cmd.build();
|
|
58159
|
+
const built = cmd.unset(a.unset).build();
|
|
57965
58160
|
if (built === base)
|
|
57966
58161
|
return "No updates specified.";
|
|
57967
58162
|
const result = await executeMikrotikCommand2(built, ctx);
|
|
@@ -58057,6 +58252,7 @@ ${result}`;
|
|
|
58057
58252
|
|
|
58058
58253
|
` + "Returns the entry's updated detail block.",
|
|
58059
58254
|
inputSchema: {
|
|
58255
|
+
unset: unsetProperties,
|
|
58060
58256
|
isolation_id: string().describe("Source port name or RouterOS '.id'"),
|
|
58061
58257
|
forwarding_override_ports: string().optional().describe("Comma-separated allowed destination ports"),
|
|
58062
58258
|
comment: string().optional()
|
|
@@ -58068,7 +58264,7 @@ ${result}`;
|
|
|
58068
58264
|
const cmd = new Cmd(base).opt("forwarding-override-ports", a.forwarding_override_ports);
|
|
58069
58265
|
if (a.comment !== undefined)
|
|
58070
58266
|
cmd.raw(`comment=${quoteValue(a.comment)}`);
|
|
58071
|
-
const built = cmd.build();
|
|
58267
|
+
const built = cmd.unset(a.unset).build();
|
|
58072
58268
|
if (built === base)
|
|
58073
58269
|
return "No updates specified.";
|
|
58074
58270
|
const result = await executeMikrotikCommand2(built, ctx);
|
|
@@ -58107,7 +58303,7 @@ ${details}`;
|
|
|
58107
58303
|
// src/tools/switch-rule.ts
|
|
58108
58304
|
async function updateSwitchRule(a, ctx) {
|
|
58109
58305
|
ctx.info(`Updating switch rule: rule_id=${a.rule_id}`);
|
|
58110
|
-
const updates =
|
|
58306
|
+
const updates = unsetFragments(a.unset);
|
|
58111
58307
|
const put = (key, val) => {
|
|
58112
58308
|
if (val === undefined)
|
|
58113
58309
|
return;
|
|
@@ -58255,6 +58451,7 @@ ${result}`;
|
|
|
58255
58451
|
annotations: WRITE_IDEMPOTENT,
|
|
58256
58452
|
description: "Modifies an existing hardware switch ACL/redirect rule " + "(`/interface ethernet switch rule set`) by `.id`. " + "Use this to change match criteria (ports, addresses, VLAN, protocol) or actions " + "(redirect target ports, mirror, rate limit, disabled state). " + 'Pass an empty string ("") for any optional field to clear it. ' + "`rule_id` takes the `.id` from list_switch_rules. Returns the updated rule's full detail. " + "For software firewall rule edits use update_filter_rule; " + "to only toggle the enabled state use enable_switch_rule or disable_switch_rule.",
|
|
58257
58453
|
inputSchema: {
|
|
58454
|
+
unset: unsetProperties,
|
|
58258
58455
|
rule_id: string(),
|
|
58259
58456
|
switch: string().optional(),
|
|
58260
58457
|
ports: string().optional(),
|
|
@@ -59340,6 +59537,7 @@ ${redactSecrets(result)}`;
|
|
|
59340
59537
|
annotations: WRITE_IDEMPOTENT,
|
|
59341
59538
|
description: "Modifies an existing User Manager RADIUS user (`/user-manager user set [find name=...]`)" + " \u2014 change name, password, group, shared-users limit, RADIUS attributes, comment, or" + " enabled/disabled state. Locate the user by its current `name` (from" + " list_user_manager_users or get_user_manager_user). Returns the updated record with" + " secrets redacted. To permanently delete the user use remove_user_manager_user.",
|
|
59342
59539
|
inputSchema: {
|
|
59540
|
+
unset: unsetProperties,
|
|
59343
59541
|
name: string().describe("Current name of the user to update"),
|
|
59344
59542
|
new_name: string().optional(),
|
|
59345
59543
|
password: string().optional(),
|
|
@@ -59353,8 +59551,8 @@ ${redactSecrets(result)}`;
|
|
|
59353
59551
|
},
|
|
59354
59552
|
async handler(a, ctx) {
|
|
59355
59553
|
ctx.info(`Updating User Manager user: name=${a.name}`);
|
|
59356
|
-
const cmd = new Cmd(`/user-manager user set [find name="${a.name}"]`).opt("name", a.new_name).opt("password", a.password).opt("group", a.group).opt("shared-users", a.shared_users).opt("attributes", a.attributes).opt("caller-id", a.caller_id).opt("otp-secret", a.otp_secret).opt("comment", a.comment).bool("disabled", a.disabled).build();
|
|
59357
|
-
if (
|
|
59554
|
+
const cmd = new Cmd(`/user-manager user set [find name="${a.name}"]`).opt("name", a.new_name).opt("password", a.password).opt("group", a.group).opt("shared-users", a.shared_users).opt("attributes", a.attributes).opt("caller-id", a.caller_id).opt("otp-secret", a.otp_secret).opt("comment", a.comment).bool("disabled", a.disabled).unset(a.unset).build();
|
|
59555
|
+
if (!/[=!]/.test(cmd.slice(cmd.indexOf("]"))))
|
|
59358
59556
|
return "No updates specified.";
|
|
59359
59557
|
const result = await executeMikrotikCommand2(cmd, ctx);
|
|
59360
59558
|
if (commandUnsupported(result))
|
|
@@ -60345,6 +60543,7 @@ ${result}`;
|
|
|
60345
60543
|
annotations: WRITE_IDEMPOTENT,
|
|
60346
60544
|
description: 'Modifies properties of an existing VLAN sub-interface (`/interface vlan set [find name="..."]`).' + " Accepts any subset of the create parameters; omit fields to leave them unchanged." + " Supply the current `name` from `list_vlan_interfaces` or `get_vlan_interface`; use `new_name` to rename the interface." + " For creating a new VLAN interface use `create_vlan_interface`; to permanently delete use `remove_vlan_interface`." + " Returns the updated interface's full detail after applying the change." + " ARP mode accepts: enabled, disabled, proxy-arp, reply-only.",
|
|
60347
60545
|
inputSchema: {
|
|
60546
|
+
unset: unsetProperties,
|
|
60348
60547
|
name: string().describe("Current name of the VLAN interface to update"),
|
|
60349
60548
|
new_name: interfaceName().optional().describe("Rename the interface to this (no spaces)."),
|
|
60350
60549
|
vlan_id: number().int().min(1).max(4094).optional(),
|
|
@@ -60362,8 +60561,8 @@ ${result}`;
|
|
|
60362
60561
|
},
|
|
60363
60562
|
async handler(a, ctx) {
|
|
60364
60563
|
ctx.info(`Updating VLAN interface: name=${a.name}`);
|
|
60365
|
-
const cmd = new Cmd(`/interface vlan set [find name="${a.name}"]`).opt("name", a.new_name).opt("vlan-id", a.vlan_id).opt("interface", a.interface).opt("comment", a.comment).bool("disabled", a.disabled).opt("mtu", a.mtu).opt("forced-mac-address", a.forced_mac_address).bool("use-service-tag", a.use_service_tag).opt("arp", a.arp).opt("arp-timeout", a.arp_timeout).opt("loop-protect", a.loop_protect).opt("loop-protect-disable-time", a.loop_protect_disable_time).opt("loop-protect-send-interval", a.loop_protect_send_interval).build();
|
|
60366
|
-
if (
|
|
60564
|
+
const cmd = new Cmd(`/interface vlan set [find name="${a.name}"]`).opt("name", a.new_name).opt("vlan-id", a.vlan_id).opt("interface", a.interface).opt("comment", a.comment).bool("disabled", a.disabled).opt("mtu", a.mtu).opt("forced-mac-address", a.forced_mac_address).bool("use-service-tag", a.use_service_tag).opt("arp", a.arp).opt("arp-timeout", a.arp_timeout).opt("loop-protect", a.loop_protect).opt("loop-protect-disable-time", a.loop_protect_disable_time).opt("loop-protect-send-interval", a.loop_protect_send_interval).unset(a.unset).build();
|
|
60565
|
+
if (!/[=!]/.test(cmd.slice(cmd.indexOf("]"))))
|
|
60367
60566
|
return "No updates specified.";
|
|
60368
60567
|
const result = await executeMikrotikCommand2(cmd, ctx);
|
|
60369
60568
|
if (looksLikeError(result))
|
|
@@ -60683,6 +60882,7 @@ ${peerBlock}`;
|
|
|
60683
60882
|
annotations: WRITE_IDEMPOTENT,
|
|
60684
60883
|
description: "Modifies settings on an existing WireGuard tunnel interface (`/interface wireguard set [find name=]`)" + " \u2014 rename (new_name), change listen-port, rotate private-key, adjust MTU, or toggle disabled state." + " Only supplied fields are changed; omitted fields are left as-is." + " For updating remote peers use update_wireguard_peer." + " Returns the updated interface's detail.",
|
|
60685
60884
|
inputSchema: {
|
|
60885
|
+
unset: unsetProperties,
|
|
60686
60886
|
name: string(),
|
|
60687
60887
|
new_name: interfaceName().optional().describe("Rename the interface to this (no spaces)."),
|
|
60688
60888
|
listen_port: number().int().optional(),
|
|
@@ -60694,7 +60894,7 @@ ${peerBlock}`;
|
|
|
60694
60894
|
async handler(a, ctx) {
|
|
60695
60895
|
ctx.info(`Updating WireGuard interface: name=${a.name}`);
|
|
60696
60896
|
const base = `/interface wireguard set [find name="${a.name}"]`;
|
|
60697
|
-
const cmd = new Cmd(base).opt("name", a.new_name).opt("listen-port", a.listen_port).opt("private-key", a.private_key).opt("mtu", a.mtu).raw(a.comment !== undefined ? `comment=${quoteValue(a.comment)}` : null).bool("disabled", a.disabled).build();
|
|
60897
|
+
const cmd = new Cmd(base).opt("name", a.new_name).opt("listen-port", a.listen_port).opt("private-key", a.private_key).opt("mtu", a.mtu).raw(a.comment !== undefined ? `comment=${quoteValue(a.comment)}` : null).bool("disabled", a.disabled).unset(a.unset).build();
|
|
60698
60898
|
if (cmd === base)
|
|
60699
60899
|
return "No updates specified.";
|
|
60700
60900
|
const result = await executeMikrotikCommand2(cmd, ctx);
|
|
@@ -60859,6 +61059,7 @@ ${result}`;
|
|
|
60859
61059
|
` + ` persistent_keepalive: seconds as string e.g. "25"
|
|
60860
61060
|
` + ' Pass "" for endpoint_address or preshared_key to clear them.',
|
|
60861
61061
|
inputSchema: {
|
|
61062
|
+
unset: unsetProperties,
|
|
60862
61063
|
peer_id: string().describe('"*N" or "N" from list output e.g. "*2"'),
|
|
60863
61064
|
public_key: string().optional().describe("The peer's base64 public key \u2014 re-key a peer in place instead of removing and " + "re-adding it (which would lose the rest of its configuration)."),
|
|
60864
61065
|
allowed_address: string().optional(),
|
|
@@ -60884,7 +61085,7 @@ ${result}`;
|
|
|
60884
61085
|
if (!id)
|
|
60885
61086
|
return peerNotFound(a.peer_id);
|
|
60886
61087
|
const base = `/interface wireguard peers set ${id}`;
|
|
60887
|
-
const cmd = new Cmd(base).raw(a.public_key !== undefined ? `public-key=${quoteValue(a.public_key)}` : null).raw(a.allowed_address !== undefined ? `allowed-address=${quoteValue(a.allowed_address)}` : null).raw(a.endpoint_address !== undefined ? a.endpoint_address === "" ? "!endpoint-address" : `endpoint-address=${quoteValue(a.endpoint_address)}` : null).opt("endpoint-port", a.endpoint_port).raw(a.preshared_key !== undefined ? a.preshared_key === "" ? "!preshared-key" : `preshared-key=${quoteValue(a.preshared_key)}` : null).raw(a.persistent_keepalive !== undefined ? `persistent-keepalive=${a.persistent_keepalive}` : null).opt("name", a.name).opt("private-key", a.private_key).bool("responder", a.responder).raw(a.client_address !== undefined ? a.client_address === "" ? "!client-address" : `client-address=${quoteValue(a.client_address)}` : null).raw(a.client_dns !== undefined ? a.client_dns === "" ? "!client-dns" : `client-dns=${quoteValue(a.client_dns)}` : null).raw(a.client_endpoint !== undefined ? a.client_endpoint === "" ? "!client-endpoint" : `client-endpoint=${quoteValue(a.client_endpoint)}` : null).opt("client-keepalive", a.client_keepalive).raw(a.client_listen_port === "" ? "!client-listen-port" : null).opt("client-listen-port", a.client_listen_port === "" ? undefined : a.client_listen_port).opt("client-mtu", a.client_mtu).raw(a.comment !== undefined ? `comment=${quoteValue(a.comment)}` : null).bool("disabled", a.disabled).build();
|
|
61088
|
+
const cmd = new Cmd(base).raw(a.public_key !== undefined ? `public-key=${quoteValue(a.public_key)}` : null).raw(a.allowed_address !== undefined ? `allowed-address=${quoteValue(a.allowed_address)}` : null).raw(a.endpoint_address !== undefined ? a.endpoint_address === "" ? "!endpoint-address" : `endpoint-address=${quoteValue(a.endpoint_address)}` : null).opt("endpoint-port", a.endpoint_port).raw(a.preshared_key !== undefined ? a.preshared_key === "" ? "!preshared-key" : `preshared-key=${quoteValue(a.preshared_key)}` : null).raw(a.persistent_keepalive !== undefined ? `persistent-keepalive=${a.persistent_keepalive}` : null).opt("name", a.name).opt("private-key", a.private_key).bool("responder", a.responder).raw(a.client_address !== undefined ? a.client_address === "" ? "!client-address" : `client-address=${quoteValue(a.client_address)}` : null).raw(a.client_dns !== undefined ? a.client_dns === "" ? "!client-dns" : `client-dns=${quoteValue(a.client_dns)}` : null).raw(a.client_endpoint !== undefined ? a.client_endpoint === "" ? "!client-endpoint" : `client-endpoint=${quoteValue(a.client_endpoint)}` : null).opt("client-keepalive", a.client_keepalive).raw(a.client_listen_port === "" ? "!client-listen-port" : null).opt("client-listen-port", a.client_listen_port === "" ? undefined : a.client_listen_port).opt("client-mtu", a.client_mtu).raw(a.comment !== undefined ? `comment=${quoteValue(a.comment)}` : null).bool("disabled", a.disabled).unset(a.unset).build();
|
|
60888
61089
|
if (cmd === base)
|
|
60889
61090
|
return "No updates specified.";
|
|
60890
61091
|
const result = await executeMikrotikCommand2(cmd, ctx);
|
|
@@ -61587,6 +61788,7 @@ ${redactSecrets(result)}`;
|
|
|
61587
61788
|
annotations: WRITE_IDEMPOTENT,
|
|
61588
61789
|
description: "Updates settings on an existing named wireless interface (`<auto-detected path> set [find name=...] ...`). " + "Supports renaming (new_name), changing SSID, toggling disabled state, and updating comment. " + "Verifies the interface exists before applying; returns 'No updates specified.' if no optional fields are provided. " + "To only enable or disable the interface prefer enable_wireless_interface or disable_wireless_interface; " + "to create a new interface use create_wireless_interface; to delete one use remove_wireless_interface. " + "Returns the updated interface's full detail print.",
|
|
61589
61790
|
inputSchema: {
|
|
61791
|
+
unset: unsetProperties,
|
|
61590
61792
|
name: string(),
|
|
61591
61793
|
new_name: interfaceName().optional().describe("Rename the interface to this (no spaces)."),
|
|
61592
61794
|
ssid: string().optional(),
|
|
@@ -61621,8 +61823,8 @@ ${redactSecrets(result)}`;
|
|
|
61621
61823
|
const count = await executeMikrotikCommand2(`${interfaceType} print count-only where name="${a.name}"`, ctx);
|
|
61622
61824
|
if (count.trim() === "0")
|
|
61623
61825
|
return `Wireless interface '${a.name}' not found.`;
|
|
61624
|
-
const cmd = new Cmd(`${interfaceType} set [find name="${a.name}"]`).opt("name", a.new_name).opt("ssid", a.ssid).bool("disabled", a.disabled).opt("comment", a.comment).opt("mtu", a.mtu).opt("arp", a.arp).bool("hide-ssid", a.hide_ssid).opt("wireless-protocol", a.wireless_protocol).opt("scan-list", a.scan_list).opt("frequency", a.frequency).opt("band", a.band).opt("channel-width", a.channel_width).opt("frequency-mode", a.frequency_mode).opt("country", a.country).opt("antenna-gain", a.antenna_gain).opt("wds-mode", a.wds_mode).opt("wds-default-bridge", a.wds_default_bridge).bool("default-authentication", a.default_authentication).bool("default-forwarding", a.default_forwarding).opt("tx-power", a.tx_power).opt("tx-power-mode", a.tx_power_mode).opt("distance", a.distance).opt("disconnect-timeout", a.disconnect_timeout).opt("security-profile", a.security_profile).build();
|
|
61625
|
-
if (
|
|
61826
|
+
const cmd = new Cmd(`${interfaceType} set [find name="${a.name}"]`).opt("name", a.new_name).opt("ssid", a.ssid).bool("disabled", a.disabled).opt("comment", a.comment).opt("mtu", a.mtu).opt("arp", a.arp).bool("hide-ssid", a.hide_ssid).opt("wireless-protocol", a.wireless_protocol).opt("scan-list", a.scan_list).opt("frequency", a.frequency).opt("band", a.band).opt("channel-width", a.channel_width).opt("frequency-mode", a.frequency_mode).opt("country", a.country).opt("antenna-gain", a.antenna_gain).opt("wds-mode", a.wds_mode).opt("wds-default-bridge", a.wds_default_bridge).bool("default-authentication", a.default_authentication).bool("default-forwarding", a.default_forwarding).opt("tx-power", a.tx_power).opt("tx-power-mode", a.tx_power_mode).opt("distance", a.distance).opt("disconnect-timeout", a.disconnect_timeout).opt("security-profile", a.security_profile).unset(a.unset).build();
|
|
61827
|
+
if (!/[=!]/.test(cmd.slice(cmd.indexOf("]"))))
|
|
61626
61828
|
return "No updates specified.";
|
|
61627
61829
|
const result = await executeMikrotikCommand2(cmd, ctx);
|
|
61628
61830
|
if (looksLikeError(result))
|