欢迎光临
我们一直在努力

shell脚本获取EarthVPN免费节点信息列表

概述

由于需要进行资料查阅,借助其EarthVPN免费节点服务代理进行访问。

Shell脚本

执行效果

脚本内容
#!/bin/bash
# EarthVPN节点信息列表获取
# Author: admin@ym68.cc
# Date: 2022-08-20
# Version: 0.0.2

 
# 随机Md5值
Time_Stmp=`date +%s |md5sum|head -c 32`
# 获取节点列表
Earth_VPN_List=`curl -s -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36' "https://earth-vpn.net/servers/?id=nabbmpekekjknlbkgpodfndbodhijjem&t=1612946444175&mt=1612946444172&lt=46817&uid=a1164cd1-b429-4b27-b327-125c31ce8bc1&hash=${Time_Stmp}" |jq -r '.locations[]'`
# 获取节点区域
Earth_VPN_Country_Name_List=`echo "${Earth_VPN_List}"|jq -r '.country_name'`
# 以换行符为分隔符
IFS=$'n'
# 循环输出节点区域代理
for Earth_VPN_Country_Name in ${Earth_VPN_Country_Name_List};do
       # 格式化节点信息
       Earth_VPN_Country_Node_List=`echo "${Earth_VPN_List}" |jq -r "select(.country_name=="${Earth_VPN_Country_Name}")"|jq -cr ".nodes[]"`
       #输出节点信息
       echo -e "节点区域: ${Earth_VPN_Country_Name}n${Earth_VPN_Country_Node_List}"
done

文章来源于互联网:shell脚本获取EarthVPN免费节点信息列表

赞(0)
未经允许不得转载:莱卡云 » shell脚本获取EarthVPN免费节点信息列表