51工具盒子

依楼听风雨
笑看云卷云舒,淡观潮起潮落

VeePN免费VPN节点列表获取

概述

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

脚本

执行效果

脚本内容

#!/bin/bash
# VeePN免费VPN节点列表获取
# Author: admin@lolicp.com
# Date: 2023-03-25

随机Md5值

Time_Stmp=date +%s |md5sum|head -c 32

登录用户

Access_Token_Code=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' -H 'Content-type: application/json' -H 'Origin: chrome-extension://majdfhpaihoncoakbjgbdhglocklcgno' -d "{\"appVersion\":\"2.0.11\",\"platform\":\"Chrome\",\"platformVersion\":\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36\",\"timeZone\":\"+0800\",\"deviceName\":\"Chrome 88\",\"udid\":\"${Time_Stmp}\"}" https://tlsext.com/api/launch/ |jq -r ".data.accessToken"

登录验证

Login_Header_Info(){ curl -s -X POST -H "Authorization: Bearer ${Access_Token_Code}" -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' -H 'Content-type: application/json' -H 'Origin: chrome-extension://majdfhpaihoncoakbjgbdhglocklcgno' "${@}" }

过滤免费服务器列表

Proxy_Location_Code=Login_Header_Info https://tlsext.com/api/location/ |jq -r ".data[]|select(.proxy_type<1)"

获取地区列表

Proxy_Location_Region_List=echo "${Proxy_Location_Code}" |jq -r .region

循环获取地区列表信息

`for Proxy_Location_Region in ${Proxy_Location_Region_List};do

解析输出结果

Login_Header_Info -d "{"region":"${Proxy_Location_Region}","protocol":"https","type":0}" https://tlsext.com/api/server/ |jq -c ".data|{regionName:.regionName,protocol:.protocol,addresses:.addresses[0],username:.username,password:.password,port:.port}" sleep 0.5 done`


赞(1)
未经允许不得转载:工具盒子 » VeePN免费VPN节点列表获取