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
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 1m41s
This commit is contained in:
@@ -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());
|
||||
};
|
||||
|
||||
/**
|
||||
* Типы туннелей
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user