mirror of
https://github.com/ellermister/mtproxy.git
synced 2026-06-05 21:02:31 +08:00
移除 cf 获取IP方式
This commit is contained in:
parent
679b770225
commit
0201788c6f
@ -72,9 +72,9 @@ function get_ip_public() {
|
||||
local public_ip=""
|
||||
|
||||
# 尝试 Cloudflare trace API
|
||||
if [ -z "$public_ip" ]; then
|
||||
public_ip=$(curl -4 -s --connect-timeout 5 --max-time 10 https://1.1.1.1/cdn-cgi/trace -A Mozilla 2>/dev/null | grep "^ip=" | cut -d'=' -f2)
|
||||
fi
|
||||
# if [ -z "$public_ip" ]; then
|
||||
# public_ip=$(curl -4 -s --connect-timeout 5 --max-time 10 https://1.1.1.1/cdn-cgi/trace -A Mozilla 2>/dev/null | grep "^ip=" | cut -d'=' -f2)
|
||||
# fi
|
||||
|
||||
# 尝试 ip.sb API获取公网IP
|
||||
if [ -z "$public_ip" ]; then
|
||||
|
||||
Loading…
Reference in New Issue
Block a user