update something

This commit is contained in:
king
2025-08-10 00:38:13 +08:00
parent 79f91830b7
commit 944745d842
2 changed files with 14 additions and 3 deletions

View File

@ -1,7 +1,7 @@
/** /**
@author fmz200 @author fmz200
@function 获取自动加入TF需要的信息修改数据存储形式,支持大部分代理工具包括 QXLoonSurgeEgernStashShadowRocket @function 获取自动加入TF需要的信息支持大部分代理工具包括 QXLoonSurgeEgernStashShadowRocket
@date 2025-06-14 15:27:00 @date 2025-08-10 00:37:00
@quote https://github.com/DecoAri/JavaScript/blob/main/Surge/TF_keys.js @quote https://github.com/DecoAri/JavaScript/blob/main/Surge/TF_keys.js
具体使用步骤 具体使用步骤
@ -14,8 +14,10 @@
const $ = new Env('自动加入TF信息获取'); const $ = new Env('自动加入TF信息获取');
const reg1 = /^https:\/\/testflight\.apple\.com\/v3\/accounts\/(.*)\/apps$/; const reg1 = /^https:\/\/testflight\.apple\.com\/v3\/accounts\/(.*)\/apps$/;
const reg2 = /^https:\/\/testflight\.apple\.com\/join\/(.*)/; const reg2 = /^https:\/\/testflight\.apple\.com\/join\/(.*)/;
const sendNotify = $.getdata("fmz200_TF_notify") || true;
if (reg1.test($request.url)) { if (reg1.test($request.url)) {
console.log(sendNotify);
console.log($request.headers); console.log($request.headers);
$.setdata(null, "fmz200_TF_header"); $.setdata(null, "fmz200_TF_header");
const TF_header = { const TF_header = {
@ -28,7 +30,9 @@ if (reg1.test($request.url)) {
$.setdata(JSON.stringify(TF_header), "fmz200_TF_header"); $.setdata(JSON.stringify(TF_header), "fmz200_TF_header");
if ($.getdata("fmz200_TF_header") !== null) { if ($.getdata("fmz200_TF_header") !== null) {
$.msg($.name, "", "令牌获取成功,请关闭脚本!", ""); if (sendNotify) {
$.msg($.name, "", "令牌获取成功,请关闭脚本!", "");
}
} else { } else {
$.msg($.name, "", "令牌获取失败请打开Mitm over HTTP2开关并重启VPN和TestFlight App", ""); $.msg($.name, "", "令牌获取失败请打开Mitm over HTTP2开关并重启VPN和TestFlight App", "");
} }

View File

@ -443,11 +443,18 @@
"id": "fmz200_testflight", "id": "fmz200_testflight",
"name": "TF自动加入", "name": "TF自动加入",
"keys": [ "keys": [
"fmz200_TF_notify",
"fmz200_TF_APP_ID", "fmz200_TF_APP_ID",
"fmz200_TF_header" "fmz200_TF_header"
], ],
"settings": [ "settings": [
{ {
"id": "fmz200_TF_notify",
"name": "获取令牌成功通知,默认开启",
"val": true,
"type": "boolean",
"desc": ""
},{
"id": "fmz200_TF_APP_ID", "id": "fmz200_TF_APP_ID",
"name": "", "name": "",
"val": "", "val": "",