mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Fix VPN IP detection in omr-iperf
This commit is contained in:
parent
47911635cf
commit
e262441c40
1 changed files with 1 additions and 2 deletions
|
@ -27,13 +27,12 @@ config_foreach get_auth_data server
|
|||
if [ -n "$PASSWORD" ] && [ -n "$USER" ] && [ -n "$KEY" ]; then
|
||||
echo $KEY | base64 -d > /tmp/iperf.pem
|
||||
#IPERF3_PASSWORD=$PASSWORD iperf3 --username $USER --rsa-public-key-path /tmp/iperf.pem --use-pkcs1-padding -c $HOST -p $PORT ${@}
|
||||
echo "machin: $0"
|
||||
case "$0" in
|
||||
*proxy)
|
||||
IPERF3_PASSWORD=$PASSWORD iperf3 --username $USER --rsa-public-key-path /tmp/iperf.pem -c $HOST -p $PORT --socks5 127.0.0.1:1111 ${@}
|
||||
;;
|
||||
*vpn)
|
||||
VPNIP=$(ip r show default metric 0 | awk '{ print $3 }' | tr -d '\n')
|
||||
VPNIP=$(ip r show default metric 0 | awk '{ if (length($3) != 0) { print $3; exit; } }' | tr -d '\n')
|
||||
IPERF3_PASSWORD=$PASSWORD iperf3 --username $USER --rsa-public-key-path /tmp/iperf.pem -c $VPNIP -p $PORT
|
||||
;;
|
||||
*)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue