1
0
Fork 0
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:
Ycarus (Yannick Chabanois) 2025-02-17 14:59:23 +01:00
parent 47911635cf
commit e262441c40

View file

@ -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
;;
*)