Skip to content

Commit

Permalink
http://api.myip.la
Browse files Browse the repository at this point in the history
  • Loading branch information
crazypeace authored May 5, 2022
1 parent 1a0d6c0 commit 4ae01db
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

- 获得IP方法修改为
```
ip=$(curl -s https://api.myip.la)
ip=$(curl -s http://api.myip.la)
```

- 检查域名解析方法修改为
Expand Down
6 changes: 3 additions & 3 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -988,13 +988,13 @@ get_ip() {
[[ -z $NET_STACK ]] && export NET_STACK=$(echo $_V2RAY_NET_STACK_)

if [[ $NET_STACK == "4" ]]; then
ip=$(curl -4 -s https://api.myip.la)
ip=$(curl -4 -s http://api.myip.la)
[[ -z $ip ]] && echo -e "\n$red 检测本机IP失败, 请加群求助${cyan}https://t.me/+D8aqonnCR3s1NTRl${none}\n" && exit
elif [[ $NET_STACK == "6" ]]; then
ip=$(curl -6 -s https://api.myip.la)
ip=$(curl -6 -s http://api.myip.la)
[[ -z $ip ]] && echo -e "\n$red 检测本机IP失败, 请加群求助${cyan}https://t.me/+D8aqonnCR3s1NTRl${none}\n" && exit
else
ip=$(curl -s https://api.myip.la)
ip=$(curl -s http://api.myip.la)
[[ -z $ip ]] && echo -e "\n$red 检测本机IP失败, 请加群求助${cyan}https://t.me/+D8aqonnCR3s1NTRl${none}\n" && exit
fi
}
Expand Down
10 changes: 5 additions & 5 deletions v2ray.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2620,14 +2620,14 @@ get_ip_net_stack() {
get_ip() {
[[ -z $NET_STACK ]] && export NET_STACK=$(echo $_V2RAY_NET_STACK_)

if [ $NET_STACK == "4" ]; then
ip=$(curl -4 -s https://api.myip.la)
if [[ $NET_STACK == "4" ]]; then
ip=$(curl -4 -s http://api.myip.la)
[[ -z $ip ]] && echo -e "\n$red 检测本机IP失败, 请加群求助${cyan}https://t.me/+D8aqonnCR3s1NTRl${none}\n" && exit
elif [ $NET_STACK == "6" ]]; then
ip=$(curl -6 -s https://api.myip.la)
elif [[ $NET_STACK == "6" ]]; then
ip=$(curl -6 -s http://api.myip.la)
[[ -z $ip ]] && echo -e "\n$red 检测本机IP失败, 请加群求助${cyan}https://t.me/+D8aqonnCR3s1NTRl${none}\n" && exit
else
ip=$(curl -s https://api.myip.la)
ip=$(curl -s http://api.myip.la)
[[ -z $ip ]] && echo -e "\n$red 检测本机IP失败, 请加群求助${cyan}https://t.me/+D8aqonnCR3s1NTRl${none}\n" && exit
fi
}
Expand Down

0 comments on commit 4ae01db

Please sign in to comment.