update 2024-08-15 14:14:54

This commit is contained in:
kenzok8 2024-08-15 14:14:54 +08:00
parent 4caae59b68
commit 9263744ab9
3 changed files with 15 additions and 4 deletions

View File

@ -37,6 +37,12 @@ function renderStatus(isRunning) {
}
return view.extend({
load: function() {
return Promise.all([
L.resolveDefault(fs.exec('/usr/bin/mosdns', ['version']), null),
]);
},
handleFlushCache: function (m, section_id, ev) {
return fs.exec('/usr/share/mosdns/mosdns.sh', ['flush'])
.then(function (lazy_cache) {
@ -49,10 +55,14 @@ return view.extend({
});
},
render: function () {
var m, s, o;
render: function (basic) {
var m, s, o, v;
v = '';
m = new form.Map('mosdns', _('MosDNS'),
if (basic[0] && basic[0].code === 0) {
v = basic[0].stdout.trim();
}
m = new form.Map('mosdns', _('MosDNS') + ' ' + v,
_('MosDNS is a plugin-based DNS forwarder/traffic splitter.'));
s = m.section(form.TypedSection);

View File

@ -14,6 +14,7 @@
"/etc/mosdns/rule/redirect.txt": [ "read" ],
"/etc/mosdns/rule/streaming.txt": [ "read" ],
"/etc/mosdns/rule/whitelist.txt": [ "read" ],
"/usr/bin/mosdns": [ "exec" ],
"/usr/share/mosdns/mosdns.sh": [ "exec" ]
},
"ubus": {

View File

@ -12,7 +12,7 @@ PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
include $(INCLUDE_DIR)/package.mk
GEOIP_VER:=202408150044
GEOIP_VER:=202408150211
GEOIP_FILE:=geoip.dat.$(GEOIP_VER)
define Download/geoip
URL:=https://github.com/v2fly/geoip/releases/download/$(GEOIP_VER)/