@mgsoftwarebv/mg-dashboard-mcp 6.6.1 → 6.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -19,6 +19,7 @@ import { readFile, mkdtemp, writeFile, rm } from 'fs/promises';
19
19
  import { tmpdir } from 'os';
20
20
  import { once } from 'events';
21
21
  import https from 'https';
22
+ import { lookup } from 'dns/promises';
22
23
  import { connect } from 'tls';
23
24
  import { HeadObjectCommand, S3Client, ListObjectsV2Command, DeleteObjectsCommand, DeleteObjectCommand, CreateMultipartUploadCommand, UploadPartCommand, CompleteMultipartUploadCommand, AbortMultipartUploadCommand, PutObjectCommand, GetObjectCommand, CopyObjectCommand } from '@aws-sdk/client-s3';
24
25
 
@@ -1570,7 +1571,13 @@ async function fetchViaSshProxy(options) {
1570
1571
  const timeoutMs = options.timeoutMs ?? 6e4;
1571
1572
  let timer;
1572
1573
  try {
1573
- const stream = await forwardOut(ssh, targetHost, targetPort);
1574
+ let connectHost = targetHost;
1575
+ try {
1576
+ const resolved = await lookup(targetHost, { family: 4 });
1577
+ connectHost = resolved.address;
1578
+ } catch {
1579
+ }
1580
+ const stream = await forwardOut(ssh, connectHost, targetPort);
1574
1581
  const tlsSocket = connect({
1575
1582
  socket: stream,
1576
1583
  servername: targetHost,
@@ -4027,7 +4034,7 @@ async function mijnhostFetch(path, options = {}) {
4027
4034
  "API-Key": key,
4028
4035
  "Accept": "application/json",
4029
4036
  "Content-Type": "application/json",
4030
- "User-Agent": "mg-dashboard-mcp/6.6.0",
4037
+ "User-Agent": "mg-dashboard-mcp/6.6.2",
4031
4038
  ...options.headers || {}
4032
4039
  };
4033
4040
  const method = options.method ?? "GET";