Skip to main content
Glama
dns.ts914 B
/** * @file DNS Module Compiler * @description Compiles DNS configuration commands */ import type { DnsParams, ModuleCommands, DeviceFacts } from '../types.js'; export function compileDns( facts: DeviceFacts, params: DnsParams ): ModuleCommands { const commands: string[] = []; const rollbackCommands: string[] = []; const servers = params.servers.join(','); const allowRemote = params.allowRemoteRequests ? 'yes' : 'no'; commands.push( `/ip dns set servers=${servers} allow-remote-requests=${allowRemote}` ); // Rollback to current DNS settings const currentServers = facts.dnsServers?.join(',') || ''; rollbackCommands.push( `/ip dns set servers=${currentServers} allow-remote-requests=no` ); return { module: 'dns', title: 'DNS Configuration', commands, rollbackCommands, risk: 'low', }; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/babasida246/ai-mcp-gateway'

If you have feedback or need assistance with the MCP directory API, please join our Discord server