1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00
This commit is contained in:
suyuan 2023-09-05 21:16:03 +08:00
parent 2b1a626ff3
commit 61a425c898
6 changed files with 8 additions and 8 deletions

View file

@ -40,7 +40,7 @@ reflector_ping_interval_s=$(uci -q get sqm.${INTERFACE}.reflector_ping_interval_
# so e.g. if 6 reflectors are specified and the number of pingers is set to 4, the first 4 reflectors will be used initially
# and the remaining 2 reflectors in the list will be used in the event any of the first 4 go bad
# a bad reflector will go to the back of the queue on reflector rotation
#reflectors=("1.1.1.1" "1.0.0.1" "8.8.8.8" "8.8.4.4" "9.9.9.9" "9.9.9.10")
#reflectors=("223.5.5.5" "1.0.0.1" "8.8.8.8" "8.8.4.4" "9.9.9.9" "9.9.9.10")
reflectors=($(uci get omr-tracker.defaults.hosts))
no_pingers=$(uci -q get sqm.${INTERFACE}.no_pingers || echo "4")

View file

@ -56,7 +56,7 @@ pinger_binary=$(uci -q get sqm.${INTERFACE}.pinger || echo 'tsping')
# a bad reflector will go to the back of the queue on reflector rotation
reflectors=( $(uci -q get omr-tracker.defaults.hosts) )
#reflectors=(
#"1.1.1.1" "1.0.0.1" # Cloudflare
#"223.5.5.5" "1.0.0.1" # Cloudflare
#"8.8.8.8" "8.8.4.4" # Google
#"9.9.9.9" "9.9.9.10" "9.9.9.11" # Quad9
#"94.140.14.15" "94.140.14.140" "94.140.14.141" "94.140.15.15" "94.140.15.16" # AdGuard
@ -78,7 +78,7 @@ reflector_ping_interval_s=$(uci -q get sqm.${INTERFACE}.reflector_ping_interval_
# these are automatically adjusted based on maximum on the wire packet size
# (adjustment significant at sub 12Mbit/s rates, else negligible)
#logger -t "sqm-autorate" "ping for ${INTERFACE} (${ul_if}): $(echo $(/sbin/uci -q get sqm.${INTERFACE}.delay_thr_ms || echo '100'))"
dl_owd_delta_thr_ms=$(echo $(echo $(uci -q get sqm.${INTERFACE}.delay_thr_ms || echo $(($(/usr/bin/ping -B -w 5 -c 5 -I ${ul_if} 1.1.1.1 | cut -d '/' -s -f6 | tr -d '\n' 2>/dev/null)+30)) || echo "100")) + "0.1" | bc) # (milliseconds)
dl_owd_delta_thr_ms=$(echo $(echo $(uci -q get sqm.${INTERFACE}.delay_thr_ms || echo $(($(/usr/bin/ping -B -w 5 -c 5 -I ${ul_if} 223.5.5.5 | cut -d '/' -s -f6 | tr -d '\n' 2>/dev/null)+30)) || echo "100")) + "0.1" | bc) # (milliseconds)
ul_owd_delta_thr_ms=${dl_owd_delta_thr_ms}
# average owd delta threshold in ms at which maximum adjust_down_bufferbloat is applied

View file

@ -718,7 +718,7 @@ fi
#default_gw=$(ip route show default | awk '/default/ {print $3}')
#default_gw6=$(ip -6 route show default | awk '/default/ {print $3}')
default_gw=$(ip route get 1.1.1.1 | grep via | awk '{print $3}')
default_gw=$(ip route get 223.5.5.5 | grep via | awk '{print $3}')
default_gw6=$(ip -6 route get 2606:4700:4700::1111 | grep via | awk '{print $3}')
#current_interface_gw=$(uci -q get "network.$OMR_TRACKER_INTERFACE.gateway")
@ -954,7 +954,7 @@ if [ "$OMR_TRACKER_INTERFACE" = "glorytun" ] || [ "$OMR_TRACKER_INTERFACE" = "om
uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.lc=$(date +"%s")
}
else
local mtu=$(omr-mtu $OMR_TRACKER_DEVICE_IP 1.1.1.1)
local mtu=$(omr-mtu $OMR_TRACKER_DEVICE_IP 223.5.5.5)
[ -n "$mtu" ] && {
uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.mtu=$mtu
ip link set dev $OMR_TRACKER_DEVICE mtu $mtu > /dev/null 2>&1

View file

@ -216,7 +216,7 @@ _dns() {
+time="$OMR_TRACKER_TIMEOUT" \
+tries=1 \
one.one.one.one
) && echo "$ret" | grep -sq "1.1.1.1" && {
) && echo "$ret" | grep -sq "223.5.5.5" && {
OMR_TRACKER_LATENCY=$(echo "$ret" | awk '/Query time/{print $4}')
_update_rto "$OMR_TRACKER_LATENCY"
return

View file

@ -59,7 +59,7 @@ timeout=${OMR_TRACKER_TIMEOUT:-5}
interval=${OMR_TRACKER_INTERVAL:-10}
retry=${OMR_TRACKER_TRIES:-4}
proxy=${OMR_TRACKER_PROXY:-127.0.0.1:1111}
hosts=${OMR_TRACKER_HOSTS:-1.1.1.1 1.0.0.1}
hosts=${OMR_TRACKER_HOSTS:-223.5.5.5 1.0.0.1}
wait_test=${OMR_TRACKER_WAIT_TEST:-0}
nodns=0

View file

@ -112,7 +112,7 @@ if [ -z "$(uci -q show unbound.auth_icann)" ]; then
set unbound.fwd_cloudflare.tls_index='cloudflare-dns.com'
set unbound.fwd_cloudflare.tls_upstream='1'
set unbound.fwd_cloudflare.zone_type='forward_zone'
add_list unbound.fwd_cloudflare.server='1.1.1.1'
add_list unbound.fwd_cloudflare.server='223.5.5.5'
add_list unbound.fwd_cloudflare.server='1.0.0.1'
add_list unbound.fwd_cloudflare.server='2606:4700:4700::1111'
add_list unbound.fwd_cloudflare.server='2606:4700:4700::1001'