Compare commits

..

2 Commits

Author SHA1 Message Date
itdoginfo
33ecb771f9 Fix UDP over TCP for extra section 2025-09-02 14:44:14 +03:00
itdoginfo
86038e2756 Delay setting option 2025-09-02 14:09:35 +03:00
6 changed files with 59 additions and 4 deletions

View File

@@ -198,6 +198,18 @@ function createAdditionalSection(mainSection, network) {
return ['lan', 'loopback'].indexOf(value) === -1 && !value.startsWith('@'); return ['lan', 'loopback'].indexOf(value) === -1 && !value.startsWith('@');
}; };
o = mainSection.taboption('additional', form.Value, 'procd_reload_delay', _('Interface Monitoring Delay'), _('Delay in milliseconds before reloading podkop after interface UP'));
o.ucisection = 'main';
o.depends('mon_restart_ifaces', '1');
o.default = '2000';
o.rmempty = false;
o.validate = function (section_id, value) {
if (!value) {
return _('Delay value cannot be empty');
}
return true;
};
o = mainSection.taboption('additional', form.Flag, 'dont_touch_dhcp', _('Dont touch my DHCP!'), _('Podkop will not change the DHCP config')); o = mainSection.taboption('additional', form.Flag, 'dont_touch_dhcp', _('Dont touch my DHCP!'), _('Podkop will not change the DHCP config'));
o.default = '0'; o.default = '0';
o.rmempty = false; o.rmempty = false;

View File

@@ -209,7 +209,7 @@ function createConfigSection(section, map, network) {
o.default = '0'; o.default = '0';
o.depends('mode', 'proxy'); o.depends('mode', 'proxy');
o.rmempty = false; o.rmempty = false;
o.ucisection = 'main'; o.ucisection = s.section;
o = s.taboption('basic', widgets.DeviceSelect, 'interface', _('Network Interface'), _('Select network interface for VPN connection')); o = s.taboption('basic', widgets.DeviceSelect, 'interface', _('Network Interface'), _('Select network interface for VPN connection'));
o.depends('mode', 'vpn'); o.depends('mode', 'vpn');

View File

@@ -876,3 +876,24 @@ msgstr "Обновление списков не удалось"
msgid "Error: " msgid "Error: "
msgstr "Ошибка: " msgstr "Ошибка: "
msgid "Interface monitoring"
msgstr "Мониторинг интерфейсов"
msgid "Interface monitoring for bad WAN"
msgstr "Мониторинг интерфейсов для плохого WAN"
msgid "Interface for monitoring"
msgstr "Интерфейс для мониторинга"
msgid "Select the WAN interfaces to be monitored"
msgstr "Выберите WAN интерфейсы для мониторинга"
msgid "Interface Monitoring Delay"
msgstr "Задержка при мониторинге интерфейсов"
msgid "Delay in milliseconds before reloading podkop after interface UP"
msgstr "Задержка в миллисекундах перед перезагрузкой podkop после поднятия интерфейса"
msgid "Delay value cannot be empty"
msgstr "Значение не может быть пустым"

View File

@@ -1230,3 +1230,24 @@ msgstr ""
msgid "Error: " msgid "Error: "
msgstr "" msgstr ""
msgid "Interface monitoring"
msgstr ""
msgid "Interface monitoring for bad WAN"
msgstr ""
msgid "Interface for monitoring"
msgstr ""
msgid "Select the WAN interfaces to be monitored"
msgstr ""
msgid "Interface Monitoring Delay"
msgstr ""
msgid "Delay in milliseconds before reloading podkop after interface UP"
msgstr ""
msgid "Delay value cannot be empty"
msgstr ""

View File

@@ -39,5 +39,6 @@ config main 'main'
list iface 'br-lan' list iface 'br-lan'
option mon_restart_ifaces '0' option mon_restart_ifaces '0'
#list restart_ifaces 'wan' #list restart_ifaces 'wan'
option procd_reload_delay '2000'
option ss_uot '0' option ss_uot '0'
option detour '0' option detour '0'

View File

@@ -34,9 +34,9 @@ service_triggers() {
config_get mon_restart_ifaces "main" "mon_restart_ifaces" config_get mon_restart_ifaces "main" "mon_restart_ifaces"
config_get restart_ifaces "main" "restart_ifaces" config_get restart_ifaces "main" "restart_ifaces"
config_get procd_reload_delay "main" "procd_reload_delay" "2000"
# Test without delay PROCD_RELOAD_DELAY=$procd_reload_delay
#PROCD_RELOAD_DELAY=2000
procd_open_trigger procd_open_trigger
procd_add_config_trigger "config.change" "$NAME" "$initscript" restart 'on_config_change' procd_add_config_trigger "config.change" "$NAME" "$initscript" restart 'on_config_change'