update 2026-05-15 14:52:00

This commit is contained in:
action committed 2026-05-15 14:52:00 +08:00
1 parent a4acef8e4b
commit 62bc359c08
7 files changed
+119 -89

No files matched your search

+2 -2
View File
@@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=dockerd PKG_NAME:=dockerd
PKG_VERSION:=29.4.3 PKG_VERSION:=29.5.0
PKG_RELEASE:=1 PKG_RELEASE:=1
PKG_LICENSE:=Apache-2.0 PKG_LICENSE:=Apache-2.0
PKG_LICENSE_FILES:=LICENSE PKG_LICENSE_FILES:=LICENSE
@@ -10,7 +10,7 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_GIT_URL:=github.com/moby/moby PKG_GIT_URL:=github.com/moby/moby
PKG_GIT_REF:=docker-v$(PKG_VERSION) PKG_GIT_REF:=docker-v$(PKG_VERSION)
PKG_SOURCE_URL:=https://codeload.$(PKG_GIT_URL)/tar.gz/$(PKG_GIT_REF)? PKG_SOURCE_URL:=https://codeload.$(PKG_GIT_URL)/tar.gz/$(PKG_GIT_REF)?
PKG_HASH:=3dd4e709e1928ba90cf7bcd31025e13dda5517867989972b38f8fe4bd6f3dab6 PKG_HASH:=406f6ba2f369e384e39bebe837859a888413dd71608ace7a9b0dc7d550dbd570
PKG_GIT_SHORT_COMMIT:=$(shell $(CURDIR)/git-short-commit.sh '$(PKG_GIT_URL)' '$(PKG_GIT_REF)' '$(TMP_DIR)/git-short-commit/$(PKG_NAME)-$(PKG_VERSION)') PKG_GIT_SHORT_COMMIT:=$(shell $(CURDIR)/git-short-commit.sh '$(PKG_GIT_URL)' '$(PKG_GIT_REF)' '$(TMP_DIR)/git-short-commit/$(PKG_NAME)-$(PKG_VERSION)')
PKG_MAINTAINER:=Gerard Ryan <G.M0N3Y.2503@gmail.com> PKG_MAINTAINER:=Gerard Ryan <G.M0N3Y.2503@gmail.com>
+1 -1
View File
@@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-mosdns PKG_NAME:=luci-app-mosdns
PKG_VERSION:=1.7.2 PKG_VERSION:=1.7.3
PKG_RELEASE:=1 PKG_RELEASE:=1
LUCI_TITLE:=LuCI Support for mosdns LUCI_TITLE:=LuCI Support for mosdns
@@ -19,6 +19,8 @@ const callGetUpdateLog = rpc.declare({
return view.extend({ return view.extend({
handleUpdate() { handleUpdate() {
const statusMsg = E('p', { 'class': 'spinning' }, _('Please wait, this may take a few moments...'));
const logTextarea = E('textarea', { const logTextarea = E('textarea', {
'class': 'cbi-input-textarea', 'class': 'cbi-input-textarea',
'readonly': 'readonly', 'readonly': 'readonly',
@@ -33,7 +35,7 @@ return view.extend({
}, _('Close')); }, _('Close'));
ui.showModal(_('Updating Database...'), [ ui.showModal(_('Updating Database...'), [
E('p', { 'class': 'spinning' }, _('Please wait, this may take a few moments...')), statusMsg,
logTextarea, logTextarea,
E('div', { 'class': 'right' }, [ closeButton ]) E('div', { 'class': 'right' }, [ closeButton ])
]); ]);
@@ -45,14 +47,28 @@ return view.extend({
logTextarea.scrollTop = logTextarea.scrollHeight; logTextarea.scrollTop = logTextarea.scrollHeight;
if (res.log.match(/UPDATE_FINISHED/)) { if (res.log.match(/UPDATE_FINISHED/)) {
ui.hideModal(); statusMsg.textContent = _('Update success');
ui.addNotification(null, E('p', _('Update success')), 'info'); statusMsg.classList.remove('spinning');
statusMsg.style.color = '#19be6b';
statusMsg.style.fontWeight = 'bold';
closeButton.style.display = 'inline';
return false;
}
if (res.log.match(/UPDATE_EXITED/)) {
statusMsg.textContent = _('Update failed');
statusMsg.classList.remove('spinning');
statusMsg.style.color = '#ed4014';
statusMsg.style.fontWeight = 'bold';
closeButton.style.display = 'inline';
return false; return false;
} }
if (res.log.match(/Another update is already in progress/)) { if (res.log.match(/Another update is already in progress/)) {
ui.hideModal(); statusMsg.textContent = _('Another update is already in progress.');
ui.addNotification(null, E('p', _('Another update is already in progress.')), 'warn'); statusMsg.classList.remove('spinning');
statusMsg.style.color = '#ff9900';
closeButton.style.display = 'inline';
return false; return false;
} }
} }
@@ -70,12 +86,16 @@ return view.extend({
}); });
}, 1000); }, 1000);
} else { } else {
ui.hideModal(); statusMsg.textContent = res.error || _('Failed to start update.');
ui.addNotification(null, E('p', res.error || _('Failed to start update.')), 'error'); statusMsg.classList.remove('spinning');
statusMsg.style.color = '#ed4014';
closeButton.style.display = 'inline';
} }
}).catch(e => { }).catch(e => {
ui.hideModal(); statusMsg.textContent = _('Update failed: %s').format(e.message);
ui.addNotification(null, E('p', _('Update failed: %s').format(e.message)), 'error'); statusMsg.classList.remove('spinning');
statusMsg.style.color = '#ed4014';
closeButton.style.display = 'inline';
}); });
}, },
+36 -32
View File
@@ -74,7 +74,7 @@ msgstr ""
msgid "Aliyun Public DNS (DNS over QUIC)" msgid "Aliyun Public DNS (DNS over QUIC)"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:55 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:68
msgid "Another update is already in progress." msgid "Another update is already in progress."
msgstr "" msgstr ""
@@ -86,7 +86,7 @@ msgstr ""
msgid "Auto Save Cache Interval" msgid "Auto Save Cache Interval"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:86 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:106
msgid "" msgid ""
"Automatically update GeoIP and GeoSite databases as well as ad filtering " "Automatically update GeoIP and GeoSite databases as well as ad filtering "
"rules through scheduled tasks." "rules through scheduled tasks."
@@ -133,11 +133,11 @@ msgstr ""
msgid "Cache Dump" msgid "Cache Dump"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:130 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:150
msgid "Check And Update" msgid "Check And Update"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:128 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:148
msgid "Check And Update GeoData." msgid "Check And Update GeoData."
msgstr "" msgstr ""
@@ -163,7 +163,7 @@ msgstr ""
msgid "Clear logs" msgid "Clear logs"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:33 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:35
msgid "Close" msgid "Close"
msgstr "" msgstr ""
@@ -246,7 +246,7 @@ msgstr ""
msgid "DNS redirect" msgid "DNS redirect"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:129 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:149
msgid "Database Update" msgid "Database Update"
msgstr "" msgstr ""
@@ -276,7 +276,7 @@ msgstr ""
msgid "DoH/TCP/DoT Connection Multiplexing idle timeout (default 30 seconds)" msgid "DoH/TCP/DoT Connection Multiplexing idle timeout (default 30 seconds)"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:91 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:111
msgid "Enable Auto Database Update" msgid "Enable Auto Database Update"
msgstr "" msgstr ""
@@ -318,35 +318,35 @@ msgstr ""
msgid "Error" msgid "Error"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:95 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:115
msgid "Every Day" msgid "Every Day"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:100 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:120
msgid "Every Friday" msgid "Every Friday"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:96 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:116
msgid "Every Monday" msgid "Every Monday"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:101 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:121
msgid "Every Saturday" msgid "Every Saturday"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:102 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:122
msgid "Every Sunday" msgid "Every Sunday"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:99 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:119
msgid "Every Thursday" msgid "Every Thursday"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:97 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:117
msgid "Every Tuesday" msgid "Every Tuesday"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:98 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:118
msgid "Every Wednesday" msgid "Every Wednesday"
msgstr "" msgstr ""
@@ -359,7 +359,7 @@ msgstr ""
msgid "Failed to clean logs." msgid "Failed to clean logs."
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:74 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:89
msgid "Failed to start update." msgid "Failed to start update."
msgstr "" msgstr ""
@@ -399,11 +399,11 @@ msgstr ""
msgid "Forward Dnsmasq Domain Name resolution requests to MosDNS" msgid "Forward Dnsmasq Domain Name resolution requests to MosDNS"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:116 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:136
msgid "Full" msgid "Full"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:114 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:134
msgid "Full: includes all Countries and Private IP addresses." msgid "Full: includes all Countries and Private IP addresses."
msgstr "" msgstr ""
@@ -415,7 +415,7 @@ msgstr ""
msgid "GeoIP Tags" msgid "GeoIP Tags"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:111 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:131
msgid "GeoIP Type" msgid "GeoIP Type"
msgstr "" msgstr ""
@@ -427,7 +427,7 @@ msgstr ""
msgid "Geodata Update" msgid "Geodata Update"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:121 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:141
msgid "GitHub Proxy" msgid "GitHub Proxy"
msgstr "" msgstr ""
@@ -503,11 +503,11 @@ msgstr ""
msgid "Listen Port" msgid "Listen Port"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:117 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:137
msgid "Little" msgid "Little"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:112 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:132
msgid "Little: only include Mainland China and Private IP addresses." msgid "Little: only include Mainland China and Private IP addresses."
msgstr "" msgstr ""
@@ -585,7 +585,7 @@ msgid ""
"Media DNS requests" "Media DNS requests"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:36 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:22
msgid "Please wait, this may take a few moments..." msgid "Please wait, this may take a few moments..."
msgstr "" msgstr ""
@@ -641,7 +641,7 @@ msgstr ""
msgid "Save the cache locally and reload the cache dump on the next startup" msgid "Save the cache locally and reload the cache dump on the next startup"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:26 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:28
msgid "Starting update..." msgid "Starting update..."
msgstr "" msgstr ""
@@ -721,32 +721,36 @@ msgstr ""
msgid "Unable to save contents: %s" msgid "Unable to save contents: %s"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:94 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:114
msgid "Update Cycle" msgid "Update Cycle"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:85 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:105
msgid "Update GeoIP & GeoSite databases" msgid "Update GeoIP & GeoSite databases"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:105 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:125
msgid "Update Time" msgid "Update Time"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:122 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:142
msgid "" msgid ""
"Update data files with GitHub Proxy, leave blank to disable proxy downloads." "Update data files with GitHub Proxy, leave blank to disable proxy downloads."
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:78 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:59
msgid "Update failed"
msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:95
msgid "Update failed: %s" msgid "Update failed: %s"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:49 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:50
msgid "Update success" msgid "Update success"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:35 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:37
msgid "Updating Database..." msgid "Updating Database..."
msgstr "" msgstr ""
@@ -781,6 +785,6 @@ msgstr ""
msgid "Xinfeng Public DNS (114.114.115.115)" msgid "Xinfeng Public DNS (114.114.115.115)"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:123 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:143
msgid "https://gh-proxy.com" msgid "https://gh-proxy.com"
msgstr "" msgstr ""
+38 -34
View File
@@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-03-20 09:23+0800\n" "POT-Creation-Date: 2026-03-20 09:23+0800\n"
"PO-Revision-Date: 2026-05-01 09:13+0800\n" "PO-Revision-Date: 2026-05-15 14:09+0800\n"
"Last-Translator: sbwml <admin@cooluc.com>\n" "Last-Translator: sbwml <admin@cooluc.com>\n"
"Language-Team: Chinese\n" "Language-Team: Chinese\n"
"Language: zh_Hans\n" "Language: zh_Hans\n"
@@ -89,7 +89,7 @@ msgstr "阿里云公共 DNS(DNS over HTTPS)"
msgid "Aliyun Public DNS (DNS over QUIC)" msgid "Aliyun Public DNS (DNS over QUIC)"
msgstr "阿里云公共 DNS(DNS over QUIC)" msgstr "阿里云公共 DNS(DNS over QUIC)"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:55 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:68
msgid "Another update is already in progress." msgid "Another update is already in progress."
msgstr "另一个更新正在进行中。" msgstr "另一个更新正在进行中。"
@@ -101,7 +101,7 @@ msgstr "Apple 域名解析优化"
msgid "Auto Save Cache Interval" msgid "Auto Save Cache Interval"
msgstr "自动保存缓存间隔(秒)" msgstr "自动保存缓存间隔(秒)"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:86 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:106
msgid "" msgid ""
"Automatically update GeoIP and GeoSite databases as well as ad filtering " "Automatically update GeoIP and GeoSite databases as well as ad filtering "
"rules through scheduled tasks." "rules through scheduled tasks."
@@ -150,11 +150,11 @@ msgstr "Bootstrap DNS 服务器用于解析您指定为上游的 DoH / DoT 解
msgid "Cache Dump" msgid "Cache Dump"
msgstr "自动保存缓存" msgstr "自动保存缓存"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:130 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:150
msgid "Check And Update" msgid "Check And Update"
msgstr "检查并更新" msgstr "检查并更新"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:128 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:148
msgid "Check And Update GeoData." msgid "Check And Update GeoData."
msgstr "检查并更新 GeoData 数据库。" msgstr "检查并更新 GeoData 数据库。"
@@ -180,7 +180,7 @@ msgstr "思科公共 DNS(208.67.222.222)"
msgid "Clear logs" msgid "Clear logs"
msgstr "清空日志" msgstr "清空日志"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:33 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:35
msgid "Close" msgid "Close"
msgstr "关闭" msgstr "关闭"
@@ -264,7 +264,7 @@ msgstr "DNS 查询请求并发数,允许同时发起请求的上游 DNS 服务
msgid "DNS redirect" msgid "DNS redirect"
msgstr "DNS 重定向" msgstr "DNS 重定向"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:129 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:149
msgid "Database Update" msgid "Database Update"
msgstr "数据库更新" msgstr "数据库更新"
@@ -295,7 +295,7 @@ msgstr ""
msgid "DoH/TCP/DoT Connection Multiplexing idle timeout (default 30 seconds)" msgid "DoH/TCP/DoT Connection Multiplexing idle timeout (default 30 seconds)"
msgstr "DoH/TCP/DoT 连接复用空闲保持时间(默认 30 秒)" msgstr "DoH/TCP/DoT 连接复用空闲保持时间(默认 30 秒)"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:91 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:111
msgid "Enable Auto Database Update" msgid "Enable Auto Database Update"
msgstr "启用自动更新" msgstr "启用自动更新"
@@ -337,35 +337,35 @@ msgstr "填写需要导出的 GeoSite.dat 类别条目,允许添加多个标
msgid "Error" msgid "Error"
msgstr "错误" msgstr "错误"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:95 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:115
msgid "Every Day" msgid "Every Day"
msgstr "每天" msgstr "每天"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:100 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:120
msgid "Every Friday" msgid "Every Friday"
msgstr "每周五" msgstr "每周五"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:96 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:116
msgid "Every Monday" msgid "Every Monday"
msgstr "每周一" msgstr "每周一"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:101 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:121
msgid "Every Saturday" msgid "Every Saturday"
msgstr "每周六" msgstr "每周六"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:102 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:122
msgid "Every Sunday" msgid "Every Sunday"
msgstr "每周日" msgstr "每周日"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:99 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:119
msgid "Every Thursday" msgid "Every Thursday"
msgstr "每周四" msgstr "每周四"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:97 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:117
msgid "Every Tuesday" msgid "Every Tuesday"
msgstr "每周二" msgstr "每周二"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:98 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:118
msgid "Every Wednesday" msgid "Every Wednesday"
msgstr "每周三" msgstr "每周三"
@@ -378,7 +378,7 @@ msgstr "导出目录:/var/mosdns"
msgid "Failed to clean logs." msgid "Failed to clean logs."
msgstr "清理日志失败:%s" msgstr "清理日志失败:%s"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:74 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:89
msgid "Failed to start update." msgid "Failed to start update."
msgstr "启动更新失败" msgstr "启动更新失败"
@@ -418,11 +418,11 @@ msgstr "强制将所有本地 DNS 查询重定向到 MosDNS,即 DNS 劫持。"
msgid "Forward Dnsmasq Domain Name resolution requests to MosDNS" msgid "Forward Dnsmasq Domain Name resolution requests to MosDNS"
msgstr "将 Dnsmasq 域名解析请求转发到 MosDNS 服务器" msgstr "将 Dnsmasq 域名解析请求转发到 MosDNS 服务器"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:116 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:136
msgid "Full" msgid "Full"
msgstr "全量" msgstr "全量"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:114 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:134
msgid "Full: includes all Countries and Private IP addresses." msgid "Full: includes all Countries and Private IP addresses."
msgstr "全量:包含所有国家和私有 IP 地址。" msgstr "全量:包含所有国家和私有 IP 地址。"
@@ -434,7 +434,7 @@ msgstr "GeoData 导出"
msgid "GeoIP Tags" msgid "GeoIP Tags"
msgstr "GeoIP 标签" msgstr "GeoIP 标签"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:111 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:131
msgid "GeoIP Type" msgid "GeoIP Type"
msgstr "GeoIP 类型" msgstr "GeoIP 类型"
@@ -446,7 +446,7 @@ msgstr "GeoSite 标签"
msgid "Geodata Update" msgid "Geodata Update"
msgstr "更新数据库" msgstr "更新数据库"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:121 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:141
msgid "GitHub Proxy" msgid "GitHub Proxy"
msgstr "GitHub 代理" msgstr "GitHub 代理"
@@ -463,7 +463,7 @@ msgstr "谷歌公共 DNS(8.8.8.8)"
#: luci-app-mosdns/root/usr/share/rpcd/acl.d/luci-app-mosdns.json:3 #: luci-app-mosdns/root/usr/share/rpcd/acl.d/luci-app-mosdns.json:3
msgid "Grant UCI access for luci-app-mosdns" msgid "Grant UCI access for luci-app-mosdns"
msgstr "" msgstr "授予 luci-app-mosdns 的 UCI 访问权限"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/rules.js:20 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/rules.js:20
msgid "Grey Lists" msgid "Grey Lists"
@@ -522,11 +522,11 @@ msgstr "监听地址"
msgid "Listen Port" msgid "Listen Port"
msgstr "监听端口" msgstr "监听端口"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:117 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:137
msgid "Little" msgid "Little"
msgstr "轻量" msgstr "轻量"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:112 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:132
msgid "Little: only include Mainland China and Private IP addresses." msgid "Little: only include Mainland China and Private IP addresses."
msgstr "轻量:仅包含中国大陆和私有 IP 地址。" msgstr "轻量:仅包含中国大陆和私有 IP 地址。"
@@ -609,7 +609,7 @@ msgstr ""
"请提供您在访问国外网站时使用的 IP 地址,这个 IP 子网(0/24)将用作 远程 / 流" "请提供您在访问国外网站时使用的 IP 地址,这个 IP 子网(0/24)将用作 远程 / 流"
"媒体 DNS 请求的 ECS 地址" "媒体 DNS 请求的 ECS 地址"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:36 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:22
msgid "Please wait, this may take a few moments..." msgid "Please wait, this may take a few moments..."
msgstr "请稍候,这可能需要一点时间..." msgstr "请稍候,这可能需要一点时间..."
@@ -667,7 +667,7 @@ msgstr "规则列表"
msgid "Save the cache locally and reload the cache dump on the next startup" msgid "Save the cache locally and reload the cache dump on the next startup"
msgstr "保存缓存到本地文件,以供下次启动时重新载入使用" msgstr "保存缓存到本地文件,以供下次启动时重新载入使用"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:26 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:28
msgid "Starting update..." msgid "Starting update..."
msgstr "" msgstr ""
@@ -751,32 +751,36 @@ msgstr "火山引擎公共 DNS(180.184.2.2)"
msgid "Unable to save contents: %s" msgid "Unable to save contents: %s"
msgstr "无法保存内容:%s" msgstr "无法保存内容:%s"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:94 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:114
msgid "Update Cycle" msgid "Update Cycle"
msgstr "更新周期" msgstr "更新周期"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:85 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:105
msgid "Update GeoIP & GeoSite databases" msgid "Update GeoIP & GeoSite databases"
msgstr "更新广告规则、GeoIP & GeoSite 数据库" msgstr "更新广告规则、GeoIP & GeoSite 数据库"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:105 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:125
msgid "Update Time" msgid "Update Time"
msgstr "更新时间" msgstr "更新时间"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:122 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:142
msgid "" msgid ""
"Update data files with GitHub Proxy, leave blank to disable proxy downloads." "Update data files with GitHub Proxy, leave blank to disable proxy downloads."
msgstr "通过 GitHub 代理更新数据文件,留空则禁用代理下载。" msgstr "通过 GitHub 代理更新数据文件,留空则禁用代理下载。"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:78 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:59
msgid "Update failed"
msgstr "更新失败"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:95
msgid "Update failed: %s" msgid "Update failed: %s"
msgstr "更新失败: %s" msgstr "更新失败: %s"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:49 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:50
msgid "Update success" msgid "Update success"
msgstr "更新成功" msgstr "更新成功"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:35 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:37
msgid "Updating Database..." msgid "Updating Database..."
msgstr "更新数据库..." msgstr "更新数据库..."
@@ -815,6 +819,6 @@ msgstr "信风公共 DNS(114.114.114.114)"
msgid "Xinfeng Public DNS (114.114.115.115)" msgid "Xinfeng Public DNS (114.114.115.115)"
msgstr "信风公共 DNS(114.114.115.115)" msgstr "信风公共 DNS(114.114.115.115)"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:123 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:143
msgid "https://gh-proxy.com" msgid "https://gh-proxy.com"
msgstr "" msgstr ""
+12 -10
View File
@@ -158,7 +158,7 @@ function update_adlist() {
print("\x1b[1;31mRules download failed.\n"); print("\x1b[1;31mRules download failed.\n");
exec_sys(`rm -rf "${ad_tmpdir}"`); exec_sys(`rm -rf "${ad_tmpdir}"`);
unlink(lock_file); unlink(lock_file);
exit(1); die("Rules download failed.");
} else { } else {
if (has_update) { if (has_update) {
mkdir('/etc/mosdns/rule/adlist', 0755); mkdir('/etc/mosdns/rule/adlist', 0755);
@@ -183,7 +183,7 @@ function update_geodat() {
let v2dat_dir = '/usr/share/v2ray'; let v2dat_dir = '/usr/share/v2ray';
let tmp_res = exec_sys('mktemp -d'); let tmp_res = exec_sys('mktemp -d');
if (tmp_res.code !== 0) exit(1); if (tmp_res.code !== 0) die("Failed to create temp directory for geodata.");
let tmpdir = tmp_res.stdout; let tmpdir = tmp_res.stdout;
exec_sys(`mkdir -p "${v2dat_dir}"`); exec_sys(`mkdir -p "${v2dat_dir}"`);
@@ -194,7 +194,7 @@ function update_geodat() {
print(`Downloading ${geoip_url}.sha256sum\n`); print(`Downloading ${geoip_url}.sha256sum\n`);
stdout.flush(); stdout.flush();
if (exec_sys(`curl --connect-timeout 5 -m 20 --ipv4 -kfSLo "${tmpdir}/geoip.dat.sha256sum" "${geoip_url}.sha256sum"`).code !== 0) { if (exec_sys(`curl --connect-timeout 5 -m 20 --ipv4 -kfSLo "${tmpdir}/geoip.dat.sha256sum" "${geoip_url}.sha256sum"`).code !== 0) {
exec_sys(`rm -rf "${tmpdir}"`); exit(1); exec_sys(`rm -rf "${tmpdir}"`); die("Failed to download geoip.dat.sha256sum");
} }
let geoip_sum_remote = split(exec_sys(`cat "${tmpdir}/geoip.dat.sha256sum"`).stdout, /[ \t\n]+/)[0]; let geoip_sum_remote = split(exec_sys(`cat "${tmpdir}/geoip.dat.sha256sum"`).stdout, /[ \t\n]+/)[0];
@@ -210,13 +210,13 @@ function update_geodat() {
print(`Downloading ${geoip_url}\n`); print(`Downloading ${geoip_url}\n`);
stdout.flush(); stdout.flush();
if (exec_sys(`curl --connect-timeout 5 -m 120 --ipv4 -kfSLo "${tmpdir}/geoip.dat" "${geoip_url}"`).code !== 0) { if (exec_sys(`curl --connect-timeout 5 -m 120 --ipv4 -kfSLo "${tmpdir}/geoip.dat" "${geoip_url}"`).code !== 0) {
exec_sys(`rm -rf "${tmpdir}"`); exit(1); exec_sys(`rm -rf "${tmpdir}"`); die("Failed to download geoip.dat");
} }
let sum_downloaded = split(exec_sys(`sha256sum "${tmpdir}/geoip.dat"`).stdout, /[ \t\n]+/)[0]; let sum_downloaded = split(exec_sys(`sha256sum "${tmpdir}/geoip.dat"`).stdout, /[ \t\n]+/)[0];
if (sum_downloaded !== geoip_sum_remote) { if (sum_downloaded !== geoip_sum_remote) {
print("\x1b[1;31mgeoip.dat checksum error\n"); print("\x1b[1;31mgeoip.dat checksum error\n");
exec_sys(`rm -rf "${tmpdir}"`); exit(1); exec_sys(`rm -rf "${tmpdir}"`); die("geoip.dat checksum error");
} }
geoip_updated = true; geoip_updated = true;
} }
@@ -227,7 +227,7 @@ function update_geodat() {
print(`Downloading ${geosite_url}.sha256sum\n`); print(`Downloading ${geosite_url}.sha256sum\n`);
stdout.flush(); stdout.flush();
if (exec_sys(`curl --connect-timeout 5 -m 20 --ipv4 -kfSLo "${tmpdir}/geosite.dat.sha256sum" "${geosite_url}.sha256sum"`).code !== 0) { if (exec_sys(`curl --connect-timeout 5 -m 20 --ipv4 -kfSLo "${tmpdir}/geosite.dat.sha256sum" "${geosite_url}.sha256sum"`).code !== 0) {
exec_sys(`rm -rf "${tmpdir}"`); exit(1); exec_sys(`rm -rf "${tmpdir}"`); die("Failed to download geosite.dat.sha256sum");
} }
let geosite_sum_remote = split(exec_sys(`cat "${tmpdir}/geosite.dat.sha256sum"`).stdout, /[ \t\n]+/)[0]; let geosite_sum_remote = split(exec_sys(`cat "${tmpdir}/geosite.dat.sha256sum"`).stdout, /[ \t\n]+/)[0];
@@ -243,13 +243,13 @@ function update_geodat() {
print(`Downloading ${geosite_url}\n`); print(`Downloading ${geosite_url}\n`);
stdout.flush(); stdout.flush();
if (exec_sys(`curl --connect-timeout 5 -m 120 --ipv4 -kfSLo "${tmpdir}/geosite.dat" "${geosite_url}"`).code !== 0) { if (exec_sys(`curl --connect-timeout 5 -m 120 --ipv4 -kfSLo "${tmpdir}/geosite.dat" "${geosite_url}"`).code !== 0) {
exec_sys(`rm -rf "${tmpdir}"`); exit(1); exec_sys(`rm -rf "${tmpdir}"`); die("Failed to download geosite.dat");
} }
let sum_downloaded = split(exec_sys(`sha256sum "${tmpdir}/geosite.dat"`).stdout, /[ \t\n]+/)[0]; let sum_downloaded = split(exec_sys(`sha256sum "${tmpdir}/geosite.dat"`).stdout, /[ \t\n]+/)[0];
if (sum_downloaded !== geosite_sum_remote) { if (sum_downloaded !== geosite_sum_remote) {
print("\x1b[1;31mgeosite.dat checksum error\n"); print("\x1b[1;31mgeosite.dat checksum error\n");
exec_sys(`rm -rf "${tmpdir}"`); exit(1); exec_sys(`rm -rf "${tmpdir}"`); die("geosite.dat checksum error");
} }
geosite_updated = true; geosite_updated = true;
} }
@@ -332,9 +332,11 @@ switch (action) {
print("UPDATE_FINISHED\n"); print("UPDATE_FINISHED\n");
stdout.flush(); stdout.flush();
} catch (e) { } catch (e) {
print("Update failed: " + e + "\n"); print("\x1b[1;31mUpdate failed: " + e + "\n\x1b[0m");
print("UPDATE_FINISHED\n"); print("UPDATE_EXITED\n");
stdout.flush(); stdout.flush();
unlink('/var/lock/mosdns_update.lock');
exit(1);
} }
unlink('/var/lock/mosdns_update.lock'); unlink('/var/lock/mosdns_update.lock');
break; break;
@@ -128,7 +128,7 @@ const methods = {
return { success: false, error: 'Another update is already in progress.' }; return { success: false, error: 'Another update is already in progress.' };
} }
exec_sys('echo "" > /var/log/mosdns_update.log'); exec_sys('echo "" > /var/log/mosdns_update.log');
exec_sys('{ /usr/share/mosdns/mosdns.uc update; rm -f /var/lock/mosdns_update.lock; echo "UPDATE_FINISHED"; } > /var/log/mosdns_update.log 2>&1 &'); exec_sys('/usr/share/mosdns/mosdns.uc update > /var/log/mosdns_update.log 2>&1 &');
return { success: true }; return { success: true };
} catch (e) { } catch (e) {
return { success: false, error: String(e) }; return { success: false, error: String(e) };