feat(ServerModal, serverUtils): implement conditional tunnel selection based on server type; add needsTunnel utility function for improved server configuration
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 1m41s

This commit is contained in:
2026-01-20 18:49:25 +07:00
parent a04dc72b00
commit ff7c26f6f7
2 changed files with 30 additions and 15 deletions
+12
View File
@@ -92,8 +92,20 @@ export const SERVER_TYPE_OPTIONS = [
{ value: 'jumphost', label: 'Jumphost' },
{ value: 'exit', label: 'Выходная нода' },
{ value: 'bgp', label: 'BGP роутер' },
{ value: 'dns', label: 'DNS сервер' },
];
/**
* Проверяет, нужен ли туннель для данного типа сервера
* @param {string} type - Тип сервера
* @returns {boolean}
*/
export const needsTunnel = (type) => {
// BGP и DNS серверам туннель не нужен
const noTunnelTypes = ['bgp', 'dns'];
return !noTunnelTypes.includes(String(type || '').toLowerCase());
};
/**
* Типы туннелей
*/