refactor(PingServices): update server selection logic to include home routers and improve error handling for ping services
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 1m39s

This commit is contained in:
2026-02-16 23:47:24 +07:00
parent ee357ed59a
commit c0d35c2e51
2 changed files with 13 additions and 9 deletions
+2 -2
View File
@@ -300,8 +300,8 @@ async function applyMikrotikConfig(req, res) {
async function runPingViaRouter(serverId, gatewayIp, target, count = 5, interfaceName = null) {
const servers = await readServersFromS3();
const server = servers.find((s) => (s.id || s.dns || s.ip) === serverId);
if (!server || server.type !== 'jumphost') {
throw new Error('Jumphost server not found');
if (!server || (server.type !== 'jumphost' && server.type !== 'home')) {
throw new Error('Сервер (jumphost или входной роутер) не найден');
}
const creds = getMikrotikCredentials(server);
if (!creds) {