Merge Mainline

This commit is contained in:
CN_SZTL 2020-07-19 15:05:53 +08:00
commit cbe0f5269d
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
11 changed files with 36 additions and 39 deletions

View File

@ -174,7 +174,7 @@
});
}
XHR.poll(5, '<%=REQUEST_URI%>', { status: 1 },
XHR.poll(1, '<%=REQUEST_URI%>', { status: 1 },
function(x, info)
{
if (!(npoll++ % 5))

View File

@ -1,6 +1,6 @@
#!/bin/sh
cpu_freq="$(expr $(cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq) / 1000)Mhz"
cpu_freq="$(expr $(cat /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq) / 1000)Mhz"
sys_temp="$(awk "BEGIN{printf (\"%.1f\n\",$(cat /sys/class/thermal/thermal_zone0/temp)/1000) }")°C"
echo -n "(${cpu_freq}, ${sys_temp})"

View File

@ -7,10 +7,10 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI for CPU Freq Setting
LUCI_DEPENDS:=@arm
LUCI_DEPENDS:=@(arm||aarch64)
PKG_NAME:=luci-app-cpufreq
PKG_VERSION:=1
PKG_RELEASE:=5
PKG_RELEASE:=6
include $(TOPDIR)/feeds/luci/luci.mk

View File

@ -33,7 +33,7 @@ for _, e in ipairs(governor_array) do
if e ~= "" then governor:value(translate(e,string.upper(e))) end
end
minfreq = s:option(ListValue, "minifreq", translate("Min Idle CPU Freq"))
minfreq = s:option(ListValue, "minfreq", translate("Min Idle CPU Freq"))
for _, e in ipairs(freq_array) do
if e ~= "" then minfreq:value(e) end
end

View File

@ -35,6 +35,12 @@ msgstr "Ondemand 自动平衡模式"
msgid "performance"
msgstr "Performance 高性能模式(降低游戏转发延迟)"
msgid "powersave"
msgstr "Powersave 省电模式"
msgid "schedutil"
msgstr "Schedutil 自动平衡模式"
msgid "CPU Freq from 48000 to 716000 (Khz)"
msgstr "CPU 频率范围为 48000 到 716000 (Khz)"
@ -54,4 +60,4 @@ msgid "CPU Switching Sampling rate"
msgstr "CPU 切换周期"
msgid "The sampling rate determines how frequently the governor checks to tune the CPU (ms)"
msgstr "CPU 检查切换的周期 (ms) 。注意:过于频繁的切换频率会引起网络延迟抖动"
msgstr "CPU 检查切换的周期 (ms)。注意:过于频繁的切换频率会引起网络延迟抖动"

View File

@ -1,8 +1,8 @@
config settings 'cpufreq'
option maxfreq '716000'
option governor ''
option minfreq ''
option maxfreq ''
option upthreshold '50'
option factor '10'
option minifreq '300000'
option governor 'ondemand'

View File

@ -1,27 +1,24 @@
#!/bin/sh /etc/rc.common
START=50
NAME=cpufreq
uci_get_by_type() {
local ret=$(uci get $NAME.@$1[0].$2 2>/dev/null)
echo ${ret:=$3}
}
NAME="cpufreq"
start()
{
config_load cpufreq
local governor=$(uci_get_by_type settings governor ondemand)
local minifreq=$(uci_get_by_type settings minifreq 48000)
local maxfreq=$(uci_get_by_type settings maxfreq 716000)
local upthreshold=$(uci_get_by_type settings upthreshold 50)
local factor=$(uci_get_by_type settings factor 10)
config_get "governor" "${NAME}" "governor"
config_get "minfreq" "${NAME}" "minfreq"
config_get "maxfreq" "${NAME}" "maxfreq"
config_get "upthreshold" "${NAME}" "upthreshold" "50"
config_get "factor" "${NAME}" "factor" "10"
echo $governor > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor
echo $minifreq > /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq
echo $maxfreq > /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq
if [ "$governor" == "ondemand" ]; then
echo $upthreshold > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
echo $factor > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
[ -z "${governor}" ] && exit 0
echo "${governor}" > "/sys/devices/system/cpu/cpufreq/policy0/scaling_governor"
echo "${minfreq}" > "/sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq"
echo "${maxfreq}" > "/sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq"
if [ "${governor}" = "ondemand" ]; then
echo "${upthreshold}" > "/sys/devices/system/cpu/cpufreq/ondemand/up_threshold"
echo "${factor}" > "/sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor"
fi
}

View File

@ -21,8 +21,8 @@ config openvpn 'myvpn'
option verb '3'
option status '/var/log/openvpn_status.log'
option log '/tmp/openvpn.log'
list push 'route 192.168.0.0 255.255.255.0'
list push 'route 192.168.1.0 255.255.255.0'
list push 'comp-lzo adaptive'
list push 'redirect-gateway def1 bypass-dhcp'
list push 'dhcp-option DNS 192.168.0.1'
list push 'dhcp-option DNS 192.168.1.1'

View File

@ -2,7 +2,7 @@
ddns=`uci get openvpn.myvpn.ddns`
port=`uci get openvpn.myvpn.port`
proto=`uci get openvpn.myvpn.proto`
proto=`uci get openvpn.myvpn.proto|sed -e 's/server/client/g'`
cat > /tmp/my.ovpn <<EOF
client
@ -13,7 +13,7 @@ resolv-retry infinite
nobind
persist-key
persist-tun
verb 3"
verb 3
EOF
echo '<ca>' >> /tmp/my.ovpn
cat /etc/openvpn/ca.crt >> /tmp/my.ovpn

View File

@ -1,9 +1 @@
http-proxy-option EXT1 "POST http://rd.go.10086.cn"
http-proxy-option EXT1 "GET http://rd.go.10086.cn"
http-proxy-option EXT1 "X-Online-Host: rd.go.10086.cn"
http-proxy-option EXT1 "POST http://rd.go.10086.cn"
http-proxy-option EXT1 "X-Online-Host: rd.go.10086.cn"
http-proxy-option EXT1 "POST http://rd.go.10086.cn"
http-proxy-option EXT1 "Host: rd.go.10086.cn"
http-proxy-option EXT1 "GET http://rd.go.10086.cn"
http-proxy-option EXT1 "Host: rd.go.10086.cn"
comp-lzo

View File

@ -19,10 +19,12 @@ sw_flow.description = translate("Software based offloading for routing/NAT")
sw_flow:depends("sfe_flow", 0)
end
if luci.sys.call("cat /proc/cpuinfo | grep -q MT7621") == 0 then
hw_flow = s:option(Flag, "hw_flow", translate("Hardware flow offloading"))
hw_flow.default = 0
hw_flow.description = translate("Requires hardware NAT support. Implemented at least for mt7621")
hw_flow:depends("sw_flow", 1)
end
if nixio.fs.access("/lib/modules/" .. kernel_version .. "/fast-classifier.ko") then
sfe_flow = s:option(Flag, "sfe_flow", translate("Shortcut-FE flow offloading"))