1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-02-15 03:51:51 +00:00

Merge pull request #263 from Ysurac/develop

sync
This commit is contained in:
suyuan 2022-08-11 15:47:09 +08:00 committed by GitHub
commit 3a3e313097
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 574 additions and 406 deletions

View file

@ -26,11 +26,11 @@ msgstr ""
msgid "Check if MPTCP between interface and server is working."
msgstr ""
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:40
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:52
msgid "Congestion Control"
msgstr ""
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:69
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:97
msgid "Consecutive segments that should be sent for round robin"
msgstr ""
@ -40,7 +40,7 @@ msgstr ""
msgid "Current:"
msgstr ""
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:40
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:52
msgid "Default is cubic"
msgstr ""
@ -63,11 +63,11 @@ msgstr ""
msgid "Established connections"
msgstr ""
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:63
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:91
msgid "Fill the congestion window on all subflows for round robin"
msgstr ""
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:46
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:74
msgid "Fullmesh subflows for each pair of IP addresses"
msgstr ""
@ -90,7 +90,7 @@ msgstr ""
msgid "Interface"
msgstr ""
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:75
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:104
msgid "Interfaces Settings"
msgstr ""
@ -135,11 +135,11 @@ msgid "Multipath Debug"
msgstr ""
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:12
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:76
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:108
msgid "Multipath TCP"
msgstr ""
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:37
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:42
msgid "Multipath TCP SYN retries"
msgstr ""
@ -151,11 +151,15 @@ msgstr ""
msgid "Multipath TCP path-manager"
msgstr ""
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:29
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:31
msgid "Multipath TCP scheduler"
msgstr ""
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:27
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:47
msgid "Multipath TCP version"
msgstr ""
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:28
msgid "Netlink"
msgstr ""
@ -166,7 +170,7 @@ msgid ""
"ConfigureMPTCP</a> for help."
msgstr ""
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:76
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:108
msgid "One interface must be set as master"
msgstr ""
@ -182,7 +186,7 @@ msgstr ""
msgid "Peak:"
msgstr ""
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:52
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:80
msgid "Re-create fullmesh subflows after a timeout"
msgstr ""
@ -199,6 +203,12 @@ msgstr ""
msgid "Test"
msgstr ""
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:69
msgid ""
"The number of MPTCP-level retransmission intervals with no traffic and "
"pending outstanding data on a given subflow required to declare it stale"
msgstr ""
#: luci-app-mptcp/luasrc/view/mptcp/multipath.htm:914
msgid "Upload:"
msgstr ""
@ -210,36 +220,36 @@ msgstr ""
msgid "Waiting for command to complete..."
msgstr ""
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:80
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:112
msgid "backup"
msgstr ""
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:22
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:30
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:32
msgid "default"
msgstr ""
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:14
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:17
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:20
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:54
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:65
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:82
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:93
msgid "disable"
msgstr ""
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:78
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:110
msgid "disabled"
msgstr ""
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:13
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:16
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:19
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:53
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:64
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:81
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:92
msgid "enable"
msgstr ""
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:77
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:109
msgid "enabled"
msgstr ""
@ -277,10 +287,22 @@ msgstr ""
msgid "kbit/s"
msgstr ""
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:79
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:111
msgid "master"
msgstr ""
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:57
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:85
msgid "ndiffports subflows number"
msgstr ""
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:64
msgid ""
"specifies the maximum number of ADD_ADDR suboptions accepted for each MPTCP "
"connection"
msgstr ""
#: luci-app-mptcp/luasrc/model/cbi/mptcp.lua:59
msgid ""
"specifies the maximum number of additional subflows allowed for each MPTCP "
"connection"
msgstr ""

View file

@ -640,7 +640,7 @@ function wizard_add()
ucic:set("v2ray","main","enabled","0")
ucic:foreach("shadowsocks-libev", "server", function(s)
local sectionname = s[".name"]
if sectionname:match("^sss.*") then
if sectionname:match("^sss.*") and ucic:get("shadowsocks-libev",sectionname,"server") ~= "" then
ucic:set("shadowsocks-libev",sectionname,"disabled","0")
end
end)
@ -709,7 +709,7 @@ function wizard_add()
local nbip = 0
for _, ssip in pairs(server_ips) do
ucic:set("shadowsocks-libev","sss" .. nbip,"server",ssip)
if default_proxy == "shadowsocks" and serversnb > disablednb then
if default_proxy == "shadowsocks" and serversnb > disablednb and ssip ~= "" then
ucic:set("shadowsocks-libev","sss" .. nbip,"disabled","0")
end
nbip = nbip + 1
@ -747,7 +747,7 @@ function wizard_add()
local nbip = 0
for _, ssip in pairs(server_ips) do
ucic:set("shadowsocks-libev","sss" .. nbip,"server",ssip)
if default_proxy == "shadowsocks" and serversnb > disablednb then
if default_proxy == "shadowsocks" and serversnb > disablednb and ssip ~= "" then
ucic:set("shadowsocks-libev","sss" .. nbip,"disabled","0")
end
nbip = nbip + 1
@ -843,8 +843,8 @@ function wizard_add()
end
else
if serversnb == 0 then
ucic:set("shadowsocks-libev","sss0","disabled",shadowsocks_disable)
ucic:set("shadowsocks-libev","sss1","disabled",shadowsocks_disable)
ucic:set("shadowsocks-libev","sss0","disabled","1")
ucic:set("shadowsocks-libev","sss1","disabled","1")
end
ucic:set("shadowsocks-libev","sss0","key","")
ucic:set("shadowsocks-libev","sss1","key","")

File diff suppressed because it is too large Load diff

View file

@ -1,199 +1,265 @@
msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8"
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:183
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:207
msgid ""
"Advanced option string to pass to the egress queueing disciplines; no error "
"checking, use very carefully."
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:180
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:204
msgid ""
"Advanced option string to pass to the ingress queueing disciplines; no error "
"checking, use very carefully."
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:72
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:75
msgid "Autorate settings"
msgstr ""
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:96
msgid "Base download speed (kbit/s) (ingress):"
msgstr ""
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:110
msgid "Base upload speed (kbit/s) (egress):"
msgstr ""
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:72
msgid "Basic Settings"
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:100
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:124
msgid ""
"Create log file for this SQM instance under /var/run/sqm/${Interface_name}."
"[start|stop]-sqm.log."
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:92
msgid ""
"Download speed (kbit/s) (ingress) set to 0 to selectively disable ingress "
"shaping:"
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:259
msgid "Debug"
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:58
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:58
msgid "Enable SQM"
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:78
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:90
msgid "Enable SQM autorate"
msgstr ""
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:79
msgid "Enable this SQM instance."
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:148
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:172
msgid ""
"Explicit congestion notification (ECN) status on inbound packets (ingress):"
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:154
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:178
msgid ""
"Explicit congestion notification (ECN) status on outbound packets (egress)."
msgstr ""
#: applications/luci-app-sqm/root/usr/share/rpcd/acl.d/luci-app-sqm.json:3
#: luci-app-sqm-autorate/root/usr/share/rpcd/acl.d/luci-app-sqm.json:3
msgid "Grant UCI access for luci-app-sqm"
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:168
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:192
msgid "Hard limit on egress queues; leave empty for default."
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:164
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:188
msgid "Hard limit on ingress queues; leave empty for default."
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:142
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:166
msgid "Ignore DSCP on ingress:"
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:89
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:93
msgid "Interface name"
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:176
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:200
msgid ""
"Latency target for egress, e.g. 5ms [units: s, ms, or us]; leave empty for "
"automatic selection, put in the word default for the qdisc's default."
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:172
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:196
msgid ""
"Latency target for ingress, e.g 5ms [units: s, ms, or us]; leave empty for "
"automatic selection, put in the word default for the qdisc's default."
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:74
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:74
msgid "Link Layer Adaptation"
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:203
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:227
msgid ""
"Maximal Size for size and rate calculations, tcMTU (byte); needs to be >= "
"interface MTU + overhead:"
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:213
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:105
msgid "Maximum download speed (kbit/s):"
msgstr ""
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:119
msgid "Maximum upload speed (kbit/s):"
msgstr ""
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:237
msgid ""
"Minimal packet size, MPU (byte); needs to be > 0 for ethernet size tables:"
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:208
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:100
msgid "Minimum download speed (kbit/s):"
msgstr ""
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:114
msgid "Minimum upload speed (kbit/s):"
msgstr ""
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:136
msgid "Must be set to cake if autorate is used."
msgstr ""
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:232
msgid ""
"Number of entries in size/rate tables, TSIZE; for ATM choose TSIZE = (tcMTU "
"+ 1) / 16:"
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:193
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:287
msgid "Number of seconds to wait on startup:"
msgstr ""
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:255
msgid "Output monitoring lines showing cake bandwidth changes"
msgstr ""
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:251
msgid "Output monitoring lines showing processing stats"
msgstr ""
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:217
msgid "Per Packet Overhead (byte):"
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:73
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:267
msgid "Pingers numbers:"
msgstr ""
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:73
msgid "Queue Discipline"
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:120
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:144
msgid "Queue setup script"
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:71
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:71
msgid "Queues"
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:112
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:136
msgid ""
"Queuing disciplines useable on this system. After installing a new qdisc, "
"you need to restart the router to see updates!"
msgstr ""
#: applications/luci-app-sqm/root/usr/share/luci/menu.d/luci-app-sqm.json:3
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:263
msgid "Reflector ping interval in seconds:"
msgstr ""
#: luci-app-sqm-autorate/root/usr/share/luci/menu.d/luci-app-sqm.json:3
msgid "SQM QoS"
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:199
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:223
msgid ""
"Show Advanced Linklayer Options, (only needed if MTU > 1500). Advanced "
"options will only be used as long as this box is checked."
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:133
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:157
msgid ""
"Show and Use Advanced Configuration. Advanced options will only be used as "
"long as this box is checked."
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:160
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:184
msgid ""
"Show and Use Dangerous Configuration. Dangerous options will only be used as "
"long as this box is checked."
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:64
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:275
msgid "Sleep functionnality"
msgstr ""
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:64
msgid "Smart Queue Management"
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:136
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:160
msgid "Squash DSCP on inbound packets (ingress):"
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:83
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:84
msgid ""
"The SQM GUI has just enabled the sqm initscript on your behalf. Remember to "
"disable the sqm initscript manually under System Startup menu in case this "
"change was not wished for."
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:48
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:48
msgid ""
"The SQM service seems to be disabled. Please use the button below to "
"activate this service."
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:96
msgid ""
"Upload speed (kbit/s) (egress) set to 0 to selectively disable egress "
"shaping:"
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:279
msgid "Threshold in Kbit/s below which dl/ul is considered idle"
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:103
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:283
msgid ""
"Time threshold to put pingers to sleep on substained dl/ul achieved rate < "
"idle_threshold"
msgstr ""
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:127
msgid "Verbosity of SQM's output into the system log."
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:187
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:211
msgid "Which link layer to account for:"
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:218
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:242
msgid "Which linklayer adaptation mechanism to use; for testing only"
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:65
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:65
msgid ""
"With <abbr title=\"Smart Queue Management\">SQM</abbr> you can enable "
"traffic shaping, better mixing (Fair Queueing), active queue length "
"management (AQM) and prioritisation on one network interface."
msgstr ""
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:107
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:149
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:155
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:188
#: applications/luci-app-sqm/htdocs/luci-static/resources/view/network/sqm.js:219
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:131
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:173
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:179
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:212
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:243
msgid "default"
msgstr ""
#: luci-app-sqm-autorate/htdocs/luci-static/resources/view/network/sqm.js:271
msgid "delay threshold in ms:"
msgstr ""

View file

@ -1,5 +1,5 @@
#!/bin/sh /etc/rc.common
# Copyright (C) 2018 Ycarus (Yannick Chabanois) <ycarus@zugaina.org>
# Copyright (C) 2018-2022 Ycarus (Yannick Chabanois) <ycarus@zugaina.org>
# shellcheck disable=SC2039
# vim: set noexpandtab tabstop=4 shiftwidth=4 softtabstop=4 :
@ -29,18 +29,10 @@ set_ipv6_state() {
commit firewall
EOF
if [ "$disable_ipv6" == "1" ]; then
if [ "$disable_ipv6" = "1" ]; then
logger -t "omr-6in4" "Disable IPv6"
uci -q batch <<-EOF >/dev/null
set dhcp.lan.ra_default="0"
set network.lan.ipv6="0"
delete network.lan.ipv6
delete dhcp.lan.dhcpv6
delete dhcp.lan.ra
delete dhcp.lan.ra_default
delete dhcp.lan.ra_management
delete dhcp.lan.ra_preference
unbound.ub_main.protocol='ip4_only'
set unbound.@unbound[-1].protocol='ip4_only'
commit unbound
del_list v2ray.main.inbounds="omr6"
commit v2ray
@ -48,34 +40,19 @@ set_ipv6_state() {
config_load shadowsocks-libev
config_foreach set_shadowsocks_address ss_redir "0.0.0.0"
uci -q batch <<-EOF >/dev/null
commit network
commit dhcp
commit shadowsocks-libev
EOF
[ ! -f /etc/wgetrc ] && cp /etc/wgetrc4 /etc/wgetrc
else
logger -t "omr-6in4" "Enable IPv6"
uci -q batch <<-EOF >/dev/null
set dhcp.lan.dhcpv6="server"
set dhcp.lan.ra="server"
set dhcp.lan.ra_default="1"
set dhcp.lan.ra_preference="high"
set dhcp.lan.ra_management="1"
delete dhcp.lan.ra_flags
add_list dhcp.lan.ra_flags='managed-config'
set dhcp.lan.ra_slaac='1'
add_list dhcp.lan.ra_flags='other-config'
set network.lan.ipv6="1"
set network.lan.delegate="0"
set network.omr6in4.force_link=1
set network.omr6in4.metric=1
delete network.omr6in4.auto
unbound.ub_main.protocol='mixed'
set unbound.@unbound[-1].protocol='mixed'
commit unbound
EOF
if [ "$(uci -q get network.lan.ip6assign)" = "" ]; then
uci -q set network.lan.ip6assign='60'
fi
if [ "$(uci -q get network.globals.ula_prefix)" = "" ]; then
r1=$(dd if=/dev/urandom bs=1 count=1 |hexdump -e '1/1 "%02x"')
r2=$(dd if=/dev/urandom bs=2 count=1 |hexdump -e '2/1 "%02x"')
@ -106,12 +83,62 @@ set_ipv6_state() {
fi
}
set_ipv6_state_intf() {
local disable_ipv6="$(uci -q get openmptcprouter.settings.disable_ipv6)"
local intf="$1"
config_get ip4table $intf ip4table
config_get ipv6 $intf ipv6 "0"
if [ "$ip4table" = "lan" ]; then
if [ "$disable_ipv6" = "1" ] && [ "$ipv6" != "0" ]; then
logger -t "omr-6in4" "Disable IPv6 on ${intf}"
uci -q batch <<-EOF >/dev/null
set dhcp.${intf}.ra_default="0"
delete network.${intf}.ipv6
delete dhcp.${intf}.dhcpv6
delete dhcp.${intf}.ra
delete dhcp.${intf}.ra_default
delete dhcp.${intf}.ra_management
delete dhcp.${intf}.ra_preference
commit network
commit dhcp
EOF
elif [ "$disable_ipv6" != "1" ] && [ "$ipv6" != "1" ]; then
logger -t "omr-6in4" "Enable IPv6 on ${intf}"
uci -q batch <<-EOF >/dev/null
set dhcp.${intf}.dhcpv6="server"
set dhcp.${intf}.ra="server"
set dhcp.${intf}.ra_default="1"
set dhcp.${intf}.ra_preference="high"
set dhcp.${intf}.ra_management="1"
delete dhcp.${intf}.ra_flags
add_list dhcp.${intf}.ra_flags='managed-config'
set dhcp.${intf}.ra_slaac='1'
add_list dhcp.${intf}.ra_flags='other-config'
set network.${intf}.ipv6="1"
set network.${intf}.delegate="0"
EOF
if [ "$(uci -q get network.${intf}.ip6assign)" = "" ]; then
uci -q set network.${intf}.ip6assign='60'
fi
uci -q batch <<-EOF >/dev/null
commit network
commit dhcp
EOF
fi
fi
}
start_service() {
[ "$(uci -q get openmptcprouter.settings.disable_ipv6)" != "1" ] && [ "$(uci -q get network.lan.ipv6)" != "1" ] && set_ipv6_state
[ "$(uci -q get openmptcprouter.settings.disable_ipv6)" != "1" ] && {
config_load network
config_foreach set_ipv6_state_intf interface
set_ipv6_state
}
[ "$(uci -q get openmptcprouter.settings.disable_ipv6)" != "0" ] && {
config_load network
config_foreach set_ipv6_state_intf interface
ifdown omr6in4
/etc/init.d/odhcpd stop
[ -z "$(/etc/init.d/odhcpd status | grep inactive)" ] && /etc/init.d/odhcpd stop
return
}
[ "$(ifstatus omr6in4 | jsonfilter -e '@.up' | tr -d '\n')" != "true" ] && ifup omr6in4

View file

@ -1,6 +1,6 @@
#!/bin/sh
if [ "$(uci -q get openmptcprouter.latest_versions)" = "" ]; then
if [ "$(uci -q get unbound.@unbound[0].listen_port | grep 5353)" = "" ]; then
if [ "$(uci -q get openmptcprouter.settings.version)" = "" ]; then
if [ "$(uci -q get unbound.@unbound[-1].listen_port | grep 5353)" = "" ]; then
uci -q batch <<-EOF >/dev/null
set unbound.@unbound[-1].listen_port=5353
set unbound.@unbound[-1].protocol="ip4_only"
@ -8,11 +8,11 @@ if [ "$(uci -q get openmptcprouter.latest_versions)" = "" ]; then
set unbound.@unbound[-1].recursion="aggressive"
set unbound.@unbound[-1].validator='1'
set unbound.@unbound[-1].validator_ntp='1'
del unbound.ub_main.dns64_prefix
del unbound.ub_main.iface_wan
del unbound.ub_main.dhcp4_slaac6
del unbound.ub_main.query_minimize
del unbound.ub_main.query_min_strict
del unbound.@unbound[-1].dns64_prefix
del unbound.@unbound[-1].iface_wan
del unbound.@unbound[-1].dhcp4_slaac6
del unbound.@unbound[-1].query_minimize
del unbound.@unbound[-1].query_min_strict
commit unbound
EOF
fi
@ -24,6 +24,13 @@ if [ "$(uci -q get openmptcprouter.latest_versions)" = "" ]; then
EOF
fi
fi
if [ -z "$(uci -q get unbound.ub_main)" ]; then
uci -q batch <<-EOF >/dev/null
rename unbound.@unbound[-1]=ub_main
commit unbound
EOF
fi
if [ "$(uci -q show dhcp | grep 'use-application-dns.net')" = "" ]; then
uci -q batch <<-EOF >/dev/null
add_list dhcp.@dnsmasq[-1].server="/use-application-dns.net/"
@ -66,6 +73,7 @@ fi
if [ -z "$(uci -q show unbound.auth_icann)" ]; then
uci -q batch <<-EOF >/dev/null
del unbound.auth_icann
set unbound.auth_icann=zone
set unbound.auth_icann.fallback='1'
set unbound.auth_icann.url_dir='https://www.internic.net/domain/'
@ -77,6 +85,7 @@ if [ -z "$(uci -q show unbound.auth_icann)" ]; then
add_list unbound.auth_icann.zone_name='in-addr.arpa.'
add_list unbound.auth_icann.zone_name='ip6.arpa.'
set unbound.auth_icann.enabled='1'
del unbound.fwd_isp
set unbound.fwd_isp=zone
set unbound.fwd_isp.enabled='0'
set unbound.fwd_isp.fallback='1'
@ -84,6 +93,7 @@ if [ -z "$(uci -q show unbound.auth_icann)" ]; then
set unbound.fwd_isp.zone_type='forward_zone'
add_list unbound.fwd_isp.zone_name='isp-bill.example.com.'
add_list unbound.fwd_isp.zone_name='isp-mail.example.net.'
del unbound.fwd_google
set unbound.fwd_google=zone
set unbound.fwd_google.enabled='0'
set unbound.fwd_google.fallback='1'
@ -95,6 +105,7 @@ if [ -z "$(uci -q show unbound.auth_icann)" ]; then
add_list unbound.fwd_google.server='2001:4860:4860::8844'
add_list unbound.fwd_google.server='2001:4860:4860::8888'
set unbound.fwd_google.zone_name='.'
del unbound.fwd_cloudflare
set unbound.fwd_cloudflare=zone
set unbound.fwd_cloudflare.enabled='0'
set unbound.fwd_cloudflare.fallback='1'