Update return.sh

dependabot/github_actions/actions/checkout-3.1.0
fscarmen 4 years ago committed by GitHub
parent 66aacfe2c7
commit c1a700d618
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      return.sh

@ -1,16 +1,10 @@
#!/usr/bin/env bash
ip=$1
TEMP_FILE='ip.temp'
ARCHITECTURE="$(uname -m)"
case $ARCHITECTURE in
x86_64 ) FILE=besttrace;;
aarch64 ) FILE=besttracearm;;
* ) echo -e "只支持 AMD64、ARM64 使用,问题反馈:[https://github.com/fscarmen/tools/issues]" && exit 1;;
esac
FILE=$(uname -m | sed "s/x86_64/besttrace/" | sed "s/aarch64/besttracearm/")
[[ -z "$ip" ]] && echo -e "请填入上对端 IP" && exit 1
echo -e "\n说明:测 VPS ——> 对端 经过的地区及线路,填本地IP就是测回程。"
[[ ! -e "$FILE" ]] && wget -qN https://cdn.jsdelivr.net/gh/fscarmen/tools/besttrace/$FILE
chmod +x "$FILE" >/dev/null 2>&1
./"$FILE" "$ip" -g cn > $TEMP_FILE

Loading…
Cancel
Save