{{ item.summary }}
公网变更同步 自动开启
设备心跳上报公网 IP 变更后,自动同步相关 GRE / IPIP 规划、串联复用接口,以及巡检中允许同步且确认配对的隧道公网地址,并检查隧道连通性。发现时间取决于设备心跳;暂时无法连接时会持续重试。
诊断 / 自动修复 · {{ tunnelRepairName }}
实时读取两端接口、公网地址并测试隧道双向 Ping。先查看原因和拟修复项,再执行自动修复。
{{ tunnelRepairEndpointLabel(endpoint.endpoint) }} · {{ endpoint.device_name || endpoint.device_id }}
拟修复项
| 端点 | 参数 | 当前值 | 修复后 | 原因 |
|---|---|---|---|---|
| {{ tunnelRepairEndpointLabel(action.endpoint) }} | {{ tunnelRepairFieldLabel(action.field) }} | {{ tunnelRepairValue(action.field, action.before) }} | {{ tunnelRepairValue(action.field, action.after) }} | {{ action.reason }} |
最近修复任务:{{ tunnelRepairJobStatusLabel(tunnelRepairJob.status) }}
| 阶段 | 端点 | 说明 |
|---|---|---|
| {{ tunnelRepairPhaseLabel(event.phase) }} | {{ event.endpoint ? tunnelRepairEndpointLabel(event.endpoint) : '双端' }} | {{ event.message }} |
本次回滚结果
| 端点 | 恢复结果 | 说明 |
|---|---|---|
| {{ tunnelRepairEndpointLabel(result.endpoint) }} | {{ result.ok ? '已恢复' : '未确认' }} | {{ result.error || result.message || (result.ok ? '本次改动已恢复到修复前' : '请核对该端现场配置') }} |
设备注册参数
RouterOS 脚本
{{ generated.script }}
极简救援脚本
{{ generated.rescue_script }}
配置意图分析
从设备的最新成功配置快照和隧道台账归纳隧道、路由、策略、安全与出口用途。分析只读,不会修改 RouterOS。
{{ selectedDevice.identity }} · 分析结果
识别出的功能模块
- {{ intent.title }}
{{ intent.reason }}
实现:{{ intent.implementation }}
建议:{{ intent.actions.join(';') }}{{ intent.count }} 项 - 暂未识别到足够的功能证据
隧道与对端
| 接口 | 类型 | 本地 / 对端 | 安全 | 承载路由 |
|---|---|---|---|---|
{{ tunnel.name || '-' }} | {{ tunnel.kind }} | {{ tunnel.local || '-' }} → {{ tunnel.remote || '-' }} | {{ tunnel.ipsec_configured ? 'IPsec 证据' : '未识别' }} · keepalive={{ tunnel.keepalive }} | {{ tunnel.routes || 0 }} |
没有解析出 GRE / IPIP 隧道。请先抓取成功的完整配置。
路由与流量方向
{{ route.dst }}
{{ route.gateway }}{{ route.table ? ` · ${route.table}` : '' }}{{ route.intent }}- 没有解析出静态路由
接口地址与网段
{{ address.interface || '未指定接口' }}{{ address.address }}- 没有解析出接口地址
受控设备
| 设备名 | 区域 | 公网 IP | DDNS | SSH | API | 版本 | 最近心跳 | 配置 |
|---|---|---|---|---|---|---|---|---|
| {{ device.identity }} | {{ device.region || device.site }} | {{ publicIpText(device) }} |
中控 {{ device.ddns_hostname || '-' }}
上报 {{ reportedHostname(device) }}
脚本
{{ configDdnsHostnames(device) || (device.config_ddns && device.config_ddns.detected ? '已识别未提取域名' : '-') }}
{{ device.ddns_last_ip || device.ddns_status || configDdnsProviders(device) || '' }}
|
{{ device.ssh_port || '-' }} {{ connectionProxyLabel(device.connection_proxy) }} |
{{ device.api_enabled ? (device.api_port || (device.api_use_ssl ? 8729 : 8728)) : 'off' }}
{{ device.api_last_status || '' }}
|
{{ device.routeros_version || '-' }} | {{ fmt(device.last_seen_at) }} | {{ device.latest_config_status || 'none' }} |
设备详情
- 设备名
- {{ selectedDevice.identity }}
- 区域
- {{ selectedDevice.region || selectedDevice.site }}
- 公网 IP
- {{ publicIpText(selectedDevice) }}
- 连接地址
- {{ connectionHost(selectedDevice) }}
- 中控连接代理
- {{ connectionProxyLabel(selectedDevice.connection_proxy) }}
- 中控 DDNS
- {{ selectedDevice.ddns_hostname || '-' }} {{ selectedDevice.ddns_status || '' }} {{ fmt(selectedDevice.ddns_updated_at) }}
- 脚本/计划 DDNS
- {{ configDdnsHostnames(selectedDevice) || (selectedDevice.config_ddns && selectedDevice.config_ddns.detected ? '已识别未提取域名' : '-') }} {{ [reportedHostname(selectedDevice), configDdnsProviders(selectedDevice)].filter(Boolean).join(' · ') }}
- SSH
- {{ selectedDevice.ssh_username }}@{{ connectionHost(selectedDevice) }}:{{ selectedDevice.ssh_port || 22 }}
- API
- {{ selectedDevice.api_enabled ? `${selectedDevice.api_username || selectedDevice.ssh_username || 'admin'}@${selectedDevice.public_ip_override || selectedDevice.public_ip || '-'}:${selectedDevice.api_port || (selectedDevice.api_use_ssl ? 8729 : 8728)}` : '关闭' }} {{ selectedDevice.api_last_status || '' }} {{ fmt(selectedDevice.api_last_checked_at) }}
- 命令
- {{ selectedDevice.config_command }}
- 最近心跳
- {{ fmt(selectedDevice.last_seen_at) }}
SSH 与抓取参数
RouterOS API 控制
{{ pretty(apiResult) }}
配置快照
配置意图分析 · {{ selectedDevice.identity }}
识别出的功能模块
- {{ intent.title }}
{{ intent.reason }}
实现:{{ intent.implementation }}
建议:{{ intent.actions.join(';') }}{{ intent.count }} 项 - 暂未识别到足够的功能证据
隧道与对端
| 接口 | 类型 | 本地 / 对端 | 安全 | 承载路由 |
|---|---|---|---|---|
{{ tunnel.name || '-' }} | {{ tunnel.kind }} | {{ tunnel.local || '-' }} → {{ tunnel.remote || '-' }} | {{ tunnel.ipsec_configured ? 'IPsec 证据' : '未识别' }} · keepalive={{ tunnel.keepalive }} | {{ tunnel.routes || 0 }} |
没有解析出 GRE / IPIP 隧道。请先抓取成功的完整配置。
路由与流量方向
{{ route.dst }}
{{ route.gateway }}{{ route.table ? ` · ${route.table}` : '' }}{{ route.intent }}- 没有解析出静态路由
仅显示前 12 条;完整明细请打开配置快照。
接口地址与网段
{{ address.interface || '未指定接口' }}{{ address.address }}- 没有解析出接口地址
| 时间 | 触发 | 状态 | 大小 | 错误 | |
|---|---|---|---|---|---|
| {{ fmt(cfg.collected_at) }} | {{ cfg.trigger }} | {{ cfg.status }} | {{ cfg.config_size || 0 }} | {{ cfg.error || '-' }} |
日志采集记录
| 采集时间 | 级别 | 主题 | 消息 |
|---|---|---|---|
| {{ fmt(deviceLogTime(log)) }} 设备时间:{{ log.device_timestamp }} |
{{ deviceLogTypeLabel(deviceLogTypeValue(log)) }} | {{ deviceLogTopics(log) }} | {{ deviceLogMessage(log) }} |
最近心跳
| 时间 | 公网 IP | 版本 | Uptime |
|---|---|---|---|
| {{ fmt(hb.received_at) }} | {{ hb.public_ip || '-' }} | {{ hb.routeros_version || '-' }} | {{ hb.uptime || '-' }} |
最新配置:{{ latestConfig.status }}
{{ latestConfig.config_text || latestConfig.error }}
全网维护
服务器备份
| 文件 | 大小 | 时间 |
|---|---|---|
| {{ item.name }} | {{ formatBytes(item.size) }} | {{ fmt(item.mtime) }} |
维护问题
| 级别 | 类别 | 设备 | 问题 | 建议 |
|---|---|---|---|---|
| {{ severityLabel(issue.severity) }} | {{ issue.category }} | {{ issue.device_name || '-' }} |
{{ issue.title }}
{{ issue.detail }}
|
{{ issue.recommendation }} |
设备健康
| 设备 | 区域 | 公网 | 心跳 | 配置 | 配置对象 |
|---|---|---|---|---|---|
| {{ device.identity }} | {{ device.region || '-' }} | {{ publicIpText(device) }} |
{{ healthLabel(device.health) }}
{{ fmt(device.last_seen_at) }} · {{ ageLabel(device.last_seen_age_seconds) }}
|
{{ healthLabel(device.config_health) }}
{{ device.latest_config_status || '-' }} · {{ fmt(device.config_collected_at || device.latest_config_at) }}
|
隧道 {{ device.counts.tunnels }} / 路由 {{ device.counts.routes }} / 地址 {{ device.counts.addresses }} /
脚本 {{ device.counts.scripts }} / 计划 {{ device.counts.schedulers }}
{{ device.automation ? device.automation.summary : '' }}
|
自动化与 DDNS 分析
| 设备 | 状态 | DDNS | 脚本/计划 | 关注项 | 建议 |
|---|---|---|---|---|---|
| {{ device.identity }} | {{ healthLabel(device.automation ? device.automation.status : 'info') }} |
controller
{{ (device.automation.ddns.providers || []).join(', ') || 'local' }}
未识别
中控 {{ device.automation && device.automation.ddns.controller_hostname ? device.automation.ddns.controller_hostname : '-' }}
脚本 {{ automationDdnsHostnames(device) || '-' }}
|
{{ device.automation ? device.automation.counts.scripts : 0 }} / {{ device.automation ? device.automation.counts.schedulers : 0 }} | 异常计划 {{ device.automation ? device.automation.counts.broken_schedulers : 0 }} / 孤立脚本 {{ device.automation ? device.automation.counts.orphan_scripts : 0 }} / 高权限 {{ device.automation ? device.automation.counts.high_privilege_scripts : 0 }} | {{ device.automation ? device.automation.recommendation : '-' }} |
自动化优化建议
| 级别 | 设备 | 对象 | 问题 | 建议 |
|---|---|---|---|---|
| {{ severityLabel(item.severity) }} | {{ item.device_name || '-' }} |
{{ automationObjectLabel(item.object_type) }}
{{ item.object_name || '-' }}
|
{{ item.title }}
{{ item.detail }}
|
{{ item.recommendation }} |
管理服务
| 设备 | 服务 | 端口 | 允许地址 | 状态 | 风险 |
|---|---|---|---|---|---|
| {{ service.device_name }} | {{ service.name }} | {{ service.port || '-' }} | {{ service.address || '0.0.0.0/0' }} | {{ service.disabled ? 'disabled' : 'enabled' }} | {{ severityLabel(service.risk) }} |
脚本与计划任务
| 设备 | 脚本 | 类型 | 策略 | 调用 | 源 | 状态 |
|---|---|---|---|---|---|---|
| {{ script.device_name }} | {{ script.name || '-' }} |
{{ automationKindLabel(script.automation_kind) }}
{{ script.ddns_provider }}
{{ script.ddns_hostnames.join(', ') }}
{{ endpointRefreshText(script) }}
|
{{ script.policy || '-' }} |
{{ script.scheduler_count || 0 }}
{{ (script.referenced_by || []).join(', ') }}
|
{{ script.source_present ? '有' : '无' }}
{{ script.source_hash || '-' }} · {{ script.source_size || 0 }}B
|
{{ script.disabled ? 'disabled' : healthLabel(script.status || 'ok') }} |
| 设备 | 计划任务 | 类型 | 间隔 | 目标 | 状态 |
|---|---|---|---|---|---|
| {{ scheduler.device_name }} | {{ scheduler.name || '-' }} |
{{ automationKindLabel(scheduler.automation_kind) }}
{{ scheduler.ddns_provider }}
{{ scheduler.ddns_hostnames.join(', ') }}
{{ endpointRefreshText(scheduler) }}
|
{{ scheduler.interval || '-' }} |
{{ scheduler.target_script || scheduler.on_event || '-' }}
{{ automationExecutionLabel(scheduler.execution_type) }}
|
{{ scheduler.disabled ? 'disabled' : healthLabel(scheduler.status || 'ok') }} |
隧道清单
| 来源 | 目标 | 协议 | 名称 | 双端地址 | 承载路由 |
|---|---|---|---|---|---|
| {{ tunnel.source }} | {{ tunnel.target }} 未纳管 | {{ tunnel.protocol }} | {{ tunnel.name || '-' }} | {{ tunnel.local_address || '-' }} → {{ tunnel.remote_address || '-' }} |
{{ route.dst_address }}
-
|
自动化管理
{{ automationResult.commands.join('\n') }}
{{ dynamicUpdaterResult.commands.join('\n') }}
PPPoE 动态隧道公网更新
| 设备 | 公网接口 | 状态 | 本端隧道 | 对端 SSH 更新 | 现有 upip | 操作 |
|---|---|---|---|---|---|---|
|
{{ plan.device_name }}
{{ plan.region || '-' }}
{{ plan.public_ip || '-' }}
|
{{ plan.source_interface || '-' }}
间隔 {{ plan.interval || '1m' }}
{{ dynamicUpdaterSourceKindLabel(plan.source_kind) }}
|
{{ dynamicUpdaterStatusLabel(plan) }}
已安装 controller-upip1
{{ plan.warnings.join(' / ') }}
|
{{ item.protocol }} {{ item.interface }}
未识别到需要动态维护的公网隧道
{{ item.local_address || '-' }} -> {{ item.remote_address || '-' }}
|
{{ peer.address }}:{{ peer.port }} · {{ peer.protocol }} {{ peer.interface }}
仅更新本端或待核对对端
{{ peer.device_name || peer.source || '-' }}
|
{{ plan.existing_updater.name }}
{{ plan.existing_updater.disabled ? 'disabled' : 'enabled' }} ·
本端 {{ plan.existing_updater.local_tunnel_count }} ·
对端 {{ plan.existing_updater.peer_count }}
未发现
|
下发后禁用旧 upip1,成功后刷新配置
|
设备自动化画像
| 设备 | 状态 | DDNS | 对象 | 发现/整改 | 建议 |
|---|---|---|---|---|---|
|
{{ device.identity }}
{{ device.region || '-' }}
|
{{ healthLabel(device.automation_status) }}
{{ fmt(device.config_collected_at) }}
|
controller
{{ (device.ddns.providers || []).join(', ') || 'local' }}
{{ automationDeviceDdnsText(device) || '-' }}
|
脚本 {{ device.counts.scripts || 0 }} / 计划 {{ device.counts.schedulers || 0 }}
隧道 {{ device.counts.tunnels || 0 }} / 路由 {{ device.counts.routes || 0 }}
|
发现 {{ device.counts.findings || 0 }} / 整改 {{ device.counts.actions || 0 }}
可执行 {{ device.counts.executable_actions || 0 }}
|
{{ device.recommendation || '-' }} |
智能整改方案
| 级别 | 设备 | 对象 | 方案 | 命令 | 操作 |
|---|---|---|---|---|---|
| {{ severityLabel(action.severity) }} | {{ action.device_name }} |
{{ automationObjectLabel(action.object_type) }}
{{ action.object_name || '-' }}
|
{{ action.title }}
{{ action.reason }}
{{ action.impact }}
|
{{ action.command }}
{{ (action.manual_steps || []).join(' / ') || '-' }}
|
{{ automationSafetyLabel(action.safety) }}
|
发现项
| 级别 | 设备 | 对象 | 问题 | 建议 |
|---|---|---|---|---|
| {{ severityLabel(finding.severity) }} | {{ finding.device_name }} |
{{ automationObjectLabel(finding.object_type) }}
{{ finding.object_name || '-' }}
|
{{ finding.title }}
{{ finding.detail }}
|
{{ finding.recommendation }} |
脚本与计划任务提取
| 设备 | 脚本 | 类型 | 策略 | 调用 | 源摘要 |
|---|---|---|---|---|---|
| {{ script.device_name }} | {{ script.name || '-' }} |
{{ automationKindLabel(script.automation_kind) }}
{{ script.ddns_provider }}
{{ endpointRefreshText(script) }}
|
{{ script.policy || '-' }} | {{ script.scheduler_count || 0 }} {{ (script.referenced_by || []).join(', ') }} |
{{ script.source_hash || '-' }} · {{ script.source_size || 0 }}B |
| 设备 | 计划任务 | 类型 | 间隔 | 目标 |
|---|---|---|---|---|
| {{ scheduler.device_name }} | {{ scheduler.name || '-' }} |
{{ automationKindLabel(scheduler.automation_kind) }}
{{ endpointRefreshText(scheduler) }}
|
{{ scheduler.interval || '-' }} | {{ scheduler.target_script || scheduler.on_event || '-' }} {{ automationExecutionLabel(scheduler.execution_type) }} |
网络拓扑
数据提示 · {{ topology.warnings.length }}
{{ warning }}
配置明细与导出
按当前设备范围显示接口与路由摘要,包含被图中隐藏的禁用记录。Mermaid 导出保留原始明细。
| 来源设备 | 类型 / 接口 | 对端 / 目标网段 | 地址 / 网关 | 状态 |
|---|---|---|---|---|
| {{ nodeLabel(edge.source) }} | {{ edge.kind === 'route' ? '路由' : edge.protocol.toUpperCase() }} {{ edge.name || '' }} | {{ edge.dst_address || nodeLabel(edge.target) }} | {{ edge.kind === 'route' ? edge.gateway : `${edge.local_address || '自动'} → ${edge.remote_address || '-'}` }} | {{ edge.disabled ? '已禁用' : '已配置' }} |
公网隧道自动纳管
| 远端公网 | 来源设备 | 隧道 | 推断区域 | 承载路由 | 自动状态 | |
|---|---|---|---|---|---|---|
| {{ candidate.host }} {{ connectionProxyLabel(candidate.connection_proxy) }} |
{{ candidate.source_device_name }}
{{ candidate.source_region || '-' }}
已合并 {{ candidate.source_count }} 个来源
|
{{ candidate.protocol }} {{ candidate.tunnel_name || '-' }}
{{ candidate.local_address || '-' }} → {{ candidate.remote_address || '-' }}
|
{{ candidate.inferred_region || '-' }} |
{{ candidate.route_count || 0 }}
{{ (candidate.carried_routes || []).slice(0, 3).map(route => route.dst_address).join(', ') }}
|
{{ adoptionAttemptLabel(candidate.auto_attempt) }}
{{ candidate.auto_attempt && candidate.auto_attempt.last_attempt_at ? fmt(candidate.auto_attempt.last_attempt_at) : '' }}
|
|
|
保存只更新中控连接设置;后续手动或后台纳管使用此代理,不会立即发起纳管。
{{ candidateProxyError }}
|
||||||
隧道巡检
查看两端设备、双向探测结果与公网地址同步状态
自动扫描与公网地址同步 {{ tunnelDiscoverySettings.enabled ? '定时任务已开启' : '定时任务已暂停' }} · 每 {{ tunnelDiscoverySettings.check_interval_seconds / 60 }} 分钟巡检
公网地址同步由设备心跳触发,发现时间取决于心跳间隔。仅对确认配对、允许同步且通过现场校验的公网端点更新地址;固定覆盖地址、私网承载和无法唯一确认的接口会跳过。暂停定时巡检不等于关闭公网地址同步。此处开关仅控制巡检发现记录的维护,已有规划的公网同步仍单独运行。
{{ tunnelDiscoveryScope === 'pending' ? '以下记录尚未确认唯一对端,不计入双端隧道。' : '每行是一条独立隧道;同一对设备的 GRE / IPIP 分别显示。' }} 状态来自最近一次巡检,点击记录展开完整信息。
- 外层地址
- {{ endpoint.local_address || '未指定' }} → {{ endpoint.remote_address || '未指定' }}
- 隧道地址
- {{ endpoint.tunnel_address || '未配置 / 未识别' }}
{{ endpoint.ipsec_configured === true ? '接口配置了 IPsec;不代表协商已完成' : endpoint.ipsec_configured === false ? '接口未配置 IPsec 预共享密钥' : '接口 IPsec 配置未确认' }}
双向 Ping
接口运行标志不代表实际可通,以下显示最近一次探测结果。
{{ item.sync_reason }}
此隧道也属于已有规划;规划的公网同步仍单独运行。
设备扫描覆盖 · {{ tunnelDiscoveryCoverage.filter(item => item.status === 'ok').length }} / {{ tunnelDiscoveryCoverage.length }} 项成功 {{ tunnelDiscoveryCoverage.filter(item => item.status !== 'ok').length }} 项待处理
| 设备 / 注册项 | 扫描结果 | 说明 | 最近扫描 |
|---|---|---|---|
| {{ item.device_name || item.device_id || '未绑定设备的注册项' }} 关联 {{ item.registration_ids.length }} 个注册项 | {{ tunnelDiscoveryCoverageLabel(item.status) }} | {{ item.reason || '—' }} | {{ fmt(item.scanned_at) }} |
尚未绑定设备的注册项需先完成注册并保存可用 SSH 凭据,才能读取隧道;已有 SSH 代理设置会用于扫描和巡检。
串联链路规划
按 A → B → C → D 的顺序连接相邻设备,自动生成双向路由,保留内网源地址。新建 GRE / IPIP 隧道均关闭 Keepalive。保存规划后可预览配置脚本。
{{ side.cidr }} · {{ chainNetworkSourceLabel(side) }}自动未发布的网段
{{ item.cidr }} · 接口 {{ item.interface }}
{{ item.reason }};相关隧道:{{ item.related_tunnels.join('、') }}
路径与地址
{{ item.identity || chainDeviceName(item.device_id) }} 中继转发
{{ hop.gateway }}
无
{{ route.cidr }} via {{ route.gateway }} · {{ chainDirectionLabel(route.direction) }} · 目标 {{ chainDeviceName(route.source_device_id) }}
已保存串联规划
删除只删除中央规划,不删除设备上的现有配置。| 名称 | 路径 | 协议 | 状态 | 更新时间 | |
|---|---|---|---|---|---|
| {{ item.name }} 当前 | {{ chainPathText(item) }} | {{ chainSavedProtocols(item) }} | {{ chainStatusLabel(item.status) }} | {{ fmt(item.updated_at) }} |
串联隧道配置下发:{{ chainApplyName }}
先执行干运行,只生成并校验每一跳脚本,不会连接或修改 RouterOS。确认后才会按 A → E 顺序通过 SSH 下发;正式下发仍会实时检查复用链路和设备写入状态。
查看脱敏脚本
{{ chainApplySafeScript(item.scripts.endpoint_a_script) }}{{ chainApplySafeScript(item.scripts.endpoint_b_script) }}编辑路由:{{ chainRouteEditorName }}
在同一串联规划中管理内网互通与公网出口策略。公网流量沿选定链路保留源 IP,仅在最终出口接口执行 NAT;保存草稿后,需另行确认“逐层发布”才会修改设备。
发布预览:{{ chainRouteDirectionCount('forward') }} 条去程 · {{ chainRouteDirectionCount('return') }} 条回程 · {{ chainRouteNatRules('translation').length }} 条出口 NAT · {{ chainRouteNatRules('bypass').length }} 条免 NAT 保护 · {{ (chainRoutePreview.mangle_rules || []).length }} 条流量规则 · {{ (chainRoutePreview.address_lists || []).length }} 条内网排除
逐台影响摘要
按 A → E 顺序列出本次预览会触碰的规则;中间节点只转发并保留源地址。
- {{ action }}
{{ route.cidr }} · {{ route.gateway }} · 直连可达| 方向 | 下发节点 | 目标网段 | 下一跳 / 接口 | 路由表 | 设备源地址 |
|---|---|---|---|---|---|
| {{ route.direction === 'return' ? '回程' : '去程' }} | {{ route.device_name || chainRouteNodeName(route.device_id) }} | {{ route.cidr }} | {{ route.gateway }} | {{ route.routing_table || route.routing_mark || 'main' }} | {{ route.pref_src || '按现有源地址' }} |
| 无新增保留路由;已发布需求被停用或移除时,将仅撤回本功能管理的对应配置。 | |||||
查看内网排除列表
这些网段保留在 main 表和既有内网路径;入口接口和目标路由表由下方源地址标记 / 路由表列说明。
| 节点 | 地址列表 | 排除网段 | 备注 |
|---|---|---|---|
| {{ item.device_name || chainRouteNodeName(item.device_id) }} | {{ item.list_name }} | {{ item.cidr }} | {{ item.comment || '互联网模式内网排除' }} |
最终出口 NAT · {{ chainRouteNatRules('translation').length }} 条
只有下列出口节点及接口会转换来源地址。
| 出口节点 | 公网出口接口 | 来源网段 | 目标范围 | 动作 |
|---|---|---|---|---|
| {{ rule.device_name || chainRouteNodeName(rule.device_id) }} | {{ rule.out_interface }} | {{ rule.src_cidr }} | {{ rule.dst_cidr }} | {{ rule.action }} |
保留源 IP / 免 NAT 保护 · {{ chainRouteNatRules('bypass').length }} 条
下列 accept 规则不转换地址,使匹配流量跳过后续 NAT。覆盖来源、中继及回程所需接口,不会关闭设备上其他业务的 NAT。
| 节点 | 来源网段 | 目标范围 | 转发接口 | 行为 |
|---|---|---|---|---|
| {{ rule.device_name || chainRouteNodeName(rule.device_id) }} | {{ rule.src_cidr }} | {{ rule.dst_cidr }} | {{ rule.out_interface }} | 保留源 IP(accept) |
查看流量规则、入口和路由表
| 行为 | 节点 | 入口接口 | 来源网段 | 目的网段 | 目标类型 / 排除列表 | 路由标记 / 表 |
|---|---|---|---|---|---|---|
| {{ rule.action === 'accept' ? '回程保护' : rule.action === 'mark-routing' ? '源地址标记' : rule.action || '源地址标记' }} | {{ rule.device_name || chainRouteNodeName(rule.device_id) }} | {{ rule.in_interface || '-' }} | {{ rule.src_cidr || '0.0.0.0/0' }} | {{ rule.dst_cidr || '0.0.0.0/0' }} | {{ rule.dst_address_type || '-' }} · {{ rule.dst_address_list || '-' }} | {{ rule.routing_mark || rule.routing_table || 'main' }} |
逐层发布顺序
发布顺序:先准备内网排除、免 NAT 保护和最终出口 NAT,再建立回程、去程;全部逐台校验就绪后,最后按 E → A 启用源地址标记(从所选出口逐层向来源)。失败时尝试撤回本次变更。
- {{ stage.phase === 'return' ? '回程' : '去程' }} · {{ stage.device_name || chainRouteNodeName(stage.device_id) }} · {{ (stage.routes || []).length }} 条路由
- 最后 E → A 启用标记(从出口侧逐层向来源侧启用)
查看逐台配置脚本
以下为预览脚本;正式发布会先检查现场配置,再决定复用已有配置、添加或更新本功能管理的配置。
{{ device.device_name || chainRouteNodeName(device.device_id) }}
内网排除地址列表{{ device.address_list_script }}流量规则(去程标记 / 回程保护){{ device.mangle_script }}出口 NAT / 免 NAT 保护(按动作区分){{ device.nat_script }}回程{{ device.return_script }}去程{{ device.forward_script }}发布进度:{{ chainRouteJobStatusLabel(chainRouteJob.status) }}
| 阶段 | 设备 | 结果 | 说明 |
|---|---|---|---|
| {{ chainRoutePhaseLabel(event.phase) }} | {{ event.device_name || chainRouteNodeName(event.device_id) }} | {{ chainRouteJobStatusLabel(event.status) }} | {{ event.message || '-' }} |
回滚结果
| 设备 | 配置 | 结果 | 说明 |
|---|---|---|---|
| {{ result.device_name || chainRouteNodeName(result.device_id) }} | {{ result.kind === 'routes' ? '路由' : result.kind === 'nat_exemptions' ? 'NAT 豁免' : result.kind }} {{ result.comment || '' }} | {{ result.ok ? '已回滚' : '未完成' }} | {{ result.error || result.message || (result.ok ? '本次变更已撤回或恢复原配置' : '请核对该设备现场配置') }} |
已保存:{{ chainSelected.name }} {{ chainStatusLabel(chainSelected.status) }}
| 链段 / 方式 | 协议 / 加密 | 两端 / 接口 | 隧道地址 | |
|---|---|---|---|---|
| {{ link.chain_position }} · {{ link.name }} {{ chainLinkModeLabel(link) }} | {{ chainSecurityLabel(link) }} | {{ chainDeviceName(link.endpoint_a_device_id) }} ↔ {{ chainDeviceName(link.endpoint_b_device_id) }} {{ (link.reuse || {}).endpoint_a_interface || '-' }} ↔ {{ (link.reuse || {}).endpoint_b_interface || '-' }} {{ chainTransportSummary(link, 'a') }} {{ chainTransportSummary(link, 'b') }} | {{ link.endpoint_a_tunnel_address }} ↔ {{ link.endpoint_b_tunnel_address }} |
{{ item.identity || chainDeviceName(item.device_id) }} 中继转发
{{ hop.gateway }}{{ route.cidr }} via {{ route.gateway }} · {{ chainDirectionLabel(route.direction) }} · 目标 {{ chainDeviceName(route.source_device_id) }}无脚本预览
第 {{ item.position }} 段 · {{ item.name }}
{{ (item.scripts || {}).endpoint_a_script || '无脚本' }}
{{ (item.scripts || {}).endpoint_b_script || '无脚本' }}
隧道工作台
设备配置快照
| 设备 | 区域 | 公网 IP | 版本 | 配置时间 | 隧道/路由/地址 |
|---|---|---|---|---|---|
| {{ device.device_name }} | {{ device.region || '-' }} | {{ device.public_ip || '-' }} | {{ device.routeros_version || '-' }} | {{ fmt(device.config_collected_at) }} | {{ device.has_config ? 'ok' : 'no config' }} {{ device.tunnel_count }} / {{ device.route_count }} / {{ device.address_count }} |
现有隧道
| 设备 | 协议/接口 | 对端 | 本端/远端地址 | 接口地址 | 承载路由 | 状态 | 规划 | 备注 |
|---|---|---|---|---|---|---|---|---|
| {{ tunnel.device_name }} |
{{ tunnel.protocol }} {{ tunnel.name || '-' }}
{{ tunnel.path }}
|
{{ tunnel.peer_device_name }}
{{ tunnel.remote_address || '-' }}
{{ tunnel.peer_region || tunnel.raw_remote || '' }}
|
{{ tunnel.local_address || '-' }} → {{ tunnel.remote_address }} |
{{ address.address }}
|
{{ route.dst_address }}
via {{ route.gateway }}
|
{{ inventoryStatusLabel(tunnel.status) }} | - | {{ tunnel.comment || '-' }} |
现有路由
| 设备 | 目标网段 | 网关 | 关联隧道/网关设备 | 路由表/距离 | 状态 | 备注 |
|---|---|---|---|---|---|---|
| {{ route.device_name }} | {{ route.dst_address }} | {{ route.gateway || '-' }} |
{{ route.tunnel_protocol }} {{ route.tunnel_name }}
{{ route.gateway_device_name }}
-
{{ route.out_interface || route.gateway_region || '' }}
|
{{ route.routing_table || route.routing_mark || 'main' }}
distance {{ route.distance || '-' }}
|
{{ inventoryStatusLabel(route.status) }} | {{ route.comment || '-' }} |
待核对项
| 级别 | 设备 | 类别 | 问题 | 说明 |
|---|---|---|---|---|
| {{ severityLabel(item.severity) }} | {{ item.device_name }} | {{ item.category }} | {{ item.title }} | {{ item.detail }} |
内网地址段占用
冲突诊断
| 级别 | 类型 | 冲突网段 | 关联设备 | 关联路由 | 整改方向 |
|---|---|---|---|---|---|
| {{ severityLabel(item.severity) }} | {{ diagnosticCategoryLabel(item.category) }} | {{ item.cidrs.join(' / ') }} |
{{ device.device_name }} {{ device.region || '' }}
|
{{ item.related_route_count }} 条 | {{ item.suggested_action }} |
{{ selectedSubnetDiagnostic().title }} · {{ selectedSubnetDiagnostic().cidrs.join(' / ') }}
{{ selectedSubnetDiagnostic().summary }}
真实占用对象
| 设备 | 来源 | 网段 | 接口/隧道 |
|---|---|---|---|
| {{ item.device_name }} | {{ sourceLabel(item.source) }} | {{ item.cidr }} | {{ item.interface || item.comment || '-' }} |
关联静态路由
| 设备 | 目标网段 | 网关 | 备注 |
|---|---|---|---|
| {{ route.device_name }} | {{ route.cidr }} | {{ route.gateway || '-' }} | {{ route.comment || '-' }} |
逐条整改方案
{{ step.summary || step.action }}
整改结果
{{ pretty(subnetRemediationResult) }}
| 地址段 | 设备 | 区域 | 来源 | 接口/隧道 | 冲突 | 备注 |
|---|---|---|---|---|---|---|
| {{ item.cidr }} | {{ item.device_name }} | {{ item.region || '-' }} | {{ sourceLabel(item.source) }} | {{ item.interface || '-' }} | {{ item.conflict_count }}- | {{ item.comment || item.gateway || '-' }} |
隧道规划
| 名称 | 协议 | 双端 | 隧道地址 | 状态 | 运行 | |
|---|---|---|---|---|---|---|
| {{ item.name }} 当前 | {{ item.protocol }} | {{ item.endpoint_a.identity }} ↔ {{ item.endpoint_b.identity }} | {{ item.endpoint_a_tunnel_address }} ↔ {{ item.endpoint_b_tunnel_address }} | {{ item.status }} |
{{ tunnelStatusLabel(tunnelOverallStatus(item)) }}
{{ tunnelStatusTime(item) }}
|
{{ tunnelForm.id ? '编辑隧道' : '新建隧道' }}
新建 GRE / IPIP 隧道均关闭 Keepalive,包括启用 IPsec 的隧道。
| A 端本地内网 | B 端默认路由 |
|---|---|
| {{ route.cidr }} | dst={{ route.cidr }} via {{ tunnelPlanGateway('a') || '-' }} |
| 未从 A 端配置中识别到可发布内网 | |
| B 端本地内网 | A 端默认路由 |
|---|---|
| {{ route.cidr }} | dst={{ route.cidr }} via {{ tunnelPlanGateway('b') || '-' }} |
| 未从 B 端配置中识别到可发布内网 | |
A 端脚本
{{ tunnelScripts.endpoint_a_script }}
B 端脚本
{{ tunnelScripts.endpoint_b_script }}
下发结果
{{ pretty(tunnelScripts.results) }}
注册密钥
| 设备名 | 区域 | 心跳 | 公网接口 | DDNS | 状态 | 日志采集 | 有效期 | |
|---|---|---|---|---|---|---|---|---|
| {{ item.device_name }} {{ connectionProxyLabel(item.connection_proxy) }} |
{{ item.region }} | {{ item.heartbeat_interval }} | {{ item.pppoe_interface }} | {{ item.ddns_hostname || '-' }} | {{ registrationStatus(item) }} |
{{ registrationLogCollectionEnabled(item) ? '开启' : '关闭' }}
设备注册后生效
|
{{ fmt(item.expires_at) }} | |
|
更新此注册项的中控连接设置;已绑定设备时会同步该设备的连接代理,不会立即连接设备。
{{ registrationProxyError }}
|
||||||||