Compare commits

...
3 Commits
Author SHA1 Message Date
action 58ae8797b2 update 2026-08-25 04:23:01 2026-08-25 04:23:01 +08:00
action c37bb21446 update 2026-08-25 00:29:42 2026-08-25 00:29:42 +08:00
action 0f2308381e update 2026-08-24 20:37:43 2026-08-24 20:37:43 +08:00
47 changed files with 4966 additions and 4950 deletions
+2 -2
View File
@@ -1,12 +1,12 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-mosdns PKG_NAME:=luci-app-mosdns
PKG_VERSION:=1.7.8 PKG_VERSION:=1.7.9
PKG_RELEASE:=1 PKG_RELEASE:=1
LUCI_TITLE:=LuCI Support for mosdns LUCI_TITLE:=LuCI Support for mosdns
LUCI_PKGARCH:=all LUCI_PKGARCH:=all
LUCI_DEPENDS:=+mosdns +curl +v2ray-geoip +v2ray-geosite +v2dat +ucode LUCI_DEPENDS:=+mosdns +curl +v2ray-geoip +v2ray-geosite +geo2txt +ucode
PKG_MAINTAINER:=sbwml <admin@cooluc.com> PKG_MAINTAINER:=sbwml <admin@cooluc.com>
@@ -172,6 +172,11 @@ return view.extend({
o.depends('configfile', '/var/etc/mosdns.json'); o.depends('configfile', '/var/etc/mosdns.json');
o.rmempty = false; o.rmempty = false;
o = s.taboption('basic', form.Value, 'log_size', _('Log File Size'), _('Set the maximum size of the log file (in MB).'));
o.datatype = 'uinteger';
o.default = '5';
o.depends('configfile', '/var/etc/mosdns.json');
o = s.taboption('basic', form.Flag, 'redirect', _('DNS Forward'), _('Forward Dnsmasq Domain Name resolution requests to MosDNS')); o = s.taboption('basic', form.Flag, 'redirect', _('DNS Forward'), _('Forward Dnsmasq Domain Name resolution requests to MosDNS'));
o.default = false; o.default = false;
+121 -113
View File
@@ -1,15 +1,15 @@
msgid "" msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8" msgstr "Content-Type: text/plain; charset=UTF-8"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:217 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:222
msgid "360 Public DNS (DNS over HTTPS)" msgid "360 Public DNS (DNS over HTTPS)"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:380 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:385
msgid "ADblock Source" msgid "ADblock Source"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:419 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:424
msgid "API Listen port" msgid "API Listen port"
msgstr "" msgstr ""
@@ -52,25 +52,25 @@ msgstr ""
msgid "Advanced Options" msgid "Advanced Options"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:206 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:211
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:254 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:259
msgid "Aliyun Public DNS (223.5.5.5)" msgid "Aliyun Public DNS (223.5.5.5)"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:207 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:212
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:255 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:260
msgid "Aliyun Public DNS (223.6.6.6)" msgid "Aliyun Public DNS (223.6.6.6)"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:216 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:221
msgid "Aliyun Public DNS (DNS over HTTP/3)" msgid "Aliyun Public DNS (DNS over HTTP/3)"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:215 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:220
msgid "Aliyun Public DNS (DNS over HTTPS)" msgid "Aliyun Public DNS (DNS over HTTPS)"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:214 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:219
msgid "Aliyun Public DNS (DNS over QUIC)" msgid "Aliyun Public DNS (DNS over QUIC)"
msgstr "" msgstr ""
@@ -78,11 +78,11 @@ msgstr ""
msgid "Another update is already in progress." msgid "Another update is already in progress."
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:198 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:203
msgid "Apple domains optimization" msgid "Apple domains optimization"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:354 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:359
msgid "Auto Save Cache Interval" msgid "Auto Save Cache Interval"
msgstr "" msgstr ""
@@ -92,8 +92,8 @@ msgid ""
"rules through scheduled tasks." "rules through scheduled tasks."
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:212 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:217
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:258 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:263
msgid "Baidu Public DNS (180.76.76.76)" msgid "Baidu Public DNS (180.76.76.76)"
msgstr "" msgstr ""
@@ -105,7 +105,7 @@ msgstr ""
msgid "Basic Setting" msgid "Basic Setting"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:372 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:377
msgid "" msgid ""
"Block DNS RR Type 65 records (HTTPS/SVCB, used for HTTP/3, ECH, etc.), force " "Block DNS RR Type 65 records (HTTPS/SVCB, used for HTTP/3, ECH, etc.), force "
"using only A/AAAA records." "using only A/AAAA records."
@@ -119,21 +119,21 @@ msgstr ""
msgid "Block PTR" msgid "Block PTR"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:250 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:255
msgid "Bootstrap DNS servers" msgid "Bootstrap DNS servers"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:251 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:256
msgid "" msgid ""
"Bootstrap DNS servers are used to resolve IP addresses of the DoH/DoT " "Bootstrap DNS servers are used to resolve IP addresses of the DoH/DoT "
"resolvers you specify as upstreams" "resolvers you specify as upstreams"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:347 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:352
msgid "Cache Dump" msgid "Cache Dump"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:323 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:328
msgid "Cache Prefetching" msgid "Cache Prefetching"
msgstr "" msgstr ""
@@ -145,21 +145,21 @@ msgstr ""
msgid "Check And Update GeoData." msgid "Check And Update GeoData."
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:184 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:189
msgid "China DNS prefer IPv4" msgid "China DNS prefer IPv4"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:203 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:208
msgid "China DNS server" msgid "China DNS server"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:229 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:234
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:246 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:251
msgid "Cisco Public DNS (208.67.220.220)" msgid "Cisco Public DNS (208.67.220.220)"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:228 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:233
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:245 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:250
msgid "Cisco Public DNS (208.67.222.222)" msgid "Cisco Public DNS (208.67.222.222)"
msgstr "" msgstr ""
@@ -171,18 +171,18 @@ msgstr ""
msgid "Close" msgid "Close"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:223 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:228
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:240 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:245
msgid "CloudFlare Public DNS (1.0.0.1)" msgid "CloudFlare Public DNS (1.0.0.1)"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:222 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:227
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:239 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:244
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:260 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:265
msgid "CloudFlare Public DNS (1.1.1.1)" msgid "CloudFlare Public DNS (1.1.1.1)"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:404 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:409
msgid "Cloudflare IP Ranges" msgid "Cloudflare IP Ranges"
msgstr "" msgstr ""
@@ -194,7 +194,7 @@ msgstr ""
msgid "Collecting data..." msgid "Collecting data..."
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:265 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:270
msgid "Concurrent" msgid "Concurrent"
msgstr "" msgstr ""
@@ -202,11 +202,11 @@ msgstr ""
msgid "Config File" msgid "Config File"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:450 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:455
msgid "Configuration Editor" msgid "Configuration Editor"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:194 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:199
msgid "Custom China DNS" msgid "Custom China DNS"
msgstr "" msgstr ""
@@ -220,11 +220,11 @@ msgid ""
"supports domain matching rules)." "supports domain matching rules)."
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:399 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:404
msgid "Custom IP" msgid "Custom IP"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:233 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:238
msgid "Custom Stream Media DNS" msgid "Custom Stream Media DNS"
msgstr "" msgstr ""
@@ -232,21 +232,21 @@ msgstr ""
msgid "DDNS Lists" msgid "DDNS Lists"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:312 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:317
msgid "DNS Cache Size" msgid "DNS Cache Size"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:175 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:180
msgid "DNS Forward" msgid "DNS Forward"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:266 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:271
msgid "" msgid ""
"DNS query request concurrency, The number of upstream DNS servers that are " "DNS query request concurrency, The number of upstream DNS servers that are "
"allowed to initiate requests at the same time" "allowed to initiate requests at the same time"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:179 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:184
msgid "DNS redirect" msgid "DNS redirect"
msgstr "" msgstr ""
@@ -262,21 +262,21 @@ msgstr ""
msgid "Default Config" msgid "Default Config"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:371 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:376
msgid "Disable RR Type 65 (HTTPS/SVCB)" msgid "Disable RR Type 65 (HTTPS/SVCB)"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:283 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:288
msgid "Disable TLS Certificate" msgid "Disable TLS Certificate"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:284 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:289
msgid "" msgid ""
"Disable TLS Servers certificate validation, Can be useful if system CA " "Disable TLS Servers certificate validation, Can be useful if system CA "
"certificate expires or the system time is out of order" "certificate expires or the system time is out of order"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:272 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:277
msgid "DoH/TCP/DoT Connection Multiplexing idle timeout (default 30 seconds)" msgid "DoH/TCP/DoT Connection Multiplexing idle timeout (default 30 seconds)"
msgstr "" msgstr ""
@@ -284,37 +284,37 @@ msgstr ""
msgid "Enable Auto Database Update" msgid "Enable Auto Database Update"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:376 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:381
msgid "Enable DNS ADblock" msgid "Enable DNS ADblock"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:307 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:312
msgid "Enable DNS Cache" msgid "Enable DNS Cache"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:290 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:295
msgid "Enable EDNS client subnet" msgid "Enable EDNS client subnet"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:278 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:283
msgid "" msgid ""
"Enable TCP/DoT RFC 7766 new Query Pipelining connection multiplexing mode" "Enable TCP/DoT RFC 7766 new Query Pipelining connection multiplexing mode"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:302 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:307
msgid "Enable this option fallback policy forces forwarding to remote DNS" msgid "Enable this option fallback policy forces forwarding to remote DNS"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:142 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:142
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:392 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:397
msgid "Enabled" msgid "Enabled"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:477 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:482
msgid "Enter the GeoIP.dat category to be exported, Allow add multiple tags" msgid "Enter the GeoIP.dat category to be exported, Allow add multiple tags"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:472 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:477
msgid "Enter the GeoSite.dat category to be exported, Allow add multiple tags" msgid "Enter the GeoSite.dat category to be exported, Allow add multiple tags"
msgstr "" msgstr ""
@@ -354,8 +354,8 @@ msgstr ""
msgid "Every Wednesday" msgid "Every Wednesday"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:473
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:478 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:478
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:483
msgid "Export directory: /var/mosdns" msgid "Export directory: /var/mosdns"
msgstr "" msgstr ""
@@ -367,7 +367,7 @@ msgstr ""
msgid "Failed to start update." msgid "Failed to start update."
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:427 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:432
msgid "Flush DNS Cache" msgid "Flush DNS Cache"
msgstr "" msgstr ""
@@ -379,27 +379,27 @@ msgstr ""
msgid "Flushing DNS Cache Success." msgid "Flushing DNS Cache Success."
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:425 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:430
msgid "" msgid ""
"Flushing DNS Cache will clear any IP addresses or DNS records from MosDNS " "Flushing DNS Cache will clear any IP addresses or DNS records from MosDNS "
"cache." "cache."
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:194 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:199
msgid "Follow WAN interface DNS if not enabled" msgid "Follow WAN interface DNS if not enabled"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:199 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:204
msgid "" msgid ""
"For Apple domains equipped with Chinese mainland CDN, always responsive to " "For Apple domains equipped with Chinese mainland CDN, always responsive to "
"Chinese CDN IP addresses" "Chinese CDN IP addresses"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:179 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:184
msgid "Force redirect all local DNS queries to MosDNS, a.k.a. DNS Hijacking" msgid "Force redirect all local DNS queries to MosDNS, a.k.a. DNS Hijacking"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:175 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:180
msgid "Forward Dnsmasq Domain Name resolution requests to MosDNS" msgid "Forward Dnsmasq Domain Name resolution requests to MosDNS"
msgstr "" msgstr ""
@@ -415,7 +415,7 @@ msgstr ""
msgid "GeoData Export" msgid "GeoData Export"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:476 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:481
msgid "GeoIP Tags" msgid "GeoIP Tags"
msgstr "" msgstr ""
@@ -423,7 +423,7 @@ msgstr ""
msgid "GeoIP Type" msgid "GeoIP Type"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:471 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:476
msgid "GeoSite Tags" msgid "GeoSite Tags"
msgstr "" msgstr ""
@@ -435,14 +435,14 @@ msgstr ""
msgid "GitHub Proxy" msgid "GitHub Proxy"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:225 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:230
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:242 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:247
msgid "Google Public DNS (8.8.4.4)" msgid "Google Public DNS (8.8.4.4)"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:224 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:229
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:241 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:246
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:259 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:264
msgid "Google Public DNS (8.8.8.8)" msgid "Google Public DNS (8.8.8.8)"
msgstr "" msgstr ""
@@ -458,11 +458,11 @@ msgstr ""
msgid "Hosts" msgid "Hosts"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:295 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:300
msgid "IP Address" msgid "IP Address"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:405 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:410
msgid "" msgid ""
"IPv4 CIDR: <a href=\"https://www.cloudflare.com/ips-v4\" target=\"_blank" "IPv4 CIDR: <a href=\"https://www.cloudflare.com/ips-v4\" target=\"_blank"
"\">https://www.cloudflare.com/ips-v4</a> <br /> IPv6 CIDR: <a href=\"https://" "\">https://www.cloudflare.com/ips-v4</a> <br /> IPv6 CIDR: <a href=\"https://"
@@ -470,19 +470,19 @@ msgid ""
"v6</a>" "v6</a>"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:185 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:190
msgid "" msgid ""
"IPv4 is preferred for China DNS resolution of dual-stack addresses, and is " "IPv4 is preferred for China DNS resolution of dual-stack addresses, and is "
"not affected when the destination is IPv6 only" "not affected when the destination is IPv6 only"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:190 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:195
msgid "" msgid ""
"IPv4 is preferred for Remote / Streaming Media DNS resolution of dual-stack " "IPv4 is preferred for Remote / Streaming Media DNS resolution of dual-stack "
"addresses, and is not affected when the destination is IPv6 only" "addresses, and is not affected when the destination is IPv6 only"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:271 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:276
msgid "Idle Timeout" msgid "Idle Timeout"
msgstr "" msgstr ""
@@ -490,17 +490,17 @@ msgstr ""
msgid "Info" msgid "Info"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:342 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:347
msgid "" msgid ""
"Interval for the background thread to scan the cache for prefetching (in " "Interval for the background thread to scan the cache for prefetching (in "
"seconds)." "seconds)."
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:317 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:322
msgid "Lazy Cache TTL" msgid "Lazy Cache TTL"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:318 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:323
msgid "" msgid ""
"Lazy cache survival time (in second). To disable Lazy Cache, please set to 0." "Lazy cache survival time (in second). To disable Lazy Cache, please set to 0."
msgstr "" msgstr ""
@@ -529,6 +529,10 @@ msgstr ""
msgid "Log File" msgid "Log File"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:175
msgid "Log File Size"
msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:161 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:161
msgid "Log Level" msgid "Log Level"
msgstr "" msgstr ""
@@ -537,33 +541,33 @@ msgstr ""
msgid "Logs" msgid "Logs"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:393 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:398
msgid "" msgid ""
"Match the parsing result with the Cloudflare IP ranges, and when there is a " "Match the parsing result with the Cloudflare IP ranges, and when there is a "
"successful match, use the 'Custom IP' as the parsing result (experimental " "successful match, use the 'Custom IP' as the parsing result (experimental "
"feature)" "feature)"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:365 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:370
msgid "Maximum TTL" msgid "Maximum TTL"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:359 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:364
msgid "Minimum TTL" msgid "Minimum TTL"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:336 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:341
msgid "" msgid ""
"Minimum cache hits required since the last refresh to trigger a prefetch." "Minimum cache hits required since the last refresh to trigger a prefetch."
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:366 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:371
msgid "" msgid ""
"Modify the Maximum TTL value (seconds) for DNS answer results, 0 indicating " "Modify the Maximum TTL value (seconds) for DNS answer results, 0 indicating "
"no modification" "no modification"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:360 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:365
msgid "" msgid ""
"Modify the Minimum TTL value (seconds) for DNS answer results, 0 indicating " "Modify the Minimum TTL value (seconds) for DNS answer results, 0 indicating "
"no modification" "no modification"
@@ -585,7 +589,7 @@ msgstr ""
msgid "NOT RUNNING" msgid "NOT RUNNING"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:234 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:239
msgid "Netflix, Disney+, Hulu and streaming media rules list will use this DNS" msgid "Netflix, Disney+, Hulu and streaming media rules list will use this DNS"
msgstr "" msgstr ""
@@ -593,7 +597,7 @@ msgstr ""
msgid "No log data." msgid "No log data."
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:296 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:301
msgid "" msgid ""
"Please provide the IP address you use when accessing foreign websites. This " "Please provide the IP address you use when accessing foreign websites. This "
"IP subnet (0/24) will be used as the ECS address for Remote / Streaming " "IP subnet (0/24) will be used as the ECS address for Remote / Streaming "
@@ -604,38 +608,38 @@ msgstr ""
msgid "Please wait, this may take a few moments..." msgid "Please wait, this may take a few moments..."
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:329 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:334
msgid "Prefetch Before Expire" msgid "Prefetch Before Expire"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:335 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:340
msgid "Prefetch Min Hits" msgid "Prefetch Min Hits"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:341 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:346
msgid "Prefetch Scan Interval" msgid "Prefetch Scan Interval"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:330 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:335
msgid "Prefetch when the remaining TTL is less than this value (in seconds)." msgid "Prefetch when the remaining TTL is less than this value (in seconds)."
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:301 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:306
msgid "Prevent DNS Leaks" msgid "Prevent DNS Leaks"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:324 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:329
msgid "" msgid ""
"Proactively refresh hot cache entries in the background before they expire." "Proactively refresh hot cache entries in the background before they expire."
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:227 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:232
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:244 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:249
msgid "Quad9 Public DNS (149.112.112.112)" msgid "Quad9 Public DNS (149.112.112.112)"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:226 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:231
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:243 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:248
msgid "Quad9 Public DNS (9.9.9.9)" msgid "Quad9 Public DNS (9.9.9.9)"
msgstr "" msgstr ""
@@ -657,11 +661,11 @@ msgstr ""
msgid "Refresh every %s seconds." msgid "Refresh every %s seconds."
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:189 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:194
msgid "Remote DNS prefer IPv4" msgid "Remote DNS prefer IPv4"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:221 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:226
msgid "Remote DNS server" msgid "Remote DNS server"
msgstr "" msgstr ""
@@ -673,10 +677,14 @@ msgstr ""
msgid "Rules" msgid "Rules"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:348 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:353
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/basic.js:175
msgid "Set the maximum size of the log file (in MB)."
msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:28 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:28
msgid "Starting update..." msgid "Starting update..."
msgstr "" msgstr ""
@@ -685,29 +693,29 @@ msgstr ""
msgid "Streaming Media" msgid "Streaming Media"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:238 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:243
msgid "Streaming Media DNS server" msgid "Streaming Media DNS server"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:383 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:388
msgid "Support for local files, such as: file:///var/mosdns/example.txt" msgid "Support for local files, such as: file:///var/mosdns/example.txt"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:277 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:282
msgid "TCP/DoT Connection Multiplexing" msgid "TCP/DoT Connection Multiplexing"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:205 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:210
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:253 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:258
msgid "Tencent Public DNS (119.28.28.28)" msgid "Tencent Public DNS (119.28.28.28)"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:204 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:209
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:252 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:257
msgid "Tencent Public DNS (119.29.29.29)" msgid "Tencent Public DNS (119.29.29.29)"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:213 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:218
msgid "Tencent Public DNS (DNS over HTTPS)" msgid "Tencent Public DNS (DNS over HTTPS)"
msgstr "" msgstr ""
@@ -715,29 +723,29 @@ msgstr ""
msgid "The list of rules only apply to 'Default Config' profiles." msgid "The list of rules only apply to 'Default Config' profiles."
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:297 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:302
msgid "" msgid ""
"This feature is typically used when using a self-built DNS server as an " "This feature is typically used when using a self-built DNS server as an "
"Remote / Streaming Media DNS upstream (requires support from the upstream " "Remote / Streaming Media DNS upstream (requires support from the upstream "
"server)" "server)"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:451 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:456
msgid "" msgid ""
"This is the content of the file '/etc/mosdns/config_custom.yaml' from which " "This is the content of the file '/etc/mosdns/config_custom.yaml' from which "
"your MosDNS configuration will be generated. Only accepts configuration " "your MosDNS configuration will be generated. Only accepts configuration "
"content in yaml format." "content in yaml format."
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:208 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:213
msgid "TrafficRoute Public DNS (180.184.1.1)" msgid "TrafficRoute Public DNS (180.184.1.1)"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:209 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:214
msgid "TrafficRoute Public DNS (180.184.2.2)" msgid "TrafficRoute Public DNS (180.184.2.2)"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:466 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:471
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/rules.js:43 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/rules.js:43
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/rules.js:48 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/rules.js:48
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/rules.js:67 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/rules.js:67
@@ -801,7 +809,7 @@ msgid ""
"domain matching rules)." "domain matching rules)."
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:381 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:386
msgid "" msgid ""
"When using custom rule sources, please use rule types supported by MosDNS " "When using custom rule sources, please use rule types supported by MosDNS "
"(domain list or AdGuardHome rules)." "(domain list or AdGuardHome rules)."
@@ -811,13 +819,13 @@ msgstr ""
msgid "White Lists" msgid "White Lists"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:210 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:215
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:256 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:261
msgid "Xinfeng Public DNS (114.114.114.114)" msgid "Xinfeng Public DNS (114.114.114.114)"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:211 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:216
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:257 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:262
msgid "Xinfeng Public DNS (114.114.115.115)" msgid "Xinfeng Public DNS (114.114.115.115)"
msgstr "" msgstr ""
+121 -113
View File
@@ -11,15 +11,15 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:217 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:222
msgid "360 Public DNS (DNS over HTTPS)" msgid "360 Public DNS (DNS over HTTPS)"
msgstr "360 安全 DNSDNS over HTTPS" msgstr "360 安全 DNSDNS over HTTPS"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:380 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:385
msgid "ADblock Source" msgid "ADblock Source"
msgstr "广告过滤规则来源" msgstr "广告过滤规则来源"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:419 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:424
msgid "API Listen port" msgid "API Listen port"
msgstr "API 监听端口" msgstr "API 监听端口"
@@ -67,25 +67,25 @@ msgstr "加入的域名将阻止 PTR 请求(每个域名一行,支持域名
msgid "Advanced Options" msgid "Advanced Options"
msgstr "高级选项" msgstr "高级选项"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:206 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:211
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:254 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:259
msgid "Aliyun Public DNS (223.5.5.5)" msgid "Aliyun Public DNS (223.5.5.5)"
msgstr "阿里云公共 DNS223.5.5.5" msgstr "阿里云公共 DNS223.5.5.5"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:207 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:212
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:255 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:260
msgid "Aliyun Public DNS (223.6.6.6)" msgid "Aliyun Public DNS (223.6.6.6)"
msgstr "阿里云公共 DNS223.6.6.6" msgstr "阿里云公共 DNS223.6.6.6"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:216 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:221
msgid "Aliyun Public DNS (DNS over HTTP/3)" msgid "Aliyun Public DNS (DNS over HTTP/3)"
msgstr "阿里云公共 DNSDNS over HTTP/3" msgstr "阿里云公共 DNSDNS over HTTP/3"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:215 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:220
msgid "Aliyun Public DNS (DNS over HTTPS)" msgid "Aliyun Public DNS (DNS over HTTPS)"
msgstr "阿里云公共 DNSDNS over HTTPS" msgstr "阿里云公共 DNSDNS over HTTPS"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:214 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:219
msgid "Aliyun Public DNS (DNS over QUIC)" msgid "Aliyun Public DNS (DNS over QUIC)"
msgstr "阿里云公共 DNSDNS over QUIC" msgstr "阿里云公共 DNSDNS over QUIC"
@@ -93,11 +93,11 @@ msgstr "阿里云公共 DNSDNS over QUIC"
msgid "Another update is already in progress." msgid "Another update is already in progress."
msgstr "另一个更新正在进行中。" msgstr "另一个更新正在进行中。"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:198 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:203
msgid "Apple domains optimization" msgid "Apple domains optimization"
msgstr "Apple 域名解析优化" msgstr "Apple 域名解析优化"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:354 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:359
msgid "Auto Save Cache Interval" msgid "Auto Save Cache Interval"
msgstr "自动保存缓存间隔(秒)" msgstr "自动保存缓存间隔(秒)"
@@ -107,8 +107,8 @@ msgid ""
"rules through scheduled tasks." "rules through scheduled tasks."
msgstr "通过定时任务自动更新 GeoIP 和 GeoSite 数据库以及广告过滤规则。" msgstr "通过定时任务自动更新 GeoIP 和 GeoSite 数据库以及广告过滤规则。"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:212 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:217
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:258 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:263
msgid "Baidu Public DNS (180.76.76.76)" msgid "Baidu Public DNS (180.76.76.76)"
msgstr "百度公共 DNS180.76.76.76" msgstr "百度公共 DNS180.76.76.76"
@@ -120,7 +120,7 @@ msgstr "基本选项"
msgid "Basic Setting" msgid "Basic Setting"
msgstr "基本设置" msgstr "基本设置"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:372 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:377
msgid "" msgid ""
"Block DNS RR Type 65 records (HTTPS/SVCB, used for HTTP/3, ECH, etc.), force " "Block DNS RR Type 65 records (HTTPS/SVCB, used for HTTP/3, ECH, etc.), force "
"using only A/AAAA records." "using only A/AAAA records."
@@ -136,21 +136,21 @@ msgstr "黑名单"
msgid "Block PTR" msgid "Block PTR"
msgstr "PTR 黑名单" msgstr "PTR 黑名单"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:250 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:255
msgid "Bootstrap DNS servers" msgid "Bootstrap DNS servers"
msgstr "Bootstrap DNS 服务器" msgstr "Bootstrap DNS 服务器"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:251 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:256
msgid "" msgid ""
"Bootstrap DNS servers are used to resolve IP addresses of the DoH/DoT " "Bootstrap DNS servers are used to resolve IP addresses of the DoH/DoT "
"resolvers you specify as upstreams" "resolvers you specify as upstreams"
msgstr "Bootstrap DNS 服务器用于解析您指定为上游的 DoH / DoT 解析器的 IP 地址" msgstr "Bootstrap DNS 服务器用于解析您指定为上游的 DoH / DoT 解析器的 IP 地址"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:347 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:352
msgid "Cache Dump" msgid "Cache Dump"
msgstr "自动保存缓存" msgstr "自动保存缓存"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:323 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:328
msgid "Cache Prefetching" msgid "Cache Prefetching"
msgstr "缓存预取" msgstr "缓存预取"
@@ -162,21 +162,21 @@ msgstr "检查并更新"
msgid "Check And Update GeoData." msgid "Check And Update GeoData."
msgstr "检查并更新 GeoData 数据库。" msgstr "检查并更新 GeoData 数据库。"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:184 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:189
msgid "China DNS prefer IPv4" msgid "China DNS prefer IPv4"
msgstr "国内 DNS 首选 IPv4" msgstr "国内 DNS 首选 IPv4"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:203 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:208
msgid "China DNS server" msgid "China DNS server"
msgstr "国内 DNS 服务器" msgstr "国内 DNS 服务器"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:229 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:234
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:246 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:251
msgid "Cisco Public DNS (208.67.220.220)" msgid "Cisco Public DNS (208.67.220.220)"
msgstr "思科公共 DNS208.67.220.220" msgstr "思科公共 DNS208.67.220.220"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:228 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:233
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:245 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:250
msgid "Cisco Public DNS (208.67.222.222)" msgid "Cisco Public DNS (208.67.222.222)"
msgstr "思科公共 DNS208.67.222.222" msgstr "思科公共 DNS208.67.222.222"
@@ -188,18 +188,18 @@ msgstr "清空日志"
msgid "Close" msgid "Close"
msgstr "关闭" msgstr "关闭"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:223 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:228
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:240 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:245
msgid "CloudFlare Public DNS (1.0.0.1)" msgid "CloudFlare Public DNS (1.0.0.1)"
msgstr "CloudFlare 公共 DNS1.0.0.1" msgstr "CloudFlare 公共 DNS1.0.0.1"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:222 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:227
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:239 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:244
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:260 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:265
msgid "CloudFlare Public DNS (1.1.1.1)" msgid "CloudFlare Public DNS (1.1.1.1)"
msgstr "CloudFlare 公共 DNS1.1.1.1" msgstr "CloudFlare 公共 DNS1.1.1.1"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:404 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:409
msgid "Cloudflare IP Ranges" msgid "Cloudflare IP Ranges"
msgstr "Cloudflare IP 范围" msgstr "Cloudflare IP 范围"
@@ -211,7 +211,7 @@ msgstr "Cloudflare 选项"
msgid "Collecting data..." msgid "Collecting data..."
msgstr "获取数据中..." msgstr "获取数据中..."
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:265 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:270
msgid "Concurrent" msgid "Concurrent"
msgstr "DNS 服务器并发数(默认 2" msgstr "DNS 服务器并发数(默认 2"
@@ -219,11 +219,11 @@ msgstr "DNS 服务器并发数(默认 2"
msgid "Config File" msgid "Config File"
msgstr "配置文件" msgstr "配置文件"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:450 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:455
msgid "Configuration Editor" msgid "Configuration Editor"
msgstr "配置编辑器" msgstr "配置编辑器"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:194 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:199
msgid "Custom China DNS" msgid "Custom China DNS"
msgstr "自定义国内 DNS" msgstr "自定义国内 DNS"
@@ -238,11 +238,11 @@ msgid ""
msgstr "" msgstr ""
"自定义 Hosts 重写,如:baidu.com 10.0.0.1(每个规则一行,支持域名匹配规则)" "自定义 Hosts 重写,如:baidu.com 10.0.0.1(每个规则一行,支持域名匹配规则)"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:399 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:404
msgid "Custom IP" msgid "Custom IP"
msgstr "自选 IP" msgstr "自选 IP"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:233 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:238
msgid "Custom Stream Media DNS" msgid "Custom Stream Media DNS"
msgstr "自定义流媒体 DNS" msgstr "自定义流媒体 DNS"
@@ -250,21 +250,21 @@ msgstr "自定义流媒体 DNS"
msgid "DDNS Lists" msgid "DDNS Lists"
msgstr "DDNS 域名" msgstr "DDNS 域名"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:312 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:317
msgid "DNS Cache Size" msgid "DNS Cache Size"
msgstr "DNS 缓存大小" msgstr "DNS 缓存大小"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:175 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:180
msgid "DNS Forward" msgid "DNS Forward"
msgstr "DNS 转发" msgstr "DNS 转发"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:266 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:271
msgid "" msgid ""
"DNS query request concurrency, The number of upstream DNS servers that are " "DNS query request concurrency, The number of upstream DNS servers that are "
"allowed to initiate requests at the same time" "allowed to initiate requests at the same time"
msgstr "DNS 查询请求并发数,允许同时发起请求的上游 DNS 服务器数量" msgstr "DNS 查询请求并发数,允许同时发起请求的上游 DNS 服务器数量"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:179 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:184
msgid "DNS redirect" msgid "DNS redirect"
msgstr "DNS 重定向" msgstr "DNS 重定向"
@@ -280,22 +280,22 @@ msgstr "调试"
msgid "Default Config" msgid "Default Config"
msgstr "内置预设" msgstr "内置预设"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:371 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:376
msgid "Disable RR Type 65 (HTTPS/SVCB)" msgid "Disable RR Type 65 (HTTPS/SVCB)"
msgstr "禁用 RR Type 65 (HTTPS/SVCB)" msgstr "禁用 RR Type 65 (HTTPS/SVCB)"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:283 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:288
msgid "Disable TLS Certificate" msgid "Disable TLS Certificate"
msgstr "禁用 TLS 证书" msgstr "禁用 TLS 证书"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:284 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:289
msgid "" msgid ""
"Disable TLS Servers certificate validation, Can be useful if system CA " "Disable TLS Servers certificate validation, Can be useful if system CA "
"certificate expires or the system time is out of order" "certificate expires or the system time is out of order"
msgstr "" msgstr ""
"禁用 TLS 服务器证书验证,当系统 CA 证书过期或系统时间错乱时,本选项可能会有用" "禁用 TLS 服务器证书验证,当系统 CA 证书过期或系统时间错乱时,本选项可能会有用"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:272 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:277
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 秒)"
@@ -303,37 +303,37 @@ msgstr "DoH/TCP/DoT 连接复用空闲保持时间(默认 30 秒)"
msgid "Enable Auto Database Update" msgid "Enable Auto Database Update"
msgstr "启用自动更新" msgstr "启用自动更新"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:376 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:381
msgid "Enable DNS ADblock" msgid "Enable DNS ADblock"
msgstr "启用 DNS 广告过滤" msgstr "启用 DNS 广告过滤"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:307 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:312
msgid "Enable DNS Cache" msgid "Enable DNS Cache"
msgstr "启用 DNS 缓存" msgstr "启用 DNS 缓存"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:290 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:295
msgid "Enable EDNS client subnet" msgid "Enable EDNS client subnet"
msgstr "启用 EDNS 客户端子网" msgstr "启用 EDNS 客户端子网"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:278 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:283
msgid "" msgid ""
"Enable TCP/DoT RFC 7766 new Query Pipelining connection multiplexing mode" "Enable TCP/DoT RFC 7766 new Query Pipelining connection multiplexing mode"
msgstr "启用 TCP/DoT RFC 7766 新型 Query Pipelining 连接复用模式" msgstr "启用 TCP/DoT RFC 7766 新型 Query Pipelining 连接复用模式"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:302 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:307
msgid "Enable this option fallback policy forces forwarding to remote DNS" msgid "Enable this option fallback policy forces forwarding to remote DNS"
msgstr "启用此选项 fallback 策略会强制转发到远程 DNS" msgstr "启用此选项 fallback 策略会强制转发到远程 DNS"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:142 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:142
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:392 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:397
msgid "Enabled" msgid "Enabled"
msgstr "启用" msgstr "启用"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:477 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:482
msgid "Enter the GeoIP.dat category to be exported, Allow add multiple tags" msgid "Enter the GeoIP.dat category to be exported, Allow add multiple tags"
msgstr "输入需要导出的 GeoIP.dat 类别条目,允许添加多个标签" msgstr "输入需要导出的 GeoIP.dat 类别条目,允许添加多个标签"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:472 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:477
msgid "Enter the GeoSite.dat category to be exported, Allow add multiple tags" msgid "Enter the GeoSite.dat category to be exported, Allow add multiple tags"
msgstr "填写需要导出的 GeoSite.dat 类别条目,允许添加多个标签" msgstr "填写需要导出的 GeoSite.dat 类别条目,允许添加多个标签"
@@ -373,8 +373,8 @@ msgstr "每周二"
msgid "Every Wednesday" msgid "Every Wednesday"
msgstr "每周三" msgstr "每周三"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:473
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:478 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:478
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:483
msgid "Export directory: /var/mosdns" msgid "Export directory: /var/mosdns"
msgstr "导出目录:/var/mosdns" msgstr "导出目录:/var/mosdns"
@@ -386,7 +386,7 @@ msgstr "清理日志失败:%s"
msgid "Failed to start update." msgid "Failed to start update."
msgstr "启动更新失败" msgstr "启动更新失败"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:427 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:432
msgid "Flush DNS Cache" msgid "Flush DNS Cache"
msgstr "刷新 DNS 缓存" msgstr "刷新 DNS 缓存"
@@ -398,27 +398,27 @@ msgstr "刷新 DNS 缓存失败,请检查 MosDNS 状态是否在运行中。"
msgid "Flushing DNS Cache Success." msgid "Flushing DNS Cache Success."
msgstr "刷新 DNS 缓存成功" msgstr "刷新 DNS 缓存成功"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:425 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:430
msgid "" msgid ""
"Flushing DNS Cache will clear any IP addresses or DNS records from MosDNS " "Flushing DNS Cache will clear any IP addresses or DNS records from MosDNS "
"cache." "cache."
msgstr "刷新 DNS 缓存会清空 MosDNS 所有 IP 地址和 DNS 解析缓存。" msgstr "刷新 DNS 缓存会清空 MosDNS 所有 IP 地址和 DNS 解析缓存。"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:194 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:199
msgid "Follow WAN interface DNS if not enabled" msgid "Follow WAN interface DNS if not enabled"
msgstr "不启用则使用 WAN 接口 DNS" msgstr "不启用则使用 WAN 接口 DNS"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:199 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:204
msgid "" msgid ""
"For Apple domains equipped with Chinese mainland CDN, always responsive to " "For Apple domains equipped with Chinese mainland CDN, always responsive to "
"Chinese CDN IP addresses" "Chinese CDN IP addresses"
msgstr "配备中国大陆 CDN 的 Apple 域名,始终应答中国大陆 CDN 地址" msgstr "配备中国大陆 CDN 的 Apple 域名,始终应答中国大陆 CDN 地址"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:179 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:184
msgid "Force redirect all local DNS queries to MosDNS, a.k.a. DNS Hijacking" msgid "Force redirect all local DNS queries to MosDNS, a.k.a. DNS Hijacking"
msgstr "强制将所有本地 DNS 查询重定向到 MosDNS,即 DNS 劫持。" msgstr "强制将所有本地 DNS 查询重定向到 MosDNS,即 DNS 劫持。"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:175 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:180
msgid "Forward Dnsmasq Domain Name resolution requests to MosDNS" msgid "Forward Dnsmasq Domain Name resolution requests to MosDNS"
msgstr "将 Dnsmasq 域名解析请求转发到 MosDNS 服务器" msgstr "将 Dnsmasq 域名解析请求转发到 MosDNS 服务器"
@@ -434,7 +434,7 @@ msgstr "全量:包含所有国家和私有 IP 地址。"
msgid "GeoData Export" msgid "GeoData Export"
msgstr "GeoData 导出" msgstr "GeoData 导出"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:476 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:481
msgid "GeoIP Tags" msgid "GeoIP Tags"
msgstr "GeoIP 标签" msgstr "GeoIP 标签"
@@ -442,7 +442,7 @@ msgstr "GeoIP 标签"
msgid "GeoIP Type" msgid "GeoIP Type"
msgstr "GeoIP 类型" msgstr "GeoIP 类型"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:471 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:476
msgid "GeoSite Tags" msgid "GeoSite Tags"
msgstr "GeoSite 标签" msgstr "GeoSite 标签"
@@ -454,14 +454,14 @@ msgstr "更新数据库"
msgid "GitHub Proxy" msgid "GitHub Proxy"
msgstr "GitHub 代理" msgstr "GitHub 代理"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:225 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:230
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:242 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:247
msgid "Google Public DNS (8.8.4.4)" msgid "Google Public DNS (8.8.4.4)"
msgstr "谷歌公共 DNS8.8.4.4" msgstr "谷歌公共 DNS8.8.4.4"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:224 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:229
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:241 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:246
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:259 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:264
msgid "Google Public DNS (8.8.8.8)" msgid "Google Public DNS (8.8.8.8)"
msgstr "谷歌公共 DNS8.8.8.8" msgstr "谷歌公共 DNS8.8.8.8"
@@ -477,11 +477,11 @@ msgstr "灰名单"
msgid "Hosts" msgid "Hosts"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:295 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:300
msgid "IP Address" msgid "IP Address"
msgstr "IP 地址" msgstr "IP 地址"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:405 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:410
msgid "" msgid ""
"IPv4 CIDR: <a href=\"https://www.cloudflare.com/ips-v4\" target=\"_blank" "IPv4 CIDR: <a href=\"https://www.cloudflare.com/ips-v4\" target=\"_blank"
"\">https://www.cloudflare.com/ips-v4</a> <br /> IPv6 CIDR: <a href=\"https://" "\">https://www.cloudflare.com/ips-v4</a> <br /> IPv6 CIDR: <a href=\"https://"
@@ -489,19 +489,19 @@ msgid ""
"v6</a>" "v6</a>"
msgstr "" msgstr ""
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:185 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:190
msgid "" msgid ""
"IPv4 is preferred for China DNS resolution of dual-stack addresses, and is " "IPv4 is preferred for China DNS resolution of dual-stack addresses, and is "
"not affected when the destination is IPv6 only" "not affected when the destination is IPv6 only"
msgstr "国内 DNS 解析双栈地址时首选 IPv4,目标仅 IPv6 时不受影响" msgstr "国内 DNS 解析双栈地址时首选 IPv4,目标仅 IPv6 时不受影响"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:190 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:195
msgid "" msgid ""
"IPv4 is preferred for Remote / Streaming Media DNS resolution of dual-stack " "IPv4 is preferred for Remote / Streaming Media DNS resolution of dual-stack "
"addresses, and is not affected when the destination is IPv6 only" "addresses, and is not affected when the destination is IPv6 only"
msgstr "远程 / 流媒体 DNS 解析双栈地址时首选 IPv4,目标仅 IPv6 时不受影响" msgstr "远程 / 流媒体 DNS 解析双栈地址时首选 IPv4,目标仅 IPv6 时不受影响"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:271 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:276
msgid "Idle Timeout" msgid "Idle Timeout"
msgstr "空闲超时" msgstr "空闲超时"
@@ -509,17 +509,17 @@ msgstr "空闲超时"
msgid "Info" msgid "Info"
msgstr "信息" msgstr "信息"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:342 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:347
msgid "" msgid ""
"Interval for the background thread to scan the cache for prefetching (in " "Interval for the background thread to scan the cache for prefetching (in "
"seconds)." "seconds)."
msgstr "后台线程扫描缓存以进行预取的时间间隔(单位:秒)" msgstr "后台线程扫描缓存以进行预取的时间间隔(单位:秒)"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:317 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:322
msgid "Lazy Cache TTL" msgid "Lazy Cache TTL"
msgstr "乐观缓存 TTL" msgstr "乐观缓存 TTL"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:318 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:323
msgid "" msgid ""
"Lazy cache survival time (in second). To disable Lazy Cache, please set to 0." "Lazy cache survival time (in second). To disable Lazy Cache, please set to 0."
msgstr "乐观缓存生存时间(单位:秒),要禁用乐观缓存,请设置为 0" msgstr "乐观缓存生存时间(单位:秒),要禁用乐观缓存,请设置为 0"
@@ -548,6 +548,10 @@ msgstr "日志数据"
msgid "Log File" msgid "Log File"
msgstr "日志文件" msgstr "日志文件"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:175
msgid "Log File Size"
msgstr "日志文件大小"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:161 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:161
msgid "Log Level" msgid "Log Level"
msgstr "日志等级" msgstr "日志等级"
@@ -556,7 +560,7 @@ msgstr "日志等级"
msgid "Logs" msgid "Logs"
msgstr "日志" msgstr "日志"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:393 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:398
#, fuzzy #, fuzzy
msgid "" msgid ""
"Match the parsing result with the Cloudflare IP ranges, and when there is a " "Match the parsing result with the Cloudflare IP ranges, and when there is a "
@@ -566,26 +570,26 @@ msgstr ""
"将解析结果与 Cloudflare IP 范围进行匹配,当匹配成功时,使用 “自选 IP” 作为解" "将解析结果与 Cloudflare IP 范围进行匹配,当匹配成功时,使用 “自选 IP” 作为解"
"析结果(实验性功能)" "析结果(实验性功能)"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:365 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:370
msgid "Maximum TTL" msgid "Maximum TTL"
msgstr "覆盖最大 TTL 值(默认 0" msgstr "覆盖最大 TTL 值(默认 0"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:359 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:364
msgid "Minimum TTL" msgid "Minimum TTL"
msgstr "覆盖最小 TTL 值(默认 0" msgstr "覆盖最小 TTL 值(默认 0"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:336 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:341
msgid "" msgid ""
"Minimum cache hits required since the last refresh to trigger a prefetch." "Minimum cache hits required since the last refresh to trigger a prefetch."
msgstr "触发预取所需的最小缓存命中次数(自上次刷新起)" msgstr "触发预取所需的最小缓存命中次数(自上次刷新起)"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:366 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:371
msgid "" msgid ""
"Modify the Maximum TTL value (seconds) for DNS answer results, 0 indicating " "Modify the Maximum TTL value (seconds) for DNS answer results, 0 indicating "
"no modification" "no modification"
msgstr "修改 DNS 应答结果的最大 TTL 值(秒),0 表示不修改" msgstr "修改 DNS 应答结果的最大 TTL 值(秒),0 表示不修改"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:360 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:365
msgid "" msgid ""
"Modify the Minimum TTL value (seconds) for DNS answer results, 0 indicating " "Modify the Minimum TTL value (seconds) for DNS answer results, 0 indicating "
"no modification" "no modification"
@@ -607,7 +611,7 @@ msgstr "MosDNS 是一个插件化的 DNS 转发/分流器。"
msgid "NOT RUNNING" msgid "NOT RUNNING"
msgstr "未运行" msgstr "未运行"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:234 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:239
msgid "Netflix, Disney+, Hulu and streaming media rules list will use this DNS" msgid "Netflix, Disney+, Hulu and streaming media rules list will use this DNS"
msgstr "自定义 Netflix、Disney+、Hulu 以及 “流媒体” 规则列表的 DNS 服务器" msgstr "自定义 Netflix、Disney+、Hulu 以及 “流媒体” 规则列表的 DNS 服务器"
@@ -615,7 +619,7 @@ msgstr "自定义 Netflix、Disney+、Hulu 以及 “流媒体” 规则列表
msgid "No log data." msgid "No log data."
msgstr "无日志数据。" msgstr "无日志数据。"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:296 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:301
msgid "" msgid ""
"Please provide the IP address you use when accessing foreign websites. This " "Please provide the IP address you use when accessing foreign websites. This "
"IP subnet (0/24) will be used as the ECS address for Remote / Streaming " "IP subnet (0/24) will be used as the ECS address for Remote / Streaming "
@@ -628,38 +632,38 @@ msgstr ""
msgid "Please wait, this may take a few moments..." msgid "Please wait, this may take a few moments..."
msgstr "请稍候,这可能需要一点时间..." msgstr "请稍候,这可能需要一点时间..."
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:329 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:334
msgid "Prefetch Before Expire" msgid "Prefetch Before Expire"
msgstr "预取触发阈值" msgstr "预取触发阈值"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:335 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:340
msgid "Prefetch Min Hits" msgid "Prefetch Min Hits"
msgstr "预取最小命中次数" msgstr "预取最小命中次数"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:341 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:346
msgid "Prefetch Scan Interval" msgid "Prefetch Scan Interval"
msgstr "预取扫描周期" msgstr "预取扫描周期"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:330 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:335
msgid "Prefetch when the remaining TTL is less than this value (in seconds)." msgid "Prefetch when the remaining TTL is less than this value (in seconds)."
msgstr "当剩余 TTL 小于此值(秒)时触发预取" msgstr "当剩余 TTL 小于此值(秒)时触发预取"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:301 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:306
msgid "Prevent DNS Leaks" msgid "Prevent DNS Leaks"
msgstr "防止 DNS 泄漏" msgstr "防止 DNS 泄漏"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:324 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:329
msgid "" msgid ""
"Proactively refresh hot cache entries in the background before they expire." "Proactively refresh hot cache entries in the background before they expire."
msgstr "在缓存到期前,后台主动预取并刷新高频访问的 DNS 记录" msgstr "在缓存到期前,后台主动预取并刷新高频访问的 DNS 记录"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:227 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:232
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:244 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:249
msgid "Quad9 Public DNS (149.112.112.112)" msgid "Quad9 Public DNS (149.112.112.112)"
msgstr "Quad9 公共 DNS149.112.112.112" msgstr "Quad9 公共 DNS149.112.112.112"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:226 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:231
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:243 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:248
msgid "Quad9 Public DNS (9.9.9.9)" msgid "Quad9 Public DNS (9.9.9.9)"
msgstr "Quad9 公共 DNS9.9.9.9" msgstr "Quad9 公共 DNS9.9.9.9"
@@ -683,11 +687,11 @@ msgstr ""
msgid "Refresh every %s seconds." msgid "Refresh every %s seconds."
msgstr "每 %s 秒刷新。" msgstr "每 %s 秒刷新。"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:189 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:194
msgid "Remote DNS prefer IPv4" msgid "Remote DNS prefer IPv4"
msgstr "远程 DNS 首选 IPv4" msgstr "远程 DNS 首选 IPv4"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:221 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:226
msgid "Remote DNS server" msgid "Remote DNS server"
msgstr "远程 DNS 服务器" msgstr "远程 DNS 服务器"
@@ -699,10 +703,14 @@ msgstr "自定义规则列表"
msgid "Rules" msgid "Rules"
msgstr "规则列表" msgstr "规则列表"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:348 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:353
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/basic.js:175
msgid "Set the maximum size of the log file (in MB)."
msgstr "设置日志文件的最大容量(单位:MB)。"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:28 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/update.js:28
msgid "Starting update..." msgid "Starting update..."
msgstr "" msgstr ""
@@ -711,29 +719,29 @@ msgstr ""
msgid "Streaming Media" msgid "Streaming Media"
msgstr "流媒体" msgstr "流媒体"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:238 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:243
msgid "Streaming Media DNS server" msgid "Streaming Media DNS server"
msgstr "流媒体 DNS 服务器" msgstr "流媒体 DNS 服务器"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:383 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:388
msgid "Support for local files, such as: file:///var/mosdns/example.txt" msgid "Support for local files, such as: file:///var/mosdns/example.txt"
msgstr "支持本地文件,例如:file:///var/mosdns/example.txt" msgstr "支持本地文件,例如:file:///var/mosdns/example.txt"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:277 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:282
msgid "TCP/DoT Connection Multiplexing" msgid "TCP/DoT Connection Multiplexing"
msgstr "TCP/DoT 连接复用" msgstr "TCP/DoT 连接复用"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:205 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:210
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:253 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:258
msgid "Tencent Public DNS (119.28.28.28)" msgid "Tencent Public DNS (119.28.28.28)"
msgstr "腾讯公共 DNS119.28.28.28" msgstr "腾讯公共 DNS119.28.28.28"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:204 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:209
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:252 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:257
msgid "Tencent Public DNS (119.29.29.29)" msgid "Tencent Public DNS (119.29.29.29)"
msgstr "腾讯公共 DNS119.29.29.29" msgstr "腾讯公共 DNS119.29.29.29"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:213 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:218
msgid "Tencent Public DNS (DNS over HTTPS)" msgid "Tencent Public DNS (DNS over HTTPS)"
msgstr "腾讯公共 DNSDNS over HTTPS" msgstr "腾讯公共 DNSDNS over HTTPS"
@@ -741,7 +749,7 @@ msgstr "腾讯公共 DNSDNS over HTTPS"
msgid "The list of rules only apply to 'Default Config' profiles." msgid "The list of rules only apply to 'Default Config' profiles."
msgstr "规则列表仅适用于 “内置预设” 配置文件。" msgstr "规则列表仅适用于 “内置预设” 配置文件。"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:297 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:302
msgid "" msgid ""
"This feature is typically used when using a self-built DNS server as an " "This feature is typically used when using a self-built DNS server as an "
"Remote / Streaming Media DNS upstream (requires support from the upstream " "Remote / Streaming Media DNS upstream (requires support from the upstream "
@@ -750,7 +758,7 @@ msgstr ""
"此功能通常在使用自建 DNS 服务器作为 远程 / 流媒体 DNS 上游时使用(需要上游服" "此功能通常在使用自建 DNS 服务器作为 远程 / 流媒体 DNS 上游时使用(需要上游服"
"务器的支持)" "务器的支持)"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:451 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:456
msgid "" msgid ""
"This is the content of the file '/etc/mosdns/config_custom.yaml' from which " "This is the content of the file '/etc/mosdns/config_custom.yaml' from which "
"your MosDNS configuration will be generated. Only accepts configuration " "your MosDNS configuration will be generated. Only accepts configuration "
@@ -759,15 +767,15 @@ msgstr ""
"这是文件 “/etc/mosdns/config_custom.yaml” 的内容,您的 MosDNS 配置将从此文件" "这是文件 “/etc/mosdns/config_custom.yaml” 的内容,您的 MosDNS 配置将从此文件"
"生成。仅接受 yaml 格式的配置内容。" "生成。仅接受 yaml 格式的配置内容。"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:208 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:213
msgid "TrafficRoute Public DNS (180.184.1.1)" msgid "TrafficRoute Public DNS (180.184.1.1)"
msgstr "火山引擎公共 DNS180.184.1.1" msgstr "火山引擎公共 DNS180.184.1.1"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:209 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:214
msgid "TrafficRoute Public DNS (180.184.2.2)" msgid "TrafficRoute Public DNS (180.184.2.2)"
msgstr "火山引擎公共 DNS180.184.2.2" msgstr "火山引擎公共 DNS180.184.2.2"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:466 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:471
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/rules.js:43 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/rules.js:43
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/rules.js:48 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/rules.js:48
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/rules.js:67 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/rules.js:67
@@ -833,7 +841,7 @@ msgstr ""
"启用 “自定义流媒体 DNS” 时,加入的域名始终使用 “流媒体 DNS 服务器” 进行解析" "启用 “自定义流媒体 DNS” 时,加入的域名始终使用 “流媒体 DNS 服务器” 进行解析"
"(每个域名一行,支持域名匹配规则)" "(每个域名一行,支持域名匹配规则)"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:381 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:386
msgid "" msgid ""
"When using custom rule sources, please use rule types supported by MosDNS " "When using custom rule sources, please use rule types supported by MosDNS "
"(domain list or AdGuardHome rules)." "(domain list or AdGuardHome rules)."
@@ -845,13 +853,13 @@ msgstr ""
msgid "White Lists" msgid "White Lists"
msgstr "白名单" msgstr "白名单"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:210 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:215
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:256 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:261
msgid "Xinfeng Public DNS (114.114.114.114)" msgid "Xinfeng Public DNS (114.114.114.114)"
msgstr "信风公共 DNS114.114.114.114" msgstr "信风公共 DNS114.114.114.114"
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:211 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:216
#: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:257 #: luci-app-mosdns/htdocs/luci-static/resources/view/mosdns/basic.js:262
msgid "Xinfeng Public DNS (114.114.115.115)" msgid "Xinfeng Public DNS (114.114.115.115)"
msgstr "信风公共 DNS114.114.115.115" msgstr "信风公共 DNS114.114.115.115"
+1
View File
@@ -10,6 +10,7 @@ config mosdns 'config'
option configfile '/var/etc/mosdns.json' option configfile '/var/etc/mosdns.json'
option log_level 'info' option log_level 'info'
option log_file '/var/log/mosdns.log' option log_file '/var/log/mosdns.log'
option log_size '5'
option cache '1' option cache '1'
option concurrent '2' option concurrent '2'
option idle_timeout '30' option idle_timeout '30'
+2
View File
@@ -33,6 +33,7 @@ get_config() {
config_get listen_port $1 listen_port 5335 config_get listen_port $1 listen_port 5335
config_get listen_address $1 listen_address "0.0.0.0" config_get listen_address $1 listen_address "0.0.0.0"
config_get log_file $1 log_file "/var/log/mosdns.log" config_get log_file $1 log_file "/var/log/mosdns.log"
config_get log_size $1 log_size "5"
config_get log_level $1 log_level "info" config_get log_level $1 log_level "info"
config_get minimal_ttl $1 minimal_ttl 0 config_get minimal_ttl $1 minimal_ttl 0
config_get maximum_ttl $1 maximum_ttl 0 config_get maximum_ttl $1 maximum_ttl 0
@@ -67,6 +68,7 @@ generate_config() {
json_add_object 'log' json_add_object 'log'
json_add_string "level" "$log_level" json_add_string "level" "$log_level"
json_add_string "file" "$log_file" json_add_string "file" "$log_file"
json_add_string "size" "$log_size"
json_close_object json_close_object
# api # api
json_add_object 'api' json_add_object 'api'
+10 -10
View File
@@ -281,34 +281,34 @@ function v2dat_dump() {
exec_sys('rm -f /var/mosdns/geo*.txt'); exec_sys('rm -f /var/mosdns/geo*.txt');
if (configfile === "/var/etc/mosdns.json") { if (configfile === "/var/etc/mosdns.json") {
exec_sys(`v2dat unpack geoip -o /var/mosdns -f cn ${v2dat_dir}/geoip.dat`); exec_sys(`geo2txt geoip -f ${v2dat_dir}/geoip.dat -e cn -o /var/mosdns`);
exec_sys(`v2dat unpack geosite -o /var/mosdns -f cn -f apple -f 'geolocation-!cn' ${v2dat_dir}/geosite.dat`); exec_sys(`geo2txt geosite -f ${v2dat_dir}/geosite.dat -e cn -e apple -e 'geolocation-!cn' -o /var/mosdns`);
if (adblock === '1' && index(ad_source, 'geosite.dat') !== -1) { if (adblock === '1' && index(ad_source, 'geosite.dat') !== -1) {
exec_sys(`v2dat unpack geosite -o /var/mosdns -f category-ads-all ${v2dat_dir}/geosite.dat`); exec_sys(`geo2txt geosite -f ${v2dat_dir}/geosite.dat -e category-ads-all -o /var/mosdns`);
} }
if (streaming_media === '1') { if (streaming_media === '1') {
exec_sys(`v2dat unpack geosite -o /var/mosdns -f netflix -f disney -f hulu ${v2dat_dir}/geosite.dat`); exec_sys(`geo2txt geosite -f ${v2dat_dir}/geosite.dat -e netflix -e disney -e hulu -o /var/mosdns`);
} else { } else {
writefile('/var/mosdns/geosite_disney.txt', ''); writefile('/var/mosdns/geosite_disney.txt', '');
writefile('/var/mosdns/geosite_netflix.txt', ''); writefile('/var/mosdns/geosite_netflix.txt', '');
writefile('/var/mosdns/geosite_hulu.txt', ''); writefile('/var/mosdns/geosite_hulu.txt', '');
} }
} else { } else {
exec_sys(`v2dat unpack geoip -o /var/mosdns -f cn ${v2dat_dir}/geoip.dat`); exec_sys(`geo2txt geoip -f ${v2dat_dir}/geoip.dat -e cn -o /var/mosdns`);
exec_sys(`v2dat unpack geosite -o /var/mosdns -f cn -f 'geolocation-!cn' ${v2dat_dir}/geosite.dat`); exec_sys(`geo2txt geosite -f ${v2dat_dir}/geosite.dat -e cn -e 'geolocation-!cn' -o /var/mosdns`);
let geoip_tags = to_array(uci_cursor.get('mosdns', 'config', 'geoip_tags')); let geoip_tags = to_array(uci_cursor.get('mosdns', 'config', 'geoip_tags'));
if (length(geoip_tags) > 0) { if (length(geoip_tags) > 0) {
let tags_str = "-f '" + join("' -f '", geoip_tags) + "'"; let tags_str = "-e '" + join("' -e '", geoip_tags) + "'";
exec_sys(`v2dat unpack geoip -o /var/mosdns ${tags_str} ${v2dat_dir}/geoip.dat`); exec_sys(`geo2txt geoip -f ${v2dat_dir}/geoip.dat ${tags_str} -o /var/mosdns`);
} }
let geosite_tags = to_array(uci_cursor.get('mosdns', 'config', 'geosite_tags')); let geosite_tags = to_array(uci_cursor.get('mosdns', 'config', 'geosite_tags'));
if (length(geosite_tags) > 0) { if (length(geosite_tags) > 0) {
let tags_str = "-f '" + join("' -f '", geosite_tags) + "'"; let tags_str = "-e '" + join("' -e '", geosite_tags) + "'";
exec_sys(`v2dat unpack geosite -o /var/mosdns ${tags_str} ${v2dat_dir}/geosite.dat`); exec_sys(`geo2txt geosite -f ${v2dat_dir}/geosite.dat ${tags_str} -o /var/mosdns`);
} }
} }
} }
@@ -33,15 +33,17 @@ for _, v in pairs(nodes_table) do
end end
local socks_list = {} local socks_list = {}
m:foreach("socks", function(s) if has_singbox or has_xray then
if s.enabled == "1" and s.node then m:foreach("socks", function(s)
socks_list[#socks_list + 1] = { if s.enabled == "1" and s.node then
id = s[".name"], socks_list[#socks_list + 1] = {
remark = translate("Socks Config") .. " " .. string.format("[%s %s]", s.port, translate("Port")), id = s[".name"],
group = "Socks" remark = translate("Socks Config") .. " " .. string.format("[%s %s]", s.port, translate("Port")),
} group = "Socks"
end }
end) end
end)
end
-- [[ ACLs Settings ]]-- -- [[ ACLs Settings ]]--
s = m:section(NamedSection, arg[1], translate("ACLs"), translate("ACLs")) s = m:section(NamedSection, arg[1], translate("ACLs"), translate("ACLs"))
@@ -62,11 +62,13 @@ m:foreach("socks", function(s)
id = id, id = id,
remark = id .. " - " .. (remark or translate("Misconfigured")) remark = id .. " - " .. (remark or translate("Misconfigured"))
} }
socks_list[#socks_list + 1] = { if has_singbox or has_xray then
id = s[".name"], socks_list[#socks_list + 1] = {
remark = translate("Socks Config") .. " " .. string.format("[%s %s]", s.port, translate("Port")), id = s[".name"],
group = "Socks" remark = translate("Socks Config") .. " " .. string.format("[%s %s]", s.port, translate("Port")),
} group = "Socks"
}
end
end end
end) end)
@@ -25,25 +25,25 @@ o:value("https://wifi.vivo.com.cn/generate_204", "VIVO (CN)")
o.default = o.keylist[3] o.default = o.keylist[3]
if true then if true then
m:appendTemplate("/node_list/node_list") m:appendTemplate("/node_list/node_list")
if luci.http.formvalue("cbi.submit") == "1" then if luci.http.formvalue("cbi.submit") == "1" then
local group_order = {} local group_order = {}
group_order = luci.http.formvaluetable("group.order") group_order = luci.http.formvaluetable("group.order")
if group_order then if group_order then
for k, v in pairs(group_order) do for k, v in pairs(group_order) do
if v and v~= "" then if v and v~= "" then
local new_order = {} local new_order = {}
string.gsub(v, "[^" .. " " .. "]+", function(w) string.gsub(v, "[^" .. " " .. "]+", function(w)
new_order[#new_order + 1] = w new_order[#new_order + 1] = w
end) end)
for idx, name in ipairs(new_order) do for idx, name in ipairs(new_order) do
m.uci:reorder(m.config, name, idx - 1) m.uci:reorder(m.config, name, idx - 1)
end end
end end
end end
end end
end end
end end
return api.return_map(m) return api.return_map(m)
@@ -117,9 +117,9 @@ end
o = s:option(DummyValue, "_update", translate("Manual subscription All")) o = s:option(DummyValue, "_update", translate("Manual subscription All"))
o.rawhtml = true o.rawhtml = true
o.cfgvalue = function(self, section) o.cfgvalue = function(self, section)
return string.format([[ return string.format([[
<input type="button" class="btn cbi-button cbi-button-apply" onclick="ManualSubscribeAll()" value="%s" />]], <input type="button" class="btn cbi-button cbi-button-apply" onclick="ManualSubscribeAll()" value="%s" />]],
translate("Manual subscription All")) translate("Manual subscription All"))
end end
s = m:section(TypedSection, "subscribe_list", "", "<font color='red'>" .. translate("When adding a new subscription, please save and apply before manually subscribing. If you only change the subscription URL, you can subscribe manually, and the system will save it automatically.") .. "</font>") s = m:section(TypedSection, "subscribe_list", "", "<font color='red'>" .. translate("When adding a new subscription, please save and apply before manually subscribing. If you only change the subscription URL, you can subscribe manually, and the system will save it automatically.") .. "</font>")
@@ -215,9 +215,9 @@ end
o = s:option(DummyValue, "_update", translate("Manual subscription")) o = s:option(DummyValue, "_update", translate("Manual subscription"))
o.rawhtml = true o.rawhtml = true
o.cfgvalue = function(self, section) o.cfgvalue = function(self, section)
return string.format([[ return string.format([[
<input type="button" class="btn cbi-button cbi-button-apply" onclick="ManualSubscribe('%s')" value="%s" />]], <input type="button" class="btn cbi-button cbi-button-apply" onclick="ManualSubscribe('%s')" value="%s" />]],
section, translate("Manual subscription")) section, translate("Manual subscription"))
end end
m:appendTemplate("/cbi/sortable", {sectiontype = s.sectiontype}) m:appendTemplate("/cbi/sortable", {sectiontype = s.sectiontype})
@@ -161,6 +161,7 @@ local function start()
end) end)
if firewall_num > 0 then if firewall_num > 0 then
api.uci_save(uci, "firewall", true, true) api.uci_save(uci, "firewall", true, true)
cmd("/etc/init.d/firewall reload >/dev/null 2>&1")
end end
end end
@@ -176,6 +177,7 @@ local function stop()
end) end)
if num > 0 then if num > 0 then
api.uci_save(uci, "firewall", true, true) api.uci_save(uci, "firewall", true, true)
cmd("/etc/init.d/firewall reload >/dev/null 2>&1")
end end
end end
cmd(string.format("rm -rf %s %s", CONFIG_PATH, LOG_APP_FILE)) cmd(string.format("rm -rf %s %s", CONFIG_PATH, LOG_APP_FILE))
@@ -916,12 +916,12 @@ function gen_config(var)
if xray_settings.fragment == "1" then if xray_settings.fragment == "1" then
local lengths, delays = {}, {} local lengths, delays = {}, {}
api.trim(xray_settings.fragment_lengths):gsub("[^,]+", function(w) api.trim(xray_settings.fragment_lengths):gsub("[^,]+", function(w)
w = w:gsub("%s+", "") w = w:gsub("%s+", "")
if w ~= "" then lengths[#lengths+1] = w end if w ~= "" then lengths[#lengths+1] = w end
end) end)
api.trim(xray_settings.fragment_delays):gsub("[^,]+", function(w) api.trim(xray_settings.fragment_delays):gsub("[^,]+", function(w)
w = w:gsub("%s+", "") w = w:gsub("%s+", "")
if w ~= "" then delays[#delays+1] = w end if w ~= "" then delays[#delays+1] = w end
end) end)
fragment_table = { fragment_table = {
type = "fragment", type = "fragment",
@@ -534,7 +534,7 @@
//自定义框 //自定义框
function v_customEnter(cbid, labelSpan, hiddenInput, searchInput, panel, listContainer, customInput) { function v_customEnter(cbid, labelSpan, hiddenInput, searchInput, panel, listContainer, customInput) {
let inputValue = customInput.value.trim(); let inputValue = customInput.value.trim();
if (!inputValue) { if (!inputValue) {
return; return;
} }
const existingItems = listContainer.querySelectorAll('li[data-key="' + inputValue + '"]'); const existingItems = listContainer.querySelectorAll('li[data-key="' + inputValue + '"]');
@@ -3,42 +3,42 @@ local map = self.map
local api = map.api local api = map.api
-%> -%>
<style> <style>
.dns-con { .dns-con {
padding: 1rem; padding: 1rem;
} }
.faq-title { .faq-title {
color: var(--primary); color: var(--primary);
font-weight: bolder; font-weight: bolder;
margin-bottom: 0.5rem; margin-bottom: 0.5rem;
display: inline-block; display: inline-block;
} }
.reset-title { .reset-title {
color: var(--primary) color: var(--primary)
font-weight: bolder; font-weight: bolder;
margin-bottom: 0.3rem; margin-bottom: 0.3rem;
display: inline-block; display: inline-block;
margin-top: 1.2rem; margin-top: 1.2rem;
text-decoration: underline; text-decoration: underline;
} }
.dns-item { .dns-item {
margin-bottom: 0.8rem; margin-bottom: 0.8rem;
line-height:1.2rem; line-height:1.2rem;
} }
.dns-list { .dns-list {
text-indent:1rem; text-indent:1rem;
line-height: 1.2rem; line-height: 1.2rem;
} }
</style> </style>
<div class="dns-con"> <div class="dns-con">
<div id="faq_dns"> <div id="faq_dns">
<ul> <ul>
<b class="faq-title"><%:DNS related issues:%></b> <b class="faq-title"><%:DNS related issues:%></b>
<li class="dns-item">1. <span><%:Certain browsers such as Chrome have built-in DNS service, which may affect DNS resolution settings. You can go to 'Settings -> Privacy and security -> Use secure DNS' menu to turn it off.%></span></li> <li class="dns-item">1. <span><%:Certain browsers such as Chrome have built-in DNS service, which may affect DNS resolution settings. You can go to 'Settings -> Privacy and security -> Use secure DNS' menu to turn it off.%></span></li>
<li class="dns-item">2. <span><%:If you are unable to access the internet after reboot, please try clearing the cache of your terminal devices (make sure to close all open browser application windows first, this step is especially important):%></span> <li class="dns-item">2. <span><%:If you are unable to access the internet after reboot, please try clearing the cache of your terminal devices (make sure to close all open browser application windows first, this step is especially important):%></span>
<ul><li class="dns-list"><span><%:For Windows systems, open Command Prompt and run the command 'ipconfig /flushdns'.%></span></li> <ul><li class="dns-list"><span><%:For Windows systems, open Command Prompt and run the command 'ipconfig /flushdns'.%></span></li>
<li class="dns-list"><span><%:For Mac systems, open Terminal and run the command 'sudo killall -HUP mDNSResponder'.%></span></li> <li class="dns-list"><span><%:For Mac systems, open Terminal and run the command 'sudo killall -HUP mDNSResponder'.%></span></li>
<li class="dns-list"><span><%:For mobile devices, you can clear it by reconnecting to the network, such as toggling Airplane Mode and reconnecting to WiFi.%></span></li> <li class="dns-list"><span><%:For mobile devices, you can clear it by reconnecting to the network, such as toggling Airplane Mode and reconnecting to WiFi.%></span></li>
</ul> </ul>
</li> </li>
<li class="dns-item">3. <span><%:Please make sure your device's network settings point both the DNS server and default gateway to this router, to ensure DNS queries are properly routed.%></span></li> <li class="dns-item">3. <span><%:Please make sure your device's network settings point both the DNS server and default gateway to this router, to ensure DNS queries are properly routed.%></span></li>
</ul> </ul>
@@ -58,7 +58,7 @@ local api = map.api
} }
var dom = document.getElementById("faq_reset"); var dom = document.getElementById("faq_reset");
if (dom) { if (dom) {
var li = ""; var li = "";
li += "<a href='#' class='reset-title' onclick='hide()'>" + "<%: Hide in main menu:%>"+ "</a>" + "<br />" + "<%: Browser access: %>" + "<a href='#' onclick='hide()'>" + hide_url + "</a>" + "<br />"; li += "<a href='#' class='reset-title' onclick='hide()'>" + "<%: Hide in main menu:%>"+ "</a>" + "<br />" + "<%: Browser access: %>" + "<a href='#' onclick='hide()'>" + hide_url + "</a>" + "<br />";
li += "<a href='#' class='reset-title'>" + "<%: Show in main menu:%>"+ "</a>" + "<br />" +"<%: Browser access: %>" + "<a href='#'>" + show_url + "</a>" + "<br />"; li += "<a href='#' class='reset-title'>" + "<%: Show in main menu:%>"+ "</a>" + "<br />" +"<%: Browser access: %>" + "<a href='#'>" + show_url + "</a>" + "<br />";
@@ -43,7 +43,7 @@ table td, .table .td {
z-index: 99; z-index: 99;
text-align: center; text-align: center;
background: white; background: white;
box-shadow: darkgrey 10px 10px 30px 5px; box-shadow: darkgrey 10px 10px 30px 5px;
text-align: center; text-align: center;
padding: 0.5em; padding: 0.5em;
} }
@@ -55,8 +55,8 @@ table td, .table .td {
.ping a, .ping a,
.ping_value a, .ping_value a,
.tcping_value a { .tcping_value a {
text-decoration: none; text-decoration: none;
cursor: pointer; cursor: pointer;
} }
@media (prefers-color-scheme: dark) { @media (prefers-color-scheme: dark) {
@@ -15,8 +15,8 @@ table th, .table .th {
table td, .table .td { table td, .table .td {
text-align: center; text-align: center;
/* white-space: nowrap; */ /* white-space: nowrap; */
word-break: keep-all; word-break: keep-all;
} }
.td.cbi-section-actions { .td.cbi-section-actions {
@@ -75,7 +75,7 @@ local api = map.api
if (!value) { if (!value) {
alert("<%:Please enter query content!%>"); alert("<%:Please enter query content!%>");
return; return;
} }
lookup_btn.disabled = true; lookup_btn.disabled = true;
extract_btn.disabled = true; extract_btn.disabled = true;
btn.value = '<%:Querying%>'; btn.value = '<%:Querying%>';
@@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
if [ -e "/etc/config/ucitrack" ]; then if [ -e "/etc/config/ucitrack" ]; then
uci -q batch <<-EOF uci -q batch <<-EOF
delete ucitrack.@passwall[-1] delete ucitrack.@passwall[-1]
add ucitrack passwall add ucitrack passwall
set ucitrack.@passwall[-1].init=passwall set ucitrack.@passwall[-1].init=passwall
@@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
if [ -e "/etc/config/ucitrack" ]; then if [ -e "/etc/config/ucitrack" ]; then
uci -q batch <<-EOF uci -q batch <<-EOF
delete ucitrack.@passwall_server[-1] delete ucitrack.@passwall_server[-1]
add ucitrack passwall_server add ucitrack passwall_server
set ucitrack.@passwall_server[-1].init=passwall_server set ucitrack.@passwall_server[-1].init=passwall_server
@@ -325,20 +325,14 @@ run_socks() {
log_file="/dev/null" log_file="/dev/null"
fi fi
local node2socks_port=0 local type=$(echo $(config_n_get $node type) | tr 'A-Z' 'a-z')
local type remarks server_host server_port local remarks=$(config_n_get $node remarks)
local server_host=$(config_n_get $node address)
local server_port=$(config_n_get $node port)
if [ "$(config_get_type $node)" = "socks" ]; then if [ "$(config_get_type $node)" = "socks" ]; then
node2socks_port=$(config_n_get $node port 0)
fi
if [ "$node2socks_port" = "0" ]; then
type=$(echo $(config_n_get $node type) | tr 'A-Z' 'a-z')
remarks=$(config_n_get $node remarks)
server_host=$(config_n_get $node address)
server_port=$(config_n_get $node port)
else
type="socks" type="socks"
server_host="127.0.0.1" server_host="127.0.0.1"
server_port=$node2socks_port
remarks="Socks 配置($server_port 端口)" remarks="Socks 配置($server_port 端口)"
fi fi
@@ -382,16 +376,8 @@ run_socks() {
json_add_string "server_port" "${server_port}" json_add_string "server_port" "${server_port}"
case "$type" in case "$type" in
socks) socks)
local _socks_address _socks_port _socks_username _socks_password local socks_username=$(config_n_get $node username)
if [ "$node2socks_port" = "0" ]; then local socks_password=$(config_n_get $node password)
_socks_address=$(config_n_get $node address)
_socks_port=$(config_n_get $node port)
_socks_username=$(config_n_get $node username)
_socks_password=$(config_n_get $node password)
else
_socks_address="127.0.0.1"
_socks_port=$node2socks_port
fi
[ "$http_port" != "0" ] && { [ "$http_port" != "0" ] && {
http_flag=1 http_flag=1
config_file="${config_file%%.*}+http${config_file#${config_file%%.*}}" config_file="${config_file%%.*}+http${config_file#${config_file%%.*}}"
@@ -403,10 +389,10 @@ run_socks() {
json_add_string "local_socks_address" "$bind" json_add_string "local_socks_address" "$bind"
json_add_string "local_socks_port" "$socks_port" json_add_string "local_socks_port" "$socks_port"
json_add_string "server_proto" "socks" json_add_string "server_proto" "socks"
json_add_string "server_address" "${_socks_address}" json_add_string "server_address" "${server_host}"
json_add_string "server_port" "${_socks_port}" json_add_string "server_port" "${server_port}"
json_add_string "server_username" "${_socks_username}" json_add_string "server_username" "${socks_username}"
json_add_string "server_password" "${_socks_password}" json_add_string "server_password" "${socks_password}"
if [ -n "${SINGBOX_BIN}" ]; then if [ -n "${SINGBOX_BIN}" ]; then
type="sing-box" type="sing-box"
local bin="${SINGBOX_BIN}" local bin="${SINGBOX_BIN}"
@@ -519,32 +505,35 @@ run_socks() {
start_global() { start_global() {
[ -z "$NODE" ] && return 1 [ -z "$NODE" ] && return 1
local type=$(echo $(config_n_get $NODE type) | tr 'A-Z' 'a-z')
[ -z "$type" ] && return 1
local config_file=${GLOBAL_ACL_PATH}/global.json local config_file=${GLOBAL_ACL_PATH}/global.json
local log_file=${GLOBAL_ACL_PATH}/global.log local log_file=${GLOBAL_ACL_PATH}/global.log
local node2socks_port=0
local remarks server_host port local remarks=$(config_n_get $NODE remarks)
if [ "$(config_get_type $NODE)" = "socks" ]; then local server_host=$(config_n_get $NODE address)
node2socks_port=$(config_n_get $NODE port 0) local port=$(config_n_get $NODE port)
fi local type=$(echo $(config_n_get $NODE type) | tr 'A-Z' 'a-z')
if [ "$node2socks_port" = "0" ]; then
remarks=$(config_n_get $NODE remarks) local is_socks_cfg=0
server_host=$(config_n_get $NODE address) [ "$(config_get_type $NODE)" = "socks" ] && is_socks_cfg=1
port=$(config_n_get $NODE port)
else if [ "$type" = "socks" ] || [ "$is_socks_cfg" = "1" ] ; then
if [ "${DNS_MODE}" = "xray" ]; then if [ "${DNS_MODE}" = "xray" ]; then
type="xray" type="xray"
elif [ "${DNS_MODE}" = "sing-box" ]; then elif [ "${DNS_MODE}" = "sing-box" ]; then
type="sing-box" type="sing-box"
elif [ -n "${SINGBOX_BIN}" ]; then
type="sing-box"
elif [ -n "${XRAY_BIN}" ]; then
type="xray"
else else
type="socks" type="socks"
fi fi
server_host="127.0.0.1" if [ "$is_socks_cfg" = "1" ] ; then
port=$node2socks_port server_host="127.0.0.1"
remarks="Socks 配置($port 端口)" remarks="Socks 配置($port 端口)"
fi
fi fi
local enable_log=$(config_n_get @global[0] log_node 1) local enable_log=$(config_n_get @global[0] log_node 1)
[ "$enable_log" != "1" ] && log_file="/dev/null" [ "$enable_log" != "1" ] && log_file="/dev/null"
[ -n "$server_host" ] && [ -n "$port" ] && { [ -n "$server_host" ] && [ -n "$port" ] && {
@@ -583,22 +572,15 @@ start_global() {
case "$type" in case "$type" in
socks) socks)
_socks_flag=1 _socks_flag=1
if [ "$node2socks_port" = "0" ]; then _socks_address=$server_host
_socks_address=$(config_n_get $NODE address) _socks_port=$port
_socks_port=$(config_n_get $NODE port) _socks_username=$(config_n_get $NODE username)
_socks_username=$(config_n_get $NODE username) _socks_password=$(config_n_get $NODE password)
_socks_password=$(config_n_get $NODE password)
else
_socks_address="127.0.0.1"
_socks_port=$node2socks_port
fi
[ -z "$can_ipt" ] && { [ -z "$can_ipt" ] && {
local _config_file=$config_file local _config_file="global_${NODE}_socks.json"
_config_file="Global_SOCKS_${NODE}.json"
local _port=$(get_new_port 3001)
run_socks flag="global" node=$NODE bind=127.0.0.1 socks_port=${_port} config_file=${_config_file}
_socks_address="127.0.0.1" _socks_address="127.0.0.1"
_socks_port=${_port} _socks_port=$GLOBAL_SOCKS_port
run_socks flag="global" node=$NODE bind=${node_socks_bind} socks_port=${_socks_port} config_file=${_config_file}
unset _socks_username unset _socks_username
unset _socks_password unset _socks_password
} }
@@ -1455,6 +1437,10 @@ acl_app() {
type="xray" type="xray"
elif [ "${dns_mode}" = "sing-box" ]; then elif [ "${dns_mode}" = "sing-box" ]; then
type="sing-box" type="sing-box"
elif [ -n "${SINGBOX_BIN}" ]; then
type="sing-box"
elif [ -n "${XRAY_BIN}" ]; then
type="xray"
fi fi
else else
type=$(echo $(config_n_get $node type) | tr 'A-Z' 'a-z') type=$(echo $(config_n_get $node type) | tr 'A-Z' 'a-z')
File diff suppressed because it is too large Load Diff
@@ -6,13 +6,13 @@ local geo_dir = (api.uci_get_c("@global_rules[0]", "v2ray_location_asset") or "/
local geosite_path = geo_dir .. "/geosite.dat" local geosite_path = geo_dir .. "/geosite.dat"
local geoip_path = geo_dir .. "/geoip.dat" local geoip_path = geo_dir .. "/geoip.dat"
if fs.access(geosite_path) and fs.access(geoip_path) then if fs.access(geosite_path) and fs.access(geoip_path) then
f = SimpleForm(api.c_config) f = SimpleForm(api.c_config)
f.reset = false f.reset = false
f.submit = false f.submit = false
local obj = Template(api.appname .. "/rule/geoview") local obj = Template(api.appname .. "/rule/geoview")
obj.api = api obj.api = api
f:append(obj) f:append(obj)
end end
return f return f
@@ -25,25 +25,25 @@ o:value("https://wifi.vivo.com.cn/generate_204", "VIVO (CN)")
o.default = o.keylist[3] o.default = o.keylist[3]
if true then if true then
m:appendTemplate("/node_list/node_list") m:appendTemplate("/node_list/node_list")
if luci.http.formvalue("cbi.submit") == "1" then if luci.http.formvalue("cbi.submit") == "1" then
local group_order = {} local group_order = {}
group_order = luci.http.formvaluetable("group.order") group_order = luci.http.formvaluetable("group.order")
if group_order then if group_order then
for k, v in pairs(group_order) do for k, v in pairs(group_order) do
if v and v~= "" then if v and v~= "" then
local new_order = {} local new_order = {}
string.gsub(v, "[^" .. " " .. "]+", function(w) string.gsub(v, "[^" .. " " .. "]+", function(w)
new_order[#new_order + 1] = w new_order[#new_order + 1] = w
end) end)
for idx, name in ipairs(new_order) do for idx, name in ipairs(new_order) do
m.uci:reorder(m.config, name, idx - 1) m.uci:reorder(m.config, name, idx - 1)
end end
end end
end end
end end
end end
end end
return api.return_map(m) return api.return_map(m)
@@ -112,8 +112,8 @@ end
o = s:option(DummyValue, "_update", translate("Manual subscription All")) o = s:option(DummyValue, "_update", translate("Manual subscription All"))
o.rawhtml = true o.rawhtml = true
o.cfgvalue = function(self, section) o.cfgvalue = function(self, section)
return string.format([[ return string.format([[
<input type="button" class="btn cbi-button cbi-button-apply" onclick="ManualSubscribeAll()" value="%s" />]], <input type="button" class="btn cbi-button cbi-button-apply" onclick="ManualSubscribeAll()" value="%s" />]],
translate("Manual subscription All")) translate("Manual subscription All"))
end end
@@ -210,8 +210,8 @@ end
o = s:option(DummyValue, "_update", translate("Manual subscription")) o = s:option(DummyValue, "_update", translate("Manual subscription"))
o.rawhtml = true o.rawhtml = true
o.cfgvalue = function(self, section) o.cfgvalue = function(self, section)
return string.format([[ return string.format([[
<input type="button" class="btn cbi-button cbi-button-apply" onclick="ManualSubscribe('%s')" value="%s" />]], <input type="button" class="btn cbi-button cbi-button-apply" onclick="ManualSubscribe('%s')" value="%s" />]],
section, translate("Manual subscription")) section, translate("Manual subscription"))
end end
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -1,68 +1,68 @@
if not api.is_finded("sslocal") then if not api.is_finded("sslocal") then
return return
end end
-- [[ Shadowsocks Rust ]] -- [[ Shadowsocks Rust ]]
local m, s1 = ... local m, s1 = ...
local type_name = "SS-Rust" local type_name = "SS-Rust"
s1.fields["type"]:value(type_name, "Shadowsocks Rust") s1.fields["type"]:value(type_name, "Shadowsocks Rust")
if s1.val["type"] ~= type_name then if s1.val["type"] ~= type_name then
return return
end end
local s = NamedSection(m, arg[1], "server") local s = NamedSection(m, arg[1], "server")
s.type_name = type_name s.type_name = type_name
s.option_prefix = "ssrust_" s.option_prefix = "ssrust_"
local ssrust_encrypt_method_list = { local ssrust_encrypt_method_list = {
"none", "plain", "none", "plain",
"aes-128-gcm", "aes-256-gcm", "chacha20-ietf-poly1305", "aes-128-gcm", "aes-256-gcm", "chacha20-ietf-poly1305",
"2022-blake3-aes-128-gcm", "2022-blake3-aes-256-gcm", "2022-blake3-chacha8-poly1305", "2022-blake3-chacha20-poly1305" "2022-blake3-aes-128-gcm", "2022-blake3-aes-256-gcm", "2022-blake3-chacha8-poly1305", "2022-blake3-chacha20-poly1305"
} }
o = s:option(Value, "address", translate("Address (Support Domain Name)")) o = s:option(Value, "address", translate("Address (Support Domain Name)"))
o = s:option(Value, "port", translate("Port")) o = s:option(Value, "port", translate("Port"))
o.datatype = "port" o.datatype = "port"
o = s:option(Value, "password", translate("Password")) o = s:option(Value, "password", translate("Password"))
o.password = true o.password = true
o = s:option(Value, "method", translate("Encrypt Method")) o = s:option(Value, "method", translate("Encrypt Method"))
for a, t in ipairs(ssrust_encrypt_method_list) do o:value(t) end for a, t in ipairs(ssrust_encrypt_method_list) do o:value(t) end
o = s:option(Value, "timeout", translate("Connection Timeout")) o = s:option(Value, "timeout", translate("Connection Timeout"))
o.datatype = "uinteger" o.datatype = "uinteger"
o.default = 300 o.default = 300
o = s:option(Flag, "tcp_fast_open", "TCP " .. translate("Fast Open"), translate("Need node support required")) o = s:option(Flag, "tcp_fast_open", "TCP " .. translate("Fast Open"), translate("Need node support required"))
o.default = 0 o.default = 0
o = s:option(Flag, "plugin_enabled", translate("plugin")) o = s:option(Flag, "plugin_enabled", translate("plugin"))
o.default = 0 o.default = 0
o = s:option(Value, "plugin", "SIP003 " .. translate("plugin"), translate("Supports custom SIP003 plugins, Make sure the plugin is installed.")) o = s:option(Value, "plugin", "SIP003 " .. translate("plugin"), translate("Supports custom SIP003 plugins, Make sure the plugin is installed."))
o.default = "none" o.default = "none"
o:value("none", translate("none")) o:value("none", translate("none"))
if api.is_finded("xray-plugin") then o:value("xray-plugin") end if api.is_finded("xray-plugin") then o:value("xray-plugin") end
if api.is_finded("v2ray-plugin") then o:value("v2ray-plugin") end if api.is_finded("v2ray-plugin") then o:value("v2ray-plugin") end
if api.is_finded("obfs-local") then o:value("obfs-local") end if api.is_finded("obfs-local") then o:value("obfs-local") end
if api.is_finded("shadow-tls") then o:value("shadow-tls") end if api.is_finded("shadow-tls") then o:value("shadow-tls") end
o:depends({ plugin_enabled = true }) o:depends({ plugin_enabled = true })
o.validate = function(self, value, t) o.validate = function(self, value, t)
if value and value ~= "" and value ~= "none" then if value and value ~= "" and value ~= "none" then
if not api.is_finded(value) then if not api.is_finded(value) then
return nil, value .. ": " .. translate("Can't find this file!") return nil, value .. ": " .. translate("Can't find this file!")
else else
return value return value
end end
end end
return nil return nil
end end
o = s:option(Value, "plugin_opts", translate("opts")) o = s:option(Value, "plugin_opts", translate("opts"))
o:depends({ plugin_enabled = true }) o:depends({ plugin_enabled = true })
api.luci_types(s1, s) api.luci_types(s1, s)
@@ -1,66 +1,66 @@
if not api.is_finded("ssr-local") then if not api.is_finded("ssr-local") then
return return
end end
-- [[ ShadowsocksR Libev ]] -- [[ ShadowsocksR Libev ]]
local m, s1 = ... local m, s1 = ...
local type_name = "SSR" local type_name = "SSR"
s1.fields["type"]:value(type_name, "ShadowsocksR Libev") s1.fields["type"]:value(type_name, "ShadowsocksR Libev")
if s1.val["type"] ~= type_name then if s1.val["type"] ~= type_name then
return return
end end
local s = NamedSection(m, arg[1], "server") local s = NamedSection(m, arg[1], "server")
s.type_name = type_name s.type_name = type_name
s.option_prefix = "ssr_" s.option_prefix = "ssr_"
local ssr_encrypt_method_list = { local ssr_encrypt_method_list = {
"none", "table", "rc2-cfb", "rc4", "rc4-md5", "rc4-md5-6", "aes-128-cfb", "none", "table", "rc2-cfb", "rc4", "rc4-md5", "rc4-md5-6", "aes-128-cfb",
"aes-192-cfb", "aes-256-cfb", "aes-128-ctr", "aes-192-ctr", "aes-256-ctr", "aes-192-cfb", "aes-256-cfb", "aes-128-ctr", "aes-192-ctr", "aes-256-ctr",
"bf-cfb", "camellia-128-cfb", "camellia-192-cfb", "camellia-256-cfb", "bf-cfb", "camellia-128-cfb", "camellia-192-cfb", "camellia-256-cfb",
"cast5-cfb", "des-cfb", "idea-cfb", "seed-cfb", "salsa20", "chacha20", "cast5-cfb", "des-cfb", "idea-cfb", "seed-cfb", "salsa20", "chacha20",
"chacha20-ietf" "chacha20-ietf"
} }
local ssr_protocol_list = { local ssr_protocol_list = {
"origin", "verify_simple", "verify_deflate", "verify_sha1", "auth_simple", "origin", "verify_simple", "verify_deflate", "verify_sha1", "auth_simple",
"auth_sha1", "auth_sha1_v2", "auth_sha1_v4", "auth_aes128_md5", "auth_sha1", "auth_sha1_v2", "auth_sha1_v4", "auth_aes128_md5",
"auth_aes128_sha1", "auth_chain_a", "auth_chain_b", "auth_chain_c", "auth_aes128_sha1", "auth_chain_a", "auth_chain_b", "auth_chain_c",
"auth_chain_d", "auth_chain_e", "auth_chain_f" "auth_chain_d", "auth_chain_e", "auth_chain_f"
} }
local ssr_obfs_list = { local ssr_obfs_list = {
"plain", "http_simple", "http_post", "random_head", "tls_simple", "plain", "http_simple", "http_post", "random_head", "tls_simple",
"tls1.0_session_auth", "tls1.2_ticket_auth" "tls1.0_session_auth", "tls1.2_ticket_auth"
} }
o = s:option(Value, "address", translate("Address (Support Domain Name)")) o = s:option(Value, "address", translate("Address (Support Domain Name)"))
o = s:option(Value, "port", translate("Port")) o = s:option(Value, "port", translate("Port"))
o.datatype = "port" o.datatype = "port"
o = s:option(Value, "password", translate("Password")) o = s:option(Value, "password", translate("Password"))
o.password = true o.password = true
o = s:option(ListValue, "method", translate("Encrypt Method")) o = s:option(ListValue, "method", translate("Encrypt Method"))
for a, t in ipairs(ssr_encrypt_method_list) do o:value(t) end for a, t in ipairs(ssr_encrypt_method_list) do o:value(t) end
o = s:option(ListValue, "protocol", translate("Protocol")) o = s:option(ListValue, "protocol", translate("Protocol"))
for a, t in ipairs(ssr_protocol_list) do o:value(t) end for a, t in ipairs(ssr_protocol_list) do o:value(t) end
o = s:option(Value, "protocol_param", translate("Protocol_param")) o = s:option(Value, "protocol_param", translate("Protocol_param"))
o = s:option(ListValue, "obfs", translate("Obfs")) o = s:option(ListValue, "obfs", translate("Obfs"))
for a, t in ipairs(ssr_obfs_list) do o:value(t) end for a, t in ipairs(ssr_obfs_list) do o:value(t) end
o = s:option(Value, "obfs_param", translate("Obfs_param")) o = s:option(Value, "obfs_param", translate("Obfs_param"))
o = s:option(Value, "timeout", translate("Connection Timeout")) o = s:option(Value, "timeout", translate("Connection Timeout"))
o.datatype = "uinteger" o.datatype = "uinteger"
o.default = 300 o.default = 300
o = s:option(Flag, "tcp_fast_open", "TCP " .. translate("Fast Open"), translate("Need node support required")) o = s:option(Flag, "tcp_fast_open", "TCP " .. translate("Fast Open"), translate("Need node support required"))
o.default = 0 o.default = 0
api.luci_types(s1, s) api.luci_types(s1, s)
@@ -39,7 +39,7 @@ for filename in api.fs.dir(types_dir) do
table.insert(type_table, filename) table.insert(type_table, filename)
end end
table.sort(type_table, function(a, b) table.sort(type_table, function(a, b)
return a < b return a < b
end) end)
for index, value in ipairs(type_table) do for index, value in ipairs(type_table) do
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -1,90 +1,90 @@
if not api.is_finded("ssserver") then if not api.is_finded("ssserver") then
return return
end end
-- [[ Shadowsocks Rust ]] -- [[ Shadowsocks Rust ]]
local m, s1 = ... local m, s1 = ...
local type_name = "SS-Rust" local type_name = "SS-Rust"
s1.fields["type"]:value(type_name, translate("Shadowsocks Rust")) s1.fields["type"]:value(type_name, translate("Shadowsocks Rust"))
if not s1.val["type"] then if not s1.val["type"] then
s1.val["type"] = type_name s1.val["type"] = type_name
end end
if s1.val["type"] and s1.val["type"] ~= type_name then if s1.val["type"] and s1.val["type"] ~= type_name then
return return
end end
local s = NamedSection(m, arg[1], "server") local s = NamedSection(m, arg[1], "server")
s.type_name = type_name s.type_name = type_name
s.option_prefix = "ssrust_" s.option_prefix = "ssrust_"
local ssrust_encrypt_method_list = { local ssrust_encrypt_method_list = {
"plain", "none", "plain", "none",
"aes-128-gcm", "aes-256-gcm", "chacha20-ietf-poly1305", "aes-128-gcm", "aes-256-gcm", "chacha20-ietf-poly1305",
"2022-blake3-aes-128-gcm", "2022-blake3-aes-256-gcm", "2022-blake3-chacha8-poly1305", "2022-blake3-chacha20-poly1305" "2022-blake3-aes-128-gcm", "2022-blake3-aes-256-gcm", "2022-blake3-chacha8-poly1305", "2022-blake3-chacha20-poly1305"
} }
o = s:option(Flag, "custom", translate("Use Custom Config")) o = s:option(Flag, "custom", translate("Use Custom Config"))
o = s:option(TextValue, "custom_config", translate("Custom Config") .. " (JSON)") o = s:option(TextValue, "custom_config", translate("Custom Config") .. " (JSON)")
o.rows = 10 o.rows = 10
o.wrap = "off" o.wrap = "off"
o:depends({ custom = true }) o:depends({ custom = true })
o.datatype = "json" o.datatype = "json"
local o_validate = o.validate local o_validate = o.validate
o.validate = function(self, value) o.validate = function(self, value)
local v = o_validate(self, value) local v = o_validate(self, value)
if v then return v end if v then return v end
return nil, translate("Custom Config") .. " " .. translate("Must be JSON text!") return nil, translate("Custom Config") .. " " .. translate("Must be JSON text!")
end end
o.custom_cfgvalue = function(self, section, value) o.custom_cfgvalue = function(self, section, value)
local config_str = m:get(section, "config_str") local config_str = m:get(section, "config_str")
if config_str then if config_str then
return api.base64Decode(config_str) return api.base64Decode(config_str)
end end
end end
o.custom_write = function(self, section, value) o.custom_write = function(self, section, value)
m:set(section, "config_str", api.base64Encode(value) or "") m:set(section, "config_str", api.base64Encode(value) or "")
end end
o = s:option(Value, "port", translate("Listen Port")) o = s:option(Value, "port", translate("Listen Port"))
o.datatype = "port" o.datatype = "port"
o:depends({ custom = false }) o:depends({ custom = false })
o = s:option(ListValue, "user", translate("User")) o = s:option(ListValue, "user", translate("User"))
for i, v in ipairs(user_list) do for i, v in ipairs(user_list) do
o:value(v[".name"], v.username) o:value(v[".name"], v.username)
end end
o:depends({ custom = false }) o:depends({ custom = false })
o = s:option(ListValue, "method", translate("Encrypt Method")) o = s:option(ListValue, "method", translate("Encrypt Method"))
for a, t in ipairs(ssrust_encrypt_method_list) do o:value(t) end for a, t in ipairs(ssrust_encrypt_method_list) do o:value(t) end
o:depends({ custom = false }) o:depends({ custom = false })
o = s:option(Value, "timeout", translate("Connection Timeout")) o = s:option(Value, "timeout", translate("Connection Timeout"))
o.datatype = "uinteger" o.datatype = "uinteger"
o.default = 300 o.default = 300
o:depends({ custom = false }) o:depends({ custom = false })
o = s:option(Flag, "tcp_fast_open", "TCP " .. translate("Fast Open")) o = s:option(Flag, "tcp_fast_open", "TCP " .. translate("Fast Open"))
o.default = "0" o.default = "0"
o:depends({ custom = false }) o:depends({ custom = false })
o = s:option(Flag, "firewall_allow", translate("Firewall Allow")) o = s:option(Flag, "firewall_allow", translate("Firewall Allow"))
o.default = "0" o.default = "0"
o:depends({ custom = false }) o:depends({ custom = false })
o = s:option(Value, "firewall_allow_src", translate("Source zone")) o = s:option(Value, "firewall_allow_src", translate("Source zone"))
o.nocreate = true o.nocreate = true
o.allowany = true o.allowany = true
o.default = "wan" o.default = "wan"
o.template = "cbi/firewall_zonelist" o.template = "cbi/firewall_zonelist"
o:depends({ custom = false, firewall_allow = true }) o:depends({ custom = false, firewall_allow = true })
o = s:option(Flag, "log", translate("Log")) o = s:option(Flag, "log", translate("Log"))
o.default = "1" o.default = "1"
o.rmempty = false o.rmempty = false
api.luci_types(s1, s) api.luci_types(s1, s)
@@ -1,121 +1,121 @@
if not api.is_finded("ssr-server") then if not api.is_finded("ssr-server") then
return return
end end
-- [[ ShadowsocksR ]] -- [[ ShadowsocksR ]]
local m, s1 = ... local m, s1 = ...
local type_name = "SSR" local type_name = "SSR"
s1.fields["type"]:value(type_name, translate("ShadowsocksR")) s1.fields["type"]:value(type_name, translate("ShadowsocksR"))
if not s1.val["type"] then if not s1.val["type"] then
s1.val["type"] = type_name s1.val["type"] = type_name
end end
if s1.val["type"] and s1.val["type"] ~= type_name then if s1.val["type"] and s1.val["type"] ~= type_name then
return return
end end
local s = NamedSection(m, arg[1], "server") local s = NamedSection(m, arg[1], "server")
s.type_name = type_name s.type_name = type_name
s.option_prefix = "ssr_" s.option_prefix = "ssr_"
local ssr_encrypt_method_list = { local ssr_encrypt_method_list = {
"none", "table", "rc2-cfb", "rc4", "rc4-md5", "rc4-md5-6", "aes-128-cfb", "none", "table", "rc2-cfb", "rc4", "rc4-md5", "rc4-md5-6", "aes-128-cfb",
"aes-192-cfb", "aes-256-cfb", "aes-128-ctr", "aes-192-ctr", "aes-256-ctr", "aes-192-cfb", "aes-256-cfb", "aes-128-ctr", "aes-192-ctr", "aes-256-ctr",
"bf-cfb", "camellia-128-cfb", "camellia-192-cfb", "camellia-256-cfb", "bf-cfb", "camellia-128-cfb", "camellia-192-cfb", "camellia-256-cfb",
"cast5-cfb", "des-cfb", "idea-cfb", "seed-cfb", "salsa20", "chacha20", "cast5-cfb", "des-cfb", "idea-cfb", "seed-cfb", "salsa20", "chacha20",
"chacha20-ietf" "chacha20-ietf"
} }
local ssr_protocol_list = { local ssr_protocol_list = {
"origin", "verify_simple", "verify_deflate", "verify_sha1", "auth_simple", "origin", "verify_simple", "verify_deflate", "verify_sha1", "auth_simple",
"auth_sha1", "auth_sha1_v2", "auth_sha1_v4", "auth_aes128_md5", "auth_sha1", "auth_sha1_v2", "auth_sha1_v4", "auth_aes128_md5",
"auth_aes128_sha1", "auth_chain_a", "auth_chain_b", "auth_chain_c", "auth_aes128_sha1", "auth_chain_a", "auth_chain_b", "auth_chain_c",
"auth_chain_d", "auth_chain_e", "auth_chain_f" "auth_chain_d", "auth_chain_e", "auth_chain_f"
} }
local ssr_obfs_list = { local ssr_obfs_list = {
"plain", "http_simple", "http_post", "random_head", "tls_simple", "plain", "http_simple", "http_post", "random_head", "tls_simple",
"tls1.0_session_auth", "tls1.2_ticket_auth" "tls1.0_session_auth", "tls1.2_ticket_auth"
} }
o = s:option(Flag, "custom", translate("Use Custom Config")) o = s:option(Flag, "custom", translate("Use Custom Config"))
o = s:option(TextValue, "custom_config", translate("Custom Config") .. " (JSON)") o = s:option(TextValue, "custom_config", translate("Custom Config") .. " (JSON)")
o.rows = 10 o.rows = 10
o.wrap = "off" o.wrap = "off"
o:depends({ custom = true }) o:depends({ custom = true })
o.datatype = "json" o.datatype = "json"
local o_validate = o.validate local o_validate = o.validate
o.validate = function(self, value) o.validate = function(self, value)
local v = o_validate(self, value) local v = o_validate(self, value)
if v then return v end if v then return v end
return nil, translate("Custom Config") .. " " .. translate("Must be JSON text!") return nil, translate("Custom Config") .. " " .. translate("Must be JSON text!")
end end
o.custom_cfgvalue = function(self, section, value) o.custom_cfgvalue = function(self, section, value)
local config_str = m:get(section, "config_str") local config_str = m:get(section, "config_str")
if config_str then if config_str then
return api.base64Decode(config_str) return api.base64Decode(config_str)
end end
end end
o.custom_write = function(self, section, value) o.custom_write = function(self, section, value)
m:set(section, "config_str", api.base64Encode(value) or "") m:set(section, "config_str", api.base64Encode(value) or "")
end end
o = s:option(Value, "port", translate("Listen Port")) o = s:option(Value, "port", translate("Listen Port"))
o.datatype = "port" o.datatype = "port"
o:depends({ custom = false }) o:depends({ custom = false })
o = s:option(ListValue, "user", translate("User")) o = s:option(ListValue, "user", translate("User"))
for i, v in ipairs(user_list) do for i, v in ipairs(user_list) do
o:value(v[".name"], v.username) o:value(v[".name"], v.username)
end end
o:depends({ custom = false }) o:depends({ custom = false })
o = s:option(ListValue, "method", translate("Encrypt Method")) o = s:option(ListValue, "method", translate("Encrypt Method"))
for a, t in ipairs(ssr_encrypt_method_list) do o:value(t) end for a, t in ipairs(ssr_encrypt_method_list) do o:value(t) end
o:depends({ custom = false }) o:depends({ custom = false })
o = s:option(ListValue, "protocol", translate("Protocol")) o = s:option(ListValue, "protocol", translate("Protocol"))
for a, t in ipairs(ssr_protocol_list) do o:value(t) end for a, t in ipairs(ssr_protocol_list) do o:value(t) end
o:depends({ custom = false }) o:depends({ custom = false })
o = s:option(Value, "protocol_param", translate("Protocol_param")) o = s:option(Value, "protocol_param", translate("Protocol_param"))
o:depends({ custom = false }) o:depends({ custom = false })
o = s:option(ListValue, "obfs", translate("Obfs")) o = s:option(ListValue, "obfs", translate("Obfs"))
for a, t in ipairs(ssr_obfs_list) do o:value(t) end for a, t in ipairs(ssr_obfs_list) do o:value(t) end
o:depends({ custom = false }) o:depends({ custom = false })
o = s:option(Value, "obfs_param", translate("Obfs_param")) o = s:option(Value, "obfs_param", translate("Obfs_param"))
o:depends({ custom = false }) o:depends({ custom = false })
o = s:option(Value, "timeout", translate("Connection Timeout")) o = s:option(Value, "timeout", translate("Connection Timeout"))
o.datatype = "uinteger" o.datatype = "uinteger"
o.default = 300 o.default = 300
o:depends({ custom = false }) o:depends({ custom = false })
o = s:option(Flag, "tcp_fast_open", "TCP " .. translate("Fast Open")) o = s:option(Flag, "tcp_fast_open", "TCP " .. translate("Fast Open"))
o.default = "0" o.default = "0"
o:depends({ custom = false }) o:depends({ custom = false })
o = s:option(Flag, "udp_forward", translate("UDP Forward")) o = s:option(Flag, "udp_forward", translate("UDP Forward"))
o.default = "1" o.default = "1"
o.rmempty = false o.rmempty = false
o = s:option(Flag, "firewall_allow", translate("Firewall Allow")) o = s:option(Flag, "firewall_allow", translate("Firewall Allow"))
o.default = "0" o.default = "0"
o:depends({ custom = false }) o:depends({ custom = false })
o = s:option(Value, "firewall_allow_src", translate("Source zone")) o = s:option(Value, "firewall_allow_src", translate("Source zone"))
o.nocreate = true o.nocreate = true
o.allowany = true o.allowany = true
o.default = "wan" o.default = "wan"
o.template = "cbi/firewall_zonelist" o.template = "cbi/firewall_zonelist"
o:depends({ custom = false, firewall_allow = true }) o:depends({ custom = false, firewall_allow = true })
o = s:option(Flag, "log", translate("Log")) o = s:option(Flag, "log", translate("Log"))
o.default = "1" o.default = "1"
o.rmempty = false o.rmempty = false
api.luci_types(s1, s) api.luci_types(s1, s)
+8 -8
View File
@@ -464,14 +464,14 @@ datatypes.json = is_json
function is_timehhmm(str) function is_timehhmm(str)
local hour, minute = string.match(str, "^(%d?%d):(%d%d)$") local hour, minute = string.match(str, "^(%d?%d):(%d%d)$")
if hour and minute then if hour and minute then
hour = tonumber(hour) hour = tonumber(hour)
minute = tonumber(minute) minute = tonumber(minute)
if hour >= 0 and hour <= 23 and minute >= 0 and minute <= 59 then if hour >= 0 and hour <= 23 and minute >= 0 and minute <= 59 then
return true return true
end end
end end
return false return false
end end
datatypes.timehhmm = is_timehhmm datatypes.timehhmm = is_timehhmm
@@ -922,12 +922,12 @@ function gen_config(var)
if xray_settings.fragment == "1" then if xray_settings.fragment == "1" then
local lengths, delays = {}, {} local lengths, delays = {}, {}
api.trim(xray_settings.fragment_lengths):gsub("[^,]+", function(w) api.trim(xray_settings.fragment_lengths):gsub("[^,]+", function(w)
w = w:gsub("%s+", "") w = w:gsub("%s+", "")
if w ~= "" then lengths[#lengths+1] = w end if w ~= "" then lengths[#lengths+1] = w end
end) end)
api.trim(xray_settings.fragment_delays):gsub("[^,]+", function(w) api.trim(xray_settings.fragment_delays):gsub("[^,]+", function(w)
w = w:gsub("%s+", "") w = w:gsub("%s+", "")
if w ~= "" then delays[#delays+1] = w end if w ~= "" then delays[#delays+1] = w end
end) end)
fragment_table = { fragment_table = {
type = "fragment", type = "fragment",
@@ -534,7 +534,7 @@
//自定义框 //自定义框
function v_customEnter(cbid, labelSpan, hiddenInput, searchInput, panel, listContainer, customInput) { function v_customEnter(cbid, labelSpan, hiddenInput, searchInput, panel, listContainer, customInput) {
let inputValue = customInput.value.trim(); let inputValue = customInput.value.trim();
if (!inputValue) { if (!inputValue) {
return; return;
} }
const existingItems = listContainer.querySelectorAll('li[data-key="' + inputValue + '"]'); const existingItems = listContainer.querySelectorAll('li[data-key="' + inputValue + '"]');
@@ -3,28 +3,28 @@ local map = self.map
local api = map.api local api = map.api
-%> -%>
<style> <style>
.dns-con { .dns-con {
padding: 1rem; padding: 1rem;
} }
.faq-title { .faq-title {
color: var(--primary); color: var(--primary);
font-weight: bolder; font-weight: bolder;
margin-bottom: 0.5rem; margin-bottom: 0.5rem;
display: inline-block; display: inline-block;
} }
.reset-title { .reset-title {
color: var(--primary) color: var(--primary)
font-weight: bolder; font-weight: bolder;
margin-bottom: 0.3rem; margin-bottom: 0.3rem;
display: inline-block; display: inline-block;
margin-top: 1.2rem; margin-top: 1.2rem;
text-decoration: underline; text-decoration: underline;
} }
.dns-item { .dns-item {
margin-bottom: 0.8rem; margin-bottom: 0.8rem;
line-height:1.2rem; line-height:1.2rem;
} }
.dns-list { .dns-list {
text-indent:1rem; text-indent:1rem;
line-height: 1.2rem; line-height: 1.2rem;
} }
@@ -32,13 +32,13 @@ local api = map.api
<div class="dns-con"> <div class="dns-con">
<div id="faq_dns"> <div id="faq_dns">
<ul> <ul>
<b class="faq-title"><%:DNS related issues:%></b> <b class="faq-title"><%:DNS related issues:%></b>
<li class="dns-item">1. <span><%:Certain browsers such as Chrome have built-in DNS service, which may affect DNS resolution settings. You can go to 'Settings -> Privacy and security -> Use secure DNS' menu to turn it off.%></span></li> <li class="dns-item">1. <span><%:Certain browsers such as Chrome have built-in DNS service, which may affect DNS resolution settings. You can go to 'Settings -> Privacy and security -> Use secure DNS' menu to turn it off.%></span></li>
<li class="dns-item">2. <span><%:If you are unable to access the internet after reboot, please try clearing the cache of your terminal devices (make sure to close all open browser application windows first, this step is especially important):%></span> <li class="dns-item">2. <span><%:If you are unable to access the internet after reboot, please try clearing the cache of your terminal devices (make sure to close all open browser application windows first, this step is especially important):%></span>
<ul><li class="dns-list"><span><%:For Windows systems, open Command Prompt and run the command 'ipconfig /flushdns'.%></span></li> <ul><li class="dns-list"><span><%:For Windows systems, open Command Prompt and run the command 'ipconfig /flushdns'.%></span></li>
<li class="dns-list"><span><%:For Mac systems, open Terminal and run the command 'sudo killall -HUP mDNSResponder'.%></span></li> <li class="dns-list"><span><%:For Mac systems, open Terminal and run the command 'sudo killall -HUP mDNSResponder'.%></span></li>
<li class="dns-list"><span><%:For mobile devices, you can clear it by reconnecting to the network, such as toggling Airplane Mode and reconnecting to WiFi.%></span></li> <li class="dns-list"><span><%:For mobile devices, you can clear it by reconnecting to the network, such as toggling Airplane Mode and reconnecting to WiFi.%></span></li>
</ul> </ul>
</li> </li>
<li class="dns-item">3. <span><%:Please make sure your device's network settings point both the DNS server and default gateway to this router, to ensure DNS queries are properly routed.%></span></li> <li class="dns-item">3. <span><%:Please make sure your device's network settings point both the DNS server and default gateway to this router, to ensure DNS queries are properly routed.%></span></li>
</ul> </ul>
@@ -58,7 +58,7 @@ local api = map.api
} }
var dom = document.getElementById("faq_reset"); var dom = document.getElementById("faq_reset");
if (dom) { if (dom) {
var li = ""; var li = "";
li += "<a href='#' class='reset-title' onclick='hide()'>" + "<%: Hide in main menu:%>"+ "</a>" + "<br />" + "<%: Browser access: %>" + "<a href='#' onclick='hide()'>" + hide_url + "</a>" + "<br />"; li += "<a href='#' class='reset-title' onclick='hide()'>" + "<%: Hide in main menu:%>"+ "</a>" + "<br />" + "<%: Browser access: %>" + "<a href='#' onclick='hide()'>" + hide_url + "</a>" + "<br />";
li += "<a href='#' class='reset-title'>" + "<%: Show in main menu:%>"+ "</a>" + "<br />" +"<%: Browser access: %>" + "<a href='#'>" + show_url + "</a>" + "<br />"; li += "<a href='#' class='reset-title'>" + "<%: Show in main menu:%>"+ "</a>" + "<br />" +"<%: Browser access: %>" + "<a href='#'>" + show_url + "</a>" + "<br />";
@@ -29,8 +29,8 @@ table th, .table .th {
table td, .table .td { table td, .table .td {
text-align: center; text-align: center;
/* white-space: nowrap; */ /* white-space: nowrap; */
word-break: keep-all; word-break: keep-all;
} }
#set_node_div { #set_node_div {
@@ -41,7 +41,7 @@ table td, .table .td {
z-index: 99; z-index: 99;
text-align: center; text-align: center;
background: white; background: white;
box-shadow: darkgrey 10px 10px 30px 5px; box-shadow: darkgrey 10px 10px 30px 5px;
text-align: center; text-align: center;
padding: 0.5em; padding: 0.5em;
} }
@@ -53,8 +53,8 @@ table td, .table .td {
.ping a, .ping a,
.ping_value a, .ping_value a,
.tcping_value a { .tcping_value a {
text-decoration: none; text-decoration: none;
cursor: pointer; cursor: pointer;
} }
@media (prefers-color-scheme: dark) { @media (prefers-color-scheme: dark) {
@@ -74,7 +74,7 @@ local api = self.api
if (!value) { if (!value) {
alert("<%:Please enter query content!%>"); alert("<%:Please enter query content!%>");
return; return;
} }
lookup_btn.disabled = true; lookup_btn.disabled = true;
extract_btn.disabled = true; extract_btn.disabled = true;
btn.value = '<%:Querying%>'; btn.value = '<%:Querying%>';
@@ -11,8 +11,8 @@ table th, .table .th {
table td, .table .td { table td, .table .td {
text-align: center; text-align: center;
/* white-space: nowrap; */ /* white-space: nowrap; */
word-break: keep-all; word-break: keep-all;
} }
.td.cbi-section-actions { .td.cbi-section-actions {
@@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
if [ -e "/etc/config/ucitrack" ]; then if [ -e "/etc/config/ucitrack" ]; then
uci -q batch <<-EOF uci -q batch <<-EOF
delete ucitrack.@passwall2[-1] delete ucitrack.@passwall2[-1]
add ucitrack passwall2 add ucitrack passwall2
set ucitrack.@passwall2[-1].init=passwall2 set ucitrack.@passwall2[-1].init=passwall2
@@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
if [ -e "/etc/config/ucitrack" ]; then if [ -e "/etc/config/ucitrack" ]; then
uci -q batch <<-EOF uci -q batch <<-EOF
delete ucitrack.@passwall2_server[-1] delete ucitrack.@passwall2_server[-1]
add ucitrack passwall2_server add ucitrack passwall2_server
set ucitrack.@passwall2_server[-1].init=passwall2_server set ucitrack.@passwall2_server[-1].init=passwall2_server
@@ -1,371 +1,371 @@
local api = require "luci.passwall2.api" local api = require "luci.passwall2.api"
local c_config = api.c_config local c_config = api.c_config
local sys = api.sys local sys = api.sys
local jsonc = api.jsonc local jsonc = api.jsonc
local fs = api.fs local fs = api.fs
local datatypes = api.datatypes local datatypes = api.datatypes
local TMP = {} local TMP = {}
local function tinsert(table_name, val) local function tinsert(table_name, val)
if table_name and type(table_name) == "table" then if table_name and type(table_name) == "table" then
if not TMP[table_name] then if not TMP[table_name] then
TMP[table_name] = {} TMP[table_name] = {}
end end
if TMP[table_name][val] then if TMP[table_name][val] then
return false return false
end end
table.insert(table_name, val) table.insert(table_name, val)
TMP[table_name][val] = true TMP[table_name][val] = true
return true return true
end end
return false return false
end end
local function backup_servers() local function backup_servers()
local DNSMASQ_DNS = api.uci_get("dhcp", "@dnsmasq[0]", "server") local DNSMASQ_DNS = api.uci_get("dhcp", "@dnsmasq[0]", "server")
if DNSMASQ_DNS and #DNSMASQ_DNS > 0 then if DNSMASQ_DNS and #DNSMASQ_DNS > 0 then
api.uci_set_c("@global[0]", "dnsmasq_servers", DNSMASQ_DNS) api.uci_set_c("@global[0]", "dnsmasq_servers", DNSMASQ_DNS)
api.uci_save_c(true) api.uci_save_c(true)
end end
end end
local function restore_servers() local function restore_servers()
local dns_table = {} local dns_table = {}
local DNSMASQ_DNS = api.uci_get("dhcp", "@dnsmasq[0]", "server") local DNSMASQ_DNS = api.uci_get("dhcp", "@dnsmasq[0]", "server")
if DNSMASQ_DNS and #DNSMASQ_DNS > 0 then if DNSMASQ_DNS and #DNSMASQ_DNS > 0 then
for k, v in ipairs(DNSMASQ_DNS) do for k, v in ipairs(DNSMASQ_DNS) do
tinsert(dns_table, v) tinsert(dns_table, v)
end end
end end
local OLD_SERVER = api.uci_get_c("@global[0]", "dnsmasq_servers") local OLD_SERVER = api.uci_get_c("@global[0]", "dnsmasq_servers")
if OLD_SERVER and #OLD_SERVER > 0 then if OLD_SERVER and #OLD_SERVER > 0 then
for k, v in ipairs(OLD_SERVER) do for k, v in ipairs(OLD_SERVER) do
tinsert(dns_table, v) tinsert(dns_table, v)
end end
api.uci_del_c("@global[0]", "dnsmasq_servers") api.uci_del_c("@global[0]", "dnsmasq_servers")
api.uci_save_c(true) api.uci_save_c(true)
end end
if dns_table and #dns_table > 0 then if dns_table and #dns_table > 0 then
api.uci_set("dhcp", "@dnsmasq[0]", "server", dns_table) api.uci_set("dhcp", "@dnsmasq[0]", "server", dns_table)
api.uci_save(nil, "dhcp", true) api.uci_save(nil, "dhcp", true)
end end
end end
function stretch() function stretch()
local dnsmasq_server = api.uci_get("dhcp", "@dnsmasq[0]", "server") local dnsmasq_server = api.uci_get("dhcp", "@dnsmasq[0]", "server")
local dnsmasq_noresolv = api.uci_get("dhcp", "@dnsmasq[0]", "noresolv") local dnsmasq_noresolv = api.uci_get("dhcp", "@dnsmasq[0]", "noresolv")
local _flag local _flag
if dnsmasq_server and #dnsmasq_server > 0 then if dnsmasq_server and #dnsmasq_server > 0 then
for k, v in ipairs(dnsmasq_server) do for k, v in ipairs(dnsmasq_server) do
if not v:find("/") then if not v:find("/") then
_flag = true _flag = true
end end
end end
end end
if not _flag and dnsmasq_noresolv == "1" then if not _flag and dnsmasq_noresolv == "1" then
api.uci_del("dhcp", "@dnsmasq[0]", "noresolv") api.uci_del("dhcp", "@dnsmasq[0]", "noresolv")
local RESOLVFILE = "/tmp/resolv.conf.d/resolv.conf.auto" local RESOLVFILE = "/tmp/resolv.conf.d/resolv.conf.auto"
local file = io.open(RESOLVFILE, "r") local file = io.open(RESOLVFILE, "r")
if not file then if not file then
RESOLVFILE = "/tmp/resolv.conf.auto" RESOLVFILE = "/tmp/resolv.conf.auto"
else else
local size = file:seek("end") local size = file:seek("end")
file:close() file:close()
if size == 0 then if size == 0 then
RESOLVFILE = "/tmp/resolv.conf.auto" RESOLVFILE = "/tmp/resolv.conf.auto"
end end
end end
api.uci_set("dhcp", "@dnsmasq[0]", "resolvfile", RESOLVFILE) api.uci_set("dhcp", "@dnsmasq[0]", "resolvfile", RESOLVFILE)
api.uci_save(nil, "dhcp", true) api.uci_save(nil, "dhcp", true)
end end
end end
function restart(var) function restart(var)
local LOG = var["LOG"] local LOG = var["LOG"]
sys.call("/etc/init.d/dnsmasq restart >/dev/null 2>&1") sys.call("/etc/init.d/dnsmasq restart >/dev/null 2>&1")
if LOG == "1" then if LOG == "1" then
api.log(0, api.i18n.translate("Restart dnsmasq service.")) api.log(0, api.i18n.translate("Restart dnsmasq service."))
end end
end end
function logic_restart(var) function logic_restart(var)
local LOG = var["LOG"] local LOG = var["LOG"]
local DEFAULT_DNS = api.get_cache_var("DEFAULT_DNS") local DEFAULT_DNS = api.get_cache_var("DEFAULT_DNS")
if DEFAULT_DNS then if DEFAULT_DNS then
backup_servers() backup_servers()
--sys.call("sed -i '/list server/d' /etc/config/dhcp >/dev/null 2>&1") --sys.call("sed -i '/list server/d' /etc/config/dhcp >/dev/null 2>&1")
local dns_table = {} local dns_table = {}
local dnsmasq_server = api.uci_get("dhcp", "@dnsmasq[0]", "server") local dnsmasq_server = api.uci_get("dhcp", "@dnsmasq[0]", "server")
if dnsmasq_server and #dnsmasq_server > 0 then if dnsmasq_server and #dnsmasq_server > 0 then
for k, v in ipairs(dnsmasq_server) do for k, v in ipairs(dnsmasq_server) do
if v:find("/") then if v:find("/") then
tinsert(dns_table, v) tinsert(dns_table, v)
end end
end end
api.uci_set("dhcp", "@dnsmasq[0]", "server", dns_table) api.uci_set("dhcp", "@dnsmasq[0]", "server", dns_table)
api.uci_save(nil, "dhcp", true) api.uci_save(nil, "dhcp", true)
end end
sys.call("/etc/init.d/dnsmasq restart >/dev/null 2>&1") sys.call("/etc/init.d/dnsmasq restart >/dev/null 2>&1")
restore_servers() restore_servers()
else else
sys.call("/etc/init.d/dnsmasq restart >/dev/null 2>&1") sys.call("/etc/init.d/dnsmasq restart >/dev/null 2>&1")
end end
if LOG == "1" then if LOG == "1" then
api.log(0, api.i18n.translate("Restart dnsmasq service.")) api.log(0, api.i18n.translate("Restart dnsmasq service."))
end end
end end
function copy_instance(var) function copy_instance(var)
local LISTEN_PORT = var["LISTEN_PORT"] local LISTEN_PORT = var["LISTEN_PORT"]
local TMP_DNSMASQ_PATH = var["TMP_DNSMASQ_PATH"] local TMP_DNSMASQ_PATH = var["TMP_DNSMASQ_PATH"]
local conf_lines = {} local conf_lines = {}
local DEFAULT_DNSMASQ_CFGID = sys.exec("echo -n $(uci -q show dhcp.@dnsmasq[0] | awk 'NR==1 {split($0, conf, /[.=]/); print conf[2]}')") local DEFAULT_DNSMASQ_CFGID = sys.exec("echo -n $(uci -q show dhcp.@dnsmasq[0] | awk 'NR==1 {split($0, conf, /[.=]/); print conf[2]}')")
for line in io.lines("/tmp/etc/dnsmasq.conf." .. DEFAULT_DNSMASQ_CFGID) do for line in io.lines("/tmp/etc/dnsmasq.conf." .. DEFAULT_DNSMASQ_CFGID) do
local filter local filter
if line:find("passwall2") then filter = true end if line:find("passwall2") then filter = true end
if line:find("ubus") then filter = true end if line:find("ubus") then filter = true end
if line:find("dhcp") then filter = true end if line:find("dhcp") then filter = true end
if line:find("server=") == 1 then filter = true end if line:find("server=") == 1 then filter = true end
if line:find("port=") == 1 then filter = true end if line:find("port=") == 1 then filter = true end
if line:find("conf%-dir=") == 1 then if line:find("conf%-dir=") == 1 then
filter = true filter = true
if TMP_DNSMASQ_PATH then if TMP_DNSMASQ_PATH then
local tmp_path = line:sub(1 + #"conf-dir=") local tmp_path = line:sub(1 + #"conf-dir=")
sys.call(string.format("cp -r %s/* %s/ 2>/dev/null", tmp_path, TMP_DNSMASQ_PATH)) sys.call(string.format("cp -r %s/* %s/ 2>/dev/null", tmp_path, TMP_DNSMASQ_PATH))
end end
end end
if line:find("address=") == 1 or (line:find("server=") == 1 and line:find("/")) then filter = nil end if line:find("address=") == 1 or (line:find("server=") == 1 and line:find("/")) then filter = nil end
if not filter then if not filter then
tinsert(conf_lines, line) tinsert(conf_lines, line)
end end
end end
tinsert(conf_lines, "port=" .. LISTEN_PORT) tinsert(conf_lines, "port=" .. LISTEN_PORT)
if TMP_DNSMASQ_PATH then if TMP_DNSMASQ_PATH then
sys.call("rm -rf " .. TMP_DNSMASQ_PATH .. "/*passwall2*") sys.call("rm -rf " .. TMP_DNSMASQ_PATH .. "/*passwall2*")
end end
if var["return"] == "1" then if var["return"] == "1" then
return conf_lines return conf_lines
end end
if #conf_lines > 0 then if #conf_lines > 0 then
local DNSMASQ_CONF = var["DNSMASQ_CONF"] local DNSMASQ_CONF = var["DNSMASQ_CONF"]
local conf_out = io.open(DNSMASQ_CONF, "a") local conf_out = io.open(DNSMASQ_CONF, "a")
conf_out:write(table.concat(conf_lines, "\n")) conf_out:write(table.concat(conf_lines, "\n"))
conf_out:write("\n") conf_out:write("\n")
conf_out:close() conf_out:close()
end end
end end
function add_rule(var) function add_rule(var)
local FLAG = var["FLAG"] local FLAG = var["FLAG"]
local TMP_DNSMASQ_PATH = var["TMP_DNSMASQ_PATH"] local TMP_DNSMASQ_PATH = var["TMP_DNSMASQ_PATH"]
local DNSMASQ_CONF_FILE = var["DNSMASQ_CONF_FILE"] local DNSMASQ_CONF_FILE = var["DNSMASQ_CONF_FILE"]
local LISTEN_PORT = var["LISTEN_PORT"] local LISTEN_PORT = var["LISTEN_PORT"]
local DEFAULT_DNS = var["DEFAULT_DNS"] local DEFAULT_DNS = var["DEFAULT_DNS"]
local LOCAL_DNS = var["LOCAL_DNS"] local LOCAL_DNS = var["LOCAL_DNS"]
local TUN_DNS = var["TUN_DNS"] local TUN_DNS = var["TUN_DNS"]
local NFTFLAG = var["NFTFLAG"] local NFTFLAG = var["NFTFLAG"]
local CACHE_PATH = api.CACHE_PATH local CACHE_PATH = api.CACHE_PATH
local CACHE_FLAG = "dnsmasq_" .. FLAG local CACHE_FLAG = "dnsmasq_" .. FLAG
local CACHE_DNS_PATH = CACHE_PATH .. "/" .. CACHE_FLAG local CACHE_DNS_PATH = CACHE_PATH .. "/" .. CACHE_FLAG
local CACHE_TEXT_FILE = CACHE_DNS_PATH .. ".txt" local CACHE_TEXT_FILE = CACHE_DNS_PATH .. ".txt"
local list1 = {} local list1 = {}
local function check_dns(domain, dns) local function check_dns(domain, dns)
if domain == "" or domain:find("#") then if domain == "" or domain:find("#") then
return false return false
end end
if not dns then if not dns then
return return
end end
for k,v in ipairs(list1[domain].dns) do for k,v in ipairs(list1[domain].dns) do
if dns == v then if dns == v then
return true return true
end end
end end
return false return false
end end
local function check_ipset(domain, ipset) local function check_ipset(domain, ipset)
if domain == "" or domain:find("#") then if domain == "" or domain:find("#") then
return false return false
end end
if not ipset then if not ipset then
return return
end end
for k,v in ipairs(list1[domain].ipsets) do for k,v in ipairs(list1[domain].ipsets) do
if ipset == v then if ipset == v then
return true return true
end end
end end
return false return false
end end
local function set_domain_dns(domain, dns) local function set_domain_dns(domain, dns)
if domain == "" or domain:find("#") then if domain == "" or domain:find("#") then
return return
end end
if not dns then if not dns then
return return
end end
if not list1[domain] then if not list1[domain] then
list1[domain] = { list1[domain] = {
dns = {}, dns = {},
ipsets = {} ipsets = {}
} }
end end
for line in string.gmatch(dns, '[^' .. "," .. ']+') do for line in string.gmatch(dns, '[^' .. "," .. ']+') do
if not check_dns(domain, line) then if not check_dns(domain, line) then
table.insert(list1[domain].dns, line) table.insert(list1[domain].dns, line)
end end
end end
end end
local function set_domain_ipset(domain, ipset) local function set_domain_ipset(domain, ipset)
if domain == "" or domain:find("#") then if domain == "" or domain:find("#") then
return return
end end
if not ipset then if not ipset then
return return
end end
if not list1[domain] then if not list1[domain] then
list1[domain] = { list1[domain] = {
dns = {}, dns = {},
ipsets = {} ipsets = {}
} }
end end
for line in string.gmatch(ipset, '[^' .. "," .. ']+') do for line in string.gmatch(ipset, '[^' .. "," .. ']+') do
if not check_ipset(domain, line) then if not check_ipset(domain, line) then
table.insert(list1[domain].ipsets, line) table.insert(list1[domain].ipsets, line)
end end
end end
end end
local cache_text = "" local cache_text = ""
local nodes_address_md5 = sys.exec("echo -n $(uci show %s | grep '\\.address') | md5sum" % c_config) local nodes_address_md5 = sys.exec("echo -n $(uci show %s | grep '\\.address') | md5sum" % c_config)
local new_text = TMP_DNSMASQ_PATH .. DNSMASQ_CONF_FILE .. DEFAULT_DNS .. LOCAL_DNS .. TUN_DNS .. nodes_address_md5 .. NFTFLAG local new_text = TMP_DNSMASQ_PATH .. DNSMASQ_CONF_FILE .. DEFAULT_DNS .. LOCAL_DNS .. TUN_DNS .. nodes_address_md5 .. NFTFLAG
if fs.access(CACHE_TEXT_FILE) then if fs.access(CACHE_TEXT_FILE) then
for line in io.lines(CACHE_TEXT_FILE) do for line in io.lines(CACHE_TEXT_FILE) do
cache_text = line cache_text = line
end end
end end
if cache_text ~= new_text then if cache_text ~= new_text then
api.remove(CACHE_DNS_PATH .. "*") api.remove(CACHE_DNS_PATH .. "*")
end end
local dnsmasq_default_dns = TUN_DNS local dnsmasq_default_dns = TUN_DNS
local setflag_4= (NFTFLAG == "1") and "4#inet#passwall2#" or "" local setflag_4= (NFTFLAG == "1") and "4#inet#passwall2#" or ""
local setflag_6= (NFTFLAG == "1") and "6#inet#passwall2#" or "" local setflag_6= (NFTFLAG == "1") and "6#inet#passwall2#" or ""
if not fs.access(CACHE_DNS_PATH) then if not fs.access(CACHE_DNS_PATH) then
fs.mkdir(CACHE_DNS_PATH) fs.mkdir(CACHE_DNS_PATH)
local fwd_dns local fwd_dns
-- Always use domestic DNS to resolve node domain names -- Always use domestic DNS to resolve node domain names
if true then if true then
fwd_dns = LOCAL_DNS fwd_dns = LOCAL_DNS
api.uci_foreach_c("nodes", function(t) api.uci_foreach_c("nodes", function(t)
local function process_address(address) local function process_address(address)
address = (address or ""):lower() address = (address or ""):lower()
if address == "engage.cloudflareclient.com" then return end if address == "engage.cloudflareclient.com" then return end
if datatypes.hostname(address) then if datatypes.hostname(address) then
set_domain_dns(address, fwd_dns) set_domain_dns(address, fwd_dns)
set_domain_ipset(address, setflag_4 .. "psw2_vps," .. setflag_6 .. "psw2_vps6") set_domain_ipset(address, setflag_4 .. "psw2_vps," .. setflag_6 .. "psw2_vps6")
end end
end end
process_address(t.address) process_address(t.address)
process_address(t.download_address) process_address(t.download_address)
end) end)
end end
if list1 and next(list1) then if list1 and next(list1) then
local server_out = io.open(CACHE_DNS_PATH .. "/001-server.conf", "a") local server_out = io.open(CACHE_DNS_PATH .. "/001-server.conf", "a")
local ipset_out = io.open(CACHE_DNS_PATH .. "/ipset.conf", "a") local ipset_out = io.open(CACHE_DNS_PATH .. "/ipset.conf", "a")
local set_name = "ipset" local set_name = "ipset"
if NFTFLAG == "1" then if NFTFLAG == "1" then
set_name = "nftset" set_name = "nftset"
end end
for key, value in pairs(list1) do for key, value in pairs(list1) do
if value.dns and #value.dns > 0 then if value.dns and #value.dns > 0 then
for i, dns in ipairs(value.dns) do for i, dns in ipairs(value.dns) do
server_out:write(string.format("server=/.%s/%s", key, dns) .. "\n") server_out:write(string.format("server=/.%s/%s", key, dns) .. "\n")
end end
end end
if value.ipsets and #value.ipsets > 0 then if value.ipsets and #value.ipsets > 0 then
local ipsets_str = "" local ipsets_str = ""
for i, ipset in ipairs(value.ipsets) do for i, ipset in ipairs(value.ipsets) do
ipsets_str = ipsets_str .. ipset .. "," ipsets_str = ipsets_str .. ipset .. ","
end end
ipsets_str = ipsets_str:sub(1, #ipsets_str - 1) ipsets_str = ipsets_str:sub(1, #ipsets_str - 1)
ipset_out:write(string.format("%s=/.%s/%s", set_name, key, ipsets_str) .. "\n") ipset_out:write(string.format("%s=/.%s/%s", set_name, key, ipsets_str) .. "\n")
end end
end end
server_out:close() server_out:close()
ipset_out:close() ipset_out:close()
end end
local f_out = io.open(CACHE_TEXT_FILE, "a") local f_out = io.open(CACHE_TEXT_FILE, "a")
f_out:write(new_text) f_out:write(new_text)
f_out:close() f_out:close()
end end
api.remove(TMP_DNSMASQ_PATH) api.remove(TMP_DNSMASQ_PATH)
fs.symlink(CACHE_DNS_PATH, TMP_DNSMASQ_PATH) fs.symlink(CACHE_DNS_PATH, TMP_DNSMASQ_PATH)
if DNSMASQ_CONF_FILE ~= "nil" then if DNSMASQ_CONF_FILE ~= "nil" then
local conf_lines = {} local conf_lines = {}
if LISTEN_PORT then if LISTEN_PORT then
--Copy dnsmasq instance --Copy dnsmasq instance
conf_lines = copy_instance({ conf_lines = copy_instance({
["LISTEN_PORT"] = LISTEN_PORT, ["LISTEN_PORT"] = LISTEN_PORT,
["TMP_DNSMASQ_PATH"] = TMP_DNSMASQ_PATH, ["TMP_DNSMASQ_PATH"] = TMP_DNSMASQ_PATH,
["return"] = "1" ["return"] = "1"
}) })
--dhcp.leases to hostsMore actions --dhcp.leases to hostsMore actions
local hosts = api.CACHE_PATH .. "/dhcp-hosts" local hosts = api.CACHE_PATH .. "/dhcp-hosts"
sys.call("touch " .. hosts) sys.call("touch " .. hosts)
tinsert(conf_lines, "addn-hosts=" .. hosts) tinsert(conf_lines, "addn-hosts=" .. hosts)
else else
--Modify the default dnsmasq service --Modify the default dnsmasq service
end end
tinsert(conf_lines, string.format("conf-dir=%s", TMP_DNSMASQ_PATH)) tinsert(conf_lines, string.format("conf-dir=%s", TMP_DNSMASQ_PATH))
if dnsmasq_default_dns then if dnsmasq_default_dns then
for s in string.gmatch(dnsmasq_default_dns, '[^' .. "," .. ']+') do for s in string.gmatch(dnsmasq_default_dns, '[^' .. "," .. ']+') do
tinsert(conf_lines, string.format("server=%s", s)) tinsert(conf_lines, string.format("server=%s", s))
end end
tinsert(conf_lines, "all-servers") tinsert(conf_lines, "all-servers")
tinsert(conf_lines, "no-poll") tinsert(conf_lines, "no-poll")
tinsert(conf_lines, "no-resolv") tinsert(conf_lines, "no-resolv")
if FLAG == "default" then if FLAG == "default" then
api.set_cache_var("DEFAULT_DNS", DEFAULT_DNS) api.set_cache_var("DEFAULT_DNS", DEFAULT_DNS)
end end
end end
if #conf_lines > 0 then if #conf_lines > 0 then
local conf_out = io.open(DNSMASQ_CONF_FILE, "a") local conf_out = io.open(DNSMASQ_CONF_FILE, "a")
conf_out:write(table.concat(conf_lines, "\n")) conf_out:write(table.concat(conf_lines, "\n"))
conf_out:write("\n") conf_out:write("\n")
conf_out:close() conf_out:close()
end end
end end
end end
_G.stretch = stretch _G.stretch = stretch
_G.restart = restart _G.restart = restart
_G.logic_restart = logic_restart _G.logic_restart = logic_restart
_G.copy_instance = copy_instance _G.copy_instance = copy_instance
_G.add_rule = add_rule _G.add_rule = add_rule
if arg[1] then if arg[1] then
local func =_G[arg[1]] local func =_G[arg[1]]
if func then if func then
local var = nil local var = nil
if arg[2] then if arg[2] then
var = jsonc.parse(arg[2]) var = jsonc.parse(arg[2])
end end
func(var) func(var)
end end
end end
@@ -1,6 +1,6 @@
if #arg > 0 then if #arg > 0 then
local api = require "luci.passwall2.api" local api = require "luci.passwall2.api"
local str = arg[1] local str = arg[1]
table.remove(arg, 1) table.remove(arg, 1)
print(api.i18n.translatef(str, unpack(arg))) print(api.i18n.translatef(str, unpack(arg)))
end end
@@ -891,7 +891,7 @@ add_firewall_rule() {
del_firewall_rule() { del_firewall_rule() {
for nft in "dstnat" "srcnat" "nat_output" "mangle_prerouting" "mangle_output"; do for nft in "dstnat" "srcnat" "nat_output" "mangle_prerouting" "mangle_output"; do
local handles=$(nft -a list chain $NFTABLE_NAME ${nft} 2>/dev/null | grep -E "PSW2_" | awk -F '# handle ' '{print$2}') local handles=$(nft -a list chain $NFTABLE_NAME ${nft} 2>/dev/null | grep -E "PSW2_" | awk -F '# handle ' '{print$2}')
for handle in $handles; do for handle in $handles; do
nft delete rule $NFTABLE_NAME ${nft} handle ${handle} 2>/dev/null nft delete rule $NFTABLE_NAME ${nft} handle ${handle} 2>/dev/null
done done
+3 -3
View File
@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=v2rayA PKG_NAME:=v2rayA
PKG_VERSION:=2.4.14 PKG_VERSION:=2.4.15
PKG_RELEASE:=1 PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/v2rayA/v2rayA/tar.gz/v$(PKG_VERSION)? PKG_SOURCE_URL:=https://codeload.github.com/v2rayA/v2rayA/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=da929d4dd93f7b5d94f59c78df0ac2bc7637e05dcebc849e13a9af9b5a199e1f PKG_HASH:=d887e95fca80645f19d4a66a0235962aeebe026dd34315def728170d8def128d
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/service PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/service
PKG_LICENSE:=AGPL-3.0-only PKG_LICENSE:=AGPL-3.0-only
@@ -60,7 +60,7 @@ define Download/v2raya-web
URL:=https://github.com/v2rayA/v2rayA/releases/download/v$(PKG_VERSION)/ URL:=https://github.com/v2rayA/v2rayA/releases/download/v$(PKG_VERSION)/
URL_FILE:=web.tar.gz URL_FILE:=web.tar.gz
FILE:=$(WEB_FILE) FILE:=$(WEB_FILE)
HASH:=ce4c481d8d13995f98e593c66ee92d9ea1978df74dfb180b82d201c3cde9f474 HASH:=abafc2e9dc85b80d3186bad3cf57115b625d03bb31aa4b2e9a3ec42028e50cf4
endef endef
define Build/Prepare define Build/Prepare