1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-02-15 03:51:51 +00:00
This commit is contained in:
suyuan 2024-03-19 10:41:37 +08:00 committed by GitHub
commit e6d5c9f33e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 7 additions and 8 deletions

View file

@ -812,6 +812,7 @@ if [ "$OMR_TRACKER_STATUS" = "ERROR" ] || ([ "$OMR_TRACKER_INTERFACE" != "omrvpn
commit openvpn
EOF
fi
[ -z "VPN_BASE_INTF" ] && VPN_BASE_INTF="omr"
/etc/init.d/openvpn restart $VPN_BASE_INTF 2>&1 >/dev/null
fi
config_load openmptcprouter

View file

@ -53,7 +53,7 @@ _check_server_intf() {
local host=$1
local port=$2
local valid_ip6=$(valid_subnet6 $host)
for intf in $(multipath | awk '/default/ {print $1}'); do
for intf in $(multipath 2>/dev/null | awk '/default/ {print $1}'); do
local k=0
while [ "$server_ping" = false ] && [ "$k" -le "$retry" ]; do
if [ "$valid_ip6" != "ok" ]; then
@ -168,7 +168,6 @@ _check_master() {
add_list openvpn.omr.remote=$ip
commit openvpn
set openmptcprouter.${name}.current='1'
set openmptcprouter.${name}.get_config='1'
commit openmptcprouter
EOF
/etc/init.d/openmptcprouter-vps get_openvpn_key $name >/dev/null 2>/dev/null
@ -319,7 +318,6 @@ _check_backup() {
add_list openvpn.omr.remote=$ip
commit openvpn
set openmptcprouter.${name}.current='1'
set openmptcprouter.${name}.get_config='1'
commit openmptcprouter
EOF
/etc/init.d/openmptcprouter-vps get_openvpn_key $name >/dev/null 2>/dev/null

View file

@ -118,8 +118,8 @@ if [ "$(uci -q get omr-tracker.defaults.family)" = "" ]; then
set omr-tracker.omrvpn.initial_state='online'
set omr-tracker.omrvpn.family='ipv4'
set omr-tracker.omrvpn.reliability='1'
set omr-tracker.omrvpn.failure_interval='5'
set omr-tracker.omrvpn.tries_up='5'
set omr-tracker.omrvpn.failure_interval='3'
set omr-tracker.omrvpn.tries_up='3'
set omr-tracker.omrvpn.count='1'
set omr-tracker.proxy.initial_state='online'
set omr-tracker.proxy.family='ipv4ipv6'

View file

@ -19,8 +19,8 @@ if [ "$(uci -q get omr-tracker.omrvpn)" = "" ]; then
set omr-tracker.omrvpn.family='ipv4'
set omr-tracker.omrvpn.reliability='1'
set omr-tracker.omrvpn.count='1'
set omr-tracker.omrvpn.failure_interval='5'
set omr-tracker.omrvpn.tries_up='5
set omr-tracker.omrvpn.failure_interval='3'
set omr-tracker.omrvpn.tries_up='3
commit omr-tracker
EOF
fi

View file

@ -79,7 +79,7 @@ reflector_ping_interval_s=$(uci -q get sqm.${INTERFACE}.reflector_ping_interval_
# (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 $(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" | bc) || echo "100")) + "0.1" | bc) # (milliseconds)
dl_owd_delta_thr_mss=$(uci -q get sqm.${INTERFACE}.delay_thr_ms || echo "250")
dl_owd_delta_thr_ms=$(uci -q get sqm.${INTERFACE}.delay_thr_ms || echo "250")
ul_owd_delta_thr_ms=${dl_owd_delta_thr_ms}
# average owd delta threshold in ms at which maximum adjust_down_bufferbloat is applied