mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-13 19:11:51 +00:00
commit
881fe6b7dd
9 changed files with 16 additions and 17 deletions
|
@ -552,12 +552,15 @@ function wizard_add()
|
|||
ucic:set("network","omrvpn","proto","bonding")
|
||||
end
|
||||
if downloadmax ~= 0 and uploadmax ~= 0 then
|
||||
ucic:set("sqm","omrvpn","enabled","1")
|
||||
ucic:set("sqm","omrvpn","max_download",downloadmax)
|
||||
ucic:set("sqm","omrvpn","max_upload",uploadmax)
|
||||
ucic:set("sqm","omrvpn","download",math.ceil(downloadmax*50/100))
|
||||
ucic:set("sqm","omrvpn","min_download",math.ceil(downloadmax*8/100))
|
||||
ucic:set("sqm","omrvpn","upload",math.ceil(uploadmax*50/100))
|
||||
ucic:set("sqm","omrvpn","min_upload",math.ceil(uploadmax*8/100))
|
||||
else
|
||||
ucic:set("sqm","omrvpn","enabled","0")
|
||||
end
|
||||
if vpn_intf ~= "" then
|
||||
ucic:set("network","omrvpn","device",vpn_intf)
|
||||
|
|
|
@ -289,7 +289,8 @@ return view.extend({
|
|||
o.depends("autorate","1");
|
||||
|
||||
o = s.taboption("tab_autorate", form.Value, "startup_wait_s",_("Number of seconds to wait on startup:"));
|
||||
o.default = "60";
|
||||
o.default = "60.0";
|
||||
o.datatype = 'float'
|
||||
o.depends("autorate","1");
|
||||
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ start_service() {
|
|||
rm -f /usr/share/sqm-autorate/config.*.sh
|
||||
config_load sqm
|
||||
config_foreach _config_autorate queue
|
||||
_launch_autorate
|
||||
[ -n "$(ls /usr/share/sqm-autorate/config.*.sh 2>/dev/null)" ] && _launch_autorate
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
|
|
|
@ -2204,7 +2204,7 @@ do
|
|||
|
||||
log_msg "DEBUG" "Warning: no reflector response within: ${stall_detection_timeout_s} seconds. Checking loads."
|
||||
|
||||
log_msg "DEBUG" "load check is: (( ${achieved_rate_kbps[dl]} kbps > ${connection_stall_thr_kbps} kbps for download && ${achieved_rate_kbps[ul]} kbps > ${connection_stall_thr_kbps} kbps for upload ))"
|
||||
#log_msg "DEBUG" "load check is: (( ${achieved_rate_kbps[dl]} kbps > ${connection_stall_thr_kbps} kbps for download && ${achieved_rate_kbps[ul]} kbps > ${connection_stall_thr_kbps} kbps for upload ))"
|
||||
|
||||
# non-zero load so despite no reflector response within stall interval, the connection not considered to have stalled
|
||||
# and therefore resume normal operation
|
||||
|
|
|
@ -200,7 +200,7 @@ reflector_owd_delta_ewma_delta_thr_ms=10 # mac increase from min delta ewma be
|
|||
stall_detection_thr=5
|
||||
connection_stall_thr_kbps=10
|
||||
|
||||
global_ping_response_timeout_s=100.0 # timeout to set shaper rates to min on no ping response whatsoever (seconds)
|
||||
global_ping_response_timeout_s=${dl_delay_thr_ms} # timeout to set shaper rates to min on no ping response whatsoever (seconds)
|
||||
|
||||
if_up_check_interval_s=10.0 # time to wait before re-checking if rx/tx bytes files exist (e.g. from boot state or sleep recovery)
|
||||
|
||||
|
|
|
@ -197,7 +197,7 @@ reflector_owd_delta_ewma_delta_thr_ms=10 # max increase from min delta ewma befo
|
|||
stall_detection_thr=5
|
||||
connection_stall_thr_kbps=10
|
||||
|
||||
global_ping_response_timeout_s=10.0 # timeout to set shaper rates to min on no ping response whatsoever (seconds)
|
||||
global_ping_response_timeout_s=10 # timeout to set shaper rates to min on no ping response whatsoever (seconds)
|
||||
|
||||
if_up_check_interval_s=10.0 # time to wait before re-checking if rx/tx bytes files exist (e.g. from boot state or sleep recovery)
|
||||
|
||||
|
|
|
@ -657,9 +657,9 @@ del_server_route6() {
|
|||
|
||||
disable_pihole() {
|
||||
local server=$1
|
||||
if [ -n "$(uci -q get dhcp.@dnsmasq[0].server | grep '#53' | grep '10.2')" ]; then
|
||||
if [ -n "$(uci -q get dhcp.@dnsmasq[0].server | grep '#53' | grep '10.255.25')" ]; then
|
||||
_log "Disable Pi-Hole..."
|
||||
uci -q del_list dhcp.@dnsmasq[0].server="$(uci -q get dhcp.@dnsmasq[0].server | tr ' ' '\n' | grep '#53' | grep '10.2')"
|
||||
uci -q del_list dhcp.@dnsmasq[0].server="$(uci -q get dhcp.@dnsmasq[0].server | tr ' ' '\n' | grep '#53' | grep '10.255.25')"
|
||||
if [ -z "$(uci -q get dhcp.@dnsmasq[0].server | grep '127.0.0.1#5353')" ]; then
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
add_list dhcp.@dnsmasq[0].server='127.0.0.1#5353'
|
||||
|
|
|
@ -12,7 +12,6 @@ if [ "$(uci -q get network.omrvpn)" = "" ]; then
|
|||
set network.omrvpn.leasetime=12h
|
||||
set network.omrvpn.type=tunnel
|
||||
set network.omrvpn.txqueuelen=100
|
||||
set network.omrvpn.metric=9000
|
||||
commit network
|
||||
EOF
|
||||
fi
|
||||
|
@ -146,9 +145,11 @@ if [ "$(uci -q get glorytun-udp.vpn.key)" = "" ] && [ "$(uci -q get glorytun.vpn
|
|||
uci -q commit glorytun-udp
|
||||
fi
|
||||
|
||||
if [ "$(uci -q get network.omrvpn.metric)" = "1200" ]; then
|
||||
if [ "$(uci -q get network.tun0.metric)" = "1200" ] || [ -z "$(uci -q get network.tun0.metric)" ]; then
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
set network.omrvpn.metric=9000
|
||||
set network.tun0=device
|
||||
set network.tun0.name='tun0'
|
||||
set network.tun0.metric=9000
|
||||
commit network
|
||||
EOF
|
||||
fi
|
||||
|
|
|
@ -81,7 +81,7 @@ if [ "$(uci -q get sqm.omrvpn)" = "" ] || [ -z "$(uci -q get sqm.omrvpn.delay_th
|
|||
set sqm.omrvpn.script="piece_of_cake.qos"
|
||||
set sqm.omrvpn.qdisc_advanced='0'
|
||||
set sqm.omrvpn.linklayer='none'
|
||||
set sqm.omrvpn.enabled='1'
|
||||
set sqm.omrvpn.enabled='0'
|
||||
set sqm.omrvpn.interface=tun0
|
||||
set sqm.omrvpn.download='0'
|
||||
set sqm.omrvpn.upload='0'
|
||||
|
@ -91,12 +91,6 @@ if [ "$(uci -q get sqm.omrvpn)" = "" ] || [ -z "$(uci -q get sqm.omrvpn.delay_th
|
|||
set sqm.omrvpn.iqdisc_opts='autorate-ingress'
|
||||
set sqm.omrvpn.delay_thr_ms='300'
|
||||
set sqm.omrvpn.reflector_ping_interval_s='0.5'
|
||||
set sqm.omrvpn.download='20000'
|
||||
set sqm.omrvpn.min_download='1000'
|
||||
set sqm.omrvpn.max_download='60000'
|
||||
set sqm.omrvpn.upload='20000'
|
||||
set sqm.omrvpn.min_upload='1000'
|
||||
set sqm.omrvpn.max_upload='60000'
|
||||
set sqm.omrvpn.enable_sleep_function='0'
|
||||
set sqm.omrvpn.autorate='1'
|
||||
commit sqm
|
||||
|
|
Loading…
Reference in a new issue