mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-01 14:33:56 +08:00
⛄ Sync 2026-06-30 01:11:33
This commit is contained in:
1 parent
fb3826f4ad
commit
a09508c01e
157 files changed
+78873
-73698
No files matched your search
@@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-daede
|
||||
PKG_VERSION:=1.14.7
|
||||
PKG_RELEASE:=24
|
||||
PKG_RELEASE:=25
|
||||
PKG_MAINTAINER:=kenzok8
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@ const DEFAULT_TEMPLATE =
|
||||
'\n' +
|
||||
'dns {\n' +
|
||||
' ipversion_prefer: 4\n' +
|
||||
' response_ttl: 0\n' +
|
||||
' upstream {\n' +
|
||||
" cndns: 'udp://dns.alidns.com:53'\n" +
|
||||
" fallbackdns: 'tcp+udp://dns.google:53'\n" +
|
||||
@@ -302,6 +303,11 @@ function renderDaeForms(ctx) {
|
||||
_('Resolves everything else.'));
|
||||
o.default = 'tcp+udp://dns.google:53';
|
||||
o.placeholder = 'tcp+udp://dns.google:53';
|
||||
o = s.option(form.Value, 'response_ttl', _('DNS response TTL'),
|
||||
_('TTL returned to LAN DNS clients. 0 keeps dae default behavior.'));
|
||||
o.datatype = 'uinteger';
|
||||
o.default = '0';
|
||||
o.placeholder = '60';
|
||||
|
||||
/* Logging — folded into the main form so the single Save button covers it
|
||||
too (no separate native save bar) */
|
||||
|
||||
@@ -845,3 +845,9 @@ msgid ""
|
||||
"%s is running. Deleting the daens netns now will break its networking until "
|
||||
"you restart it. Continue?"
|
||||
msgstr ""
|
||||
|
||||
msgid "DNS response TTL"
|
||||
msgstr ""
|
||||
|
||||
msgid "TTL returned to LAN DNS clients. 0 keeps dae default behavior."
|
||||
msgstr ""
|
||||
@@ -574,6 +574,12 @@ msgstr "兜底 DNS 上游"
|
||||
msgid "Resolves everything else."
|
||||
msgstr "解析其余域名。"
|
||||
|
||||
msgid "DNS response TTL"
|
||||
msgstr "DNS 响应 TTL"
|
||||
|
||||
msgid "TTL returned to LAN DNS clients. 0 keeps dae default behavior."
|
||||
msgstr "返回给局域网 DNS 客户端的 TTL。0 表示保持 dae 默认行为。"
|
||||
|
||||
msgid "Apply failed: %s"
|
||||
msgstr "应用失败:%s"
|
||||
|
||||
|
||||
@@ -574,6 +574,12 @@ msgstr "兜底 DNS 上游"
|
||||
msgid "Resolves everything else."
|
||||
msgstr "解析其余域名。"
|
||||
|
||||
msgid "DNS response TTL"
|
||||
msgstr "DNS 响应 TTL"
|
||||
|
||||
msgid "TTL returned to LAN DNS clients. 0 keeps dae default behavior."
|
||||
msgstr "返回给局域网 DNS 客户端的 TTL。0 表示保持 dae 默认行为。"
|
||||
|
||||
msgid "Apply failed: %s"
|
||||
msgstr "应用失败:%s"
|
||||
|
||||
|
||||
@@ -97,6 +97,7 @@ if [ -f /etc/config/dae ]; then
|
||||
uci -q set dae.dns=dns
|
||||
uci -q set dae.dns.cn_upstream='udp://dns.alidns.com:53'
|
||||
uci -q set dae.dns.fallback_upstream='tcp+udp://dns.google:53'
|
||||
uci -q set dae.dns.response_ttl='0'
|
||||
fi
|
||||
# Migrate legacy group filters to the unified source / name_filter fields,
|
||||
# then drop the old keys so the form shows real, editable values (the old
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# config group name/policy, list source, list name_filter
|
||||
# (old list filter_sub/filter_node still read as fallback)
|
||||
# config routing 'routing' private_direct/cn_direct/block_ads/fallback, list custom
|
||||
# config dns 'dns' cn_upstream/fallback_upstream
|
||||
# config dns 'dns' cn_upstream/fallback_upstream/response_ttl
|
||||
|
||||
. /lib/functions.sh
|
||||
|
||||
@@ -213,7 +213,7 @@ generate() {
|
||||
fi
|
||||
|
||||
# routing / dns singletons
|
||||
local private_direct cn_direct block_ads fallback cn_up fb_up
|
||||
local private_direct cn_direct block_ads fallback cn_up fb_up response_ttl
|
||||
config_get_bool private_direct routing private_direct 1
|
||||
config_get_bool cn_direct routing cn_direct 1
|
||||
config_get_bool block_ads routing block_ads 0
|
||||
@@ -222,8 +222,12 @@ generate() {
|
||||
fallback="$(sanitize "$fallback")"
|
||||
config_get cn_up dns cn_upstream "udp://dns.alidns.com:53"
|
||||
config_get fb_up dns fallback_upstream "tcp+udp://dns.google:53"
|
||||
config_get response_ttl dns response_ttl "0"
|
||||
cn_up="$(sanitize "$cn_up")"
|
||||
fb_up="$(sanitize "$fb_up")"
|
||||
case "$response_ttl" in
|
||||
''|*[!0-9]*) response_ttl=0 ;;
|
||||
esac
|
||||
|
||||
{
|
||||
echo "# 本配置由 luci-app-daede 表单自动生成,再次保存表单会覆盖你的手动修改。"
|
||||
@@ -258,6 +262,7 @@ generate() {
|
||||
|
||||
echo "dns {"
|
||||
echo " ipversion_prefer: 4"
|
||||
[ "$response_ttl" -gt 0 ] && echo " response_ttl: ${response_ttl}"
|
||||
echo " upstream {"
|
||||
echo " cndns: '${cn_up}'"
|
||||
echo " fallbackdns: '${fb_up}'"
|
||||
|
||||
Reference in new issue
Block a user