🌴 Sync 2026-11-16 12:09:10

This commit is contained in:
github-actions[bot] committed 2026-11-16 12:09:10 +08:00
1 parent 30cbf03f19
commit 9947095834
13 files changed
+108 -144

No files matched your search

@@ -114,7 +114,7 @@ return L.view.extend({
var dcontent = [];
if (status.dns_running == 1) {
var ip = status.proxy_server_ip_addr || '-';
var port = status.proxy_server_dns_port || '5353';
var port = status.proxy_server_dns_port || '53';
dcontent.push(E('span', { 'style': 'color: green; font-weight: bold;' }, [ _('running') ]));
dcontent.push(' (' + ip + ':');
dcontent.push(E('span', { 'style': 'color: #FF9800; font-weight: bold;' }, [ port ]));
@@ -124,6 +124,26 @@ return L.view.extend({
}
L.dom.content(dnsEl, dcontent);
}
var wdEl = container.querySelector('#watchdog-status');
if (wdEl) {
var wcontent = [];
if (status.monitor_enabled != 1) {
wcontent.push(E('span', { 'style': 'color: #888;' }, [ _('not enabled') ]));
} else if (!isRunning) {
wcontent.push(E('span', { 'style': 'color: red; font-weight: bold;' }, [ _('stopped') ]));
} else if (status.watchdog_running == 1 && isDegraded) {
wcontent.push(E('span', { 'style': 'color: #FF9800; font-weight: bold;' }, [ _('running - degraded direct fallback') ]));
} else if (status.watchdog_running == 1) {
var wip = status.proxy_server_ip_addr || '-';
var interval = status.monitor_interval || 5;
wcontent.push(E('span', { 'style': 'color: green; font-weight: bold;' }, [ _('running') ]));
wcontent.push(' (' + wip + ' / ' + interval + 's)');
} else {
wcontent.push(E('span', { 'style': 'color: red; font-weight: bold;' }, [ _('not running') ]));
}
L.dom.content(wdEl, wcontent);
}
}, this));
},
@@ -194,6 +214,10 @@ return L.view.extend({
o.rawhtml = true;
o.cfgvalue = function() { return '<div id="dns-status" style="display:inline-block;">-</div>'; };
o = s.taboption('settings', form.DummyValue, '_watchdog_status', _('Watchdog Status'));
o.rawhtml = true;
o.cfgvalue = function() { return '<div id="watchdog-status" style="display:inline-block;">-</div>'; };
s.taboption('settings', form.Flag, 'enabled', _('Enable FlowProxy')).rmempty = false;
s.taboption('settings', form.Flag, 'dns_proxy_enabled', _('Force upstream DNS to proxy server')).rmempty = false;
o = s.taboption('settings', form.Flag, 'monitor_enabled', _('Enable proxy server monitoring'));
@@ -319,7 +343,7 @@ return L.view.extend({
};
o = s.taboption('settings', form.Value, 'proxy_server_dns_port', _('Proxy server DNS port'));
o.datatype = 'port'; o.default = '5353'; o.rmempty = false;
o.datatype = 'port'; o.default = '53'; o.rmempty = false;
o = s.taboption('settings', form.ListValue, 'interface', _('Proxy server interface'));
o.value('auto', _('Auto detect'));