feat(MikrotikTools): add configurable DNS usage option in traceroute for flexible user preferences
Publish Fast Tabler Docker image / build-and-push-fast (push) Failing after 2m23s
Publish Fast Tabler Docker image / build-and-push-fast (push) Failing after 2m23s
This commit is contained in:
@@ -558,6 +558,7 @@ async function tracerouteViaGateway(req, res) {
|
||||
target,
|
||||
gatewayIp,
|
||||
maxHops = 30,
|
||||
useDns = true,
|
||||
} = req.body || {};
|
||||
|
||||
if (!serverId) {
|
||||
@@ -705,8 +706,8 @@ async function tracerouteViaGateway(req, res) {
|
||||
if (!Number.isFinite(countNum) || countNum <= 0) countNum = 1;
|
||||
body.count = countNum;
|
||||
|
||||
// Включаем reverse DNS (как use-dns=yes), чтобы видеть имена
|
||||
body['use-dns'] = 'yes';
|
||||
// Включаем/отключаем reverse DNS (как use-dns=yes/no)
|
||||
body['use-dns'] = useDns ? 'yes' : 'no';
|
||||
|
||||
const hopsNum = Number(maxHops);
|
||||
if (Number.isFinite(hopsNum) && hopsNum > 0) {
|
||||
|
||||
@@ -89,6 +89,7 @@ function MikrotikTools() {
|
||||
const body = {
|
||||
serverId,
|
||||
target: String(target).trim(),
|
||||
useDns,
|
||||
};
|
||||
// gatewayRef может быть как ID gateway, так и IP/строка —
|
||||
// для простоты, если в meta есть ip — используем его как gatewayIp.
|
||||
|
||||
Reference in New Issue
Block a user