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
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 1m39s
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user