概述

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

脚本

执行效果

脚本内容

 #!/bin/bash
 # VeePN免费服务器列表获取 By: admin@ym68.cc
 # Date: 2021-02-10
 # 随机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 ".data|{addresses:.addresses[0],username:.username,password:.password,port:.port,protocol:.protocol,regionName:.regionName}"
        sleep 0.5
 done 

该文章采用「CC 协议」,转载必须注明作者和本文链接.
分类: 其他