Skip to content

Commit

Permalink
fix: curl ip.sb response 403 (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
mouyase authored Apr 1, 2022
1 parent 8da780e commit c05fec3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions zsh-proxy.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,21 @@ __check_ip() {
echo "========================================"
echo "Check what your IP is"
echo "----------------------------------------"
ipv4=$(curl -s -k https://api-ipv4.ip.sb/ip)
ipv4=$(curl -s -k https://api-ipv4.ip.sb/ip -H 'user-agent: zsh-proxy')
if [[ "$ipv4" != "" ]]; then
echo "IPv4: $ipv4"
else
echo "IPv4: -"
fi
echo "----------------------------------------"
ipv6=$(curl -s -k -m10 https://api-ipv6.ip.sb/ip)
ipv6=$(curl -s -k -m10 https://api-ipv6.ip.sb/ip -H 'user-agent: zsh-proxy')
if [[ "$ipv6" != "" ]]; then
echo "IPv6: $ipv6"
else
echo "IPv6: -"
fi
if command -v python >/dev/null; then
geoip=$(curl -s -k https://api.ip.sb/geoip)
geoip=$(curl -s -k https://api.ip.sb/geoip -H 'user-agent: zsh-proxy')
if [[ "$geoip" != "" ]]; then
echo "----------------------------------------"
echo "Info: "
Expand Down

0 comments on commit c05fec3

Please sign in to comment.