mirror of
https://github.com/itdoginfo/podkop.git
synced 2025-12-24 08:28:18 +03:00
feat: Add local subnet lists support with UI and backend integration (#156)
This commit is contained in:
@@ -370,7 +370,7 @@ function createConfigSection(section, map, network) {
|
||||
o.rmempty = false;
|
||||
o.ucisection = s.section;
|
||||
|
||||
o = s.taboption('basic', form.DynamicList, 'local_domain_lists', _('Local Domain Lists Path'), _('Enter the list file path'));
|
||||
o = s.taboption('basic', form.DynamicList, 'local_domain_lists', _('Local Domain List Paths'), _('Enter the list file path'));
|
||||
o.placeholder = '/path/file.lst';
|
||||
o.depends('local_domain_lists_enabled', '1');
|
||||
o.rmempty = false;
|
||||
@@ -399,6 +399,25 @@ function createConfigSection(section, map, network) {
|
||||
return validateUrl(value);
|
||||
};
|
||||
|
||||
o = s.taboption('basic', form.Flag, 'local_subnet_lists_enabled', _('Local Subnet Lists'), _('Use the list from the router filesystem'));
|
||||
o.default = '0';
|
||||
o.rmempty = false;
|
||||
o.ucisection = s.section;
|
||||
|
||||
o = s.taboption('basic', form.DynamicList, 'local_subnet_lists', _('Local Subnet List Paths'), _('Enter the list file path'));
|
||||
o.placeholder = '/path/file.lst';
|
||||
o.depends('local_subnet_lists_enabled', '1');
|
||||
o.rmempty = false;
|
||||
o.ucisection = s.section;
|
||||
o.validate = function (section_id, value) {
|
||||
if (!value || value.length === 0) return true;
|
||||
const pathRegex = /^\/[a-zA-Z0-9_\-\/\.]+$/;
|
||||
if (!pathRegex.test(value)) {
|
||||
return _('Invalid path format. Path must start with "/" and contain valid characters');
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
o = s.taboption('basic', form.ListValue, 'user_subnet_list_type', _('User Subnet List Type'), _('Select how to add your custom subnets'));
|
||||
o.value('disabled', _('Disabled'));
|
||||
o.value('dynamic', _('Dynamic List'));
|
||||
|
||||
@@ -97,8 +97,8 @@ msgstr "Локальные списки доменов"
|
||||
msgid "Use the list from the router filesystem"
|
||||
msgstr "Использовать список из файловой системы роутера"
|
||||
|
||||
msgid "Local Domain Lists Path"
|
||||
msgstr "Путь к локальным спискам доменов"
|
||||
msgid "Local Domain List Paths"
|
||||
msgstr "Пути к локальным спискам доменов"
|
||||
|
||||
msgid "Enter to the list file path"
|
||||
msgstr "Введите путь к файлу списка"
|
||||
@@ -896,4 +896,10 @@ msgid "Delay in milliseconds before reloading podkop after interface UP"
|
||||
msgstr "Задержка в миллисекундах перед перезагрузкой podkop после поднятия интерфейса"
|
||||
|
||||
msgid "Delay value cannot be empty"
|
||||
msgstr "Значение не может быть пустым"
|
||||
msgstr "Значение не может быть пустым"
|
||||
|
||||
msgid "Local Subnet Lists"
|
||||
msgstr "Локальные списки подсетей"
|
||||
|
||||
msgid "Local Subnet List Paths"
|
||||
msgstr "Пути к локальным спискам доменов"
|
||||
@@ -97,7 +97,7 @@ msgstr ""
|
||||
msgid "Use the list from the router filesystem"
|
||||
msgstr ""
|
||||
|
||||
msgid "Local Domain Lists Path"
|
||||
msgid "Local Domain List Paths"
|
||||
msgstr ""
|
||||
|
||||
msgid "Enter to the list file path"
|
||||
@@ -1250,4 +1250,10 @@ msgid "Delay in milliseconds before reloading podkop after interface UP"
|
||||
msgstr ""
|
||||
|
||||
msgid "Delay value cannot be empty"
|
||||
msgstr ""
|
||||
|
||||
msgid "Local Subnet Lists"
|
||||
msgstr ""
|
||||
|
||||
msgid "Local Subnet List Paths"
|
||||
msgstr ""
|
||||
Reference in New Issue
Block a user