v6代理服务器
匹配ipv6地址的正则
(([a-f0-9]{1,4}:|){0,7}[::]{0,1}[a-f0-9]{1,4})/\d{0,3})
获取出口ip地址的api
ipv4
1 | curl 'https://api.ipify.org?format=json' |
ipv6
1 | curl 'https://api6.ipify.org?format=json' |
shell处理返回的json——使用jq(需安装)
1 | curl -s http://ip.taobao.com/service/getIpInfo.php?ip=myip | jq '.data.ip' |
以上命令可获取以下json的ip
1 | { |
All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.