mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Merge branch 'test' into develop
This commit is contained in:
commit
90ad13911a
3 changed files with 5 additions and 3 deletions
|
@ -1,5 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
SERVER=$1
|
SERVER=$1
|
||||||
|
shift
|
||||||
[ -z "$SERVER" ] && SERVER="vps"
|
[ -z "$SERVER" ] && SERVER="vps"
|
||||||
KEY=$(uci -q get iperf.$SERVER.key)
|
KEY=$(uci -q get iperf.$SERVER.key)
|
||||||
USER=$(uci -q get iperf.$SERVER.user)
|
USER=$(uci -q get iperf.$SERVER.user)
|
||||||
|
@ -9,7 +10,7 @@ PORTS=$(uci -q get iperf.$SERVER.ports | sed 's/,/ /g')
|
||||||
PORT="${PORTS%% *}"
|
PORT="${PORTS%% *}"
|
||||||
echo $KEY | base64 -d > /tmp/iperf.pem
|
echo $KEY | base64 -d > /tmp/iperf.pem
|
||||||
if [ -n "$PASSWORD" ] && [ -n "$USER" ] && [ -n "$KEY" ]; then
|
if [ -n "$PASSWORD" ] && [ -n "$USER" ] && [ -n "$KEY" ]; then
|
||||||
IPERF3_PASSWORD=$PASSWORD iperf3 --username $USER --rsa-public-key-path /tmp/iperf.pem -c $HOST -p $PORT ${@:2}
|
IPERF3_PASSWORD=$PASSWORD iperf3 --username $USER --rsa-public-key-path /tmp/iperf.pem -c $HOST -p $PORT ${@}
|
||||||
else
|
else
|
||||||
iperf3 -c $HOST -p $PORT ${@:2}
|
iperf3 -c $HOST -p $PORT ${@}
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -29,6 +29,6 @@ else
|
||||||
domain=$(echo $HOST | awk -F/ '{print $3}')
|
domain=$(echo $HOST | awk -F/ '{print $3}')
|
||||||
hostip=$(dig +nocmd +noall +answer A $domain | grep -v CNAME | awk '{print $5}' | tr -d "\n")
|
hostip=$(dig +nocmd +noall +answer A $domain | grep -v CNAME | awk '{print $5}' | tr -d "\n")
|
||||||
ipset add ss_rules_dst_bypass_all $hostip
|
ipset add ss_rules_dst_bypass_all $hostip
|
||||||
curl -4 $HOST >/dev/null || echo
|
curl -4 --interface $INTERFACE $HOST >/dev/null || echo
|
||||||
ipset del ss_rules_dst_bypass_all $hostip
|
ipset del ss_rules_dst_bypass_all $hostip
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -17,6 +17,7 @@ EOF
|
||||||
uci -q set openmptcprouter.settings.scaling_min_freq=$(cat /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq | tr -d "\n")
|
uci -q set openmptcprouter.settings.scaling_min_freq=$(cat /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq | tr -d "\n")
|
||||||
uci -q set openmptcprouter.settings.scaling_max_freq=$(cat /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq | tr -d "\n")
|
uci -q set openmptcprouter.settings.scaling_max_freq=$(cat /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq | tr -d "\n")
|
||||||
uci -q set openmptcprouter.settings.scaling_governor='performance'
|
uci -q set openmptcprouter.settings.scaling_governor='performance'
|
||||||
|
uci -q commit openmptcprouter
|
||||||
}
|
}
|
||||||
|
|
||||||
exit 0
|
exit 0
|
Loading…
Add table
Add a link
Reference in a new issue