From 4bb08662ccc4173027fdca80a3da47032beeaf01 Mon Sep 17 00:00:00 2001 From: NobyDa <53217160+NobyDa@users.noreply.github.com> Date: Thu, 22 Feb 2024 21:55:59 +0800 Subject: [PATCH] Minor improvements. --- Loon/Loon_TF_Account.plugin | 2 +- Surge/Module/TestFlightAccount.sgmodule | 2 +- TestFlight/TestFlightAccount.js | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Loon/Loon_TF_Account.plugin b/Loon/Loon_TF_Account.plugin index 7482b31..7f1aca8 100644 --- a/Loon/Loon_TF_Account.plugin +++ b/Loon/Loon_TF_Account.plugin @@ -8,7 +8,7 @@ skip-proxy = iosapps.itunes.apple.com [Script] -http-request ^https:\/\/testflight\.apple\.com\/v\d\/(app|account|invite)s\/ requires-body=1,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/TestFlight/TestFlightAccount.js,tag=TestFlight账户管理 +http-request ^https:\/\/testflight\.apple\.com\/v\d\/(app|account|invite)s\/ requires-body=1,timeout=120,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/TestFlight/TestFlightAccount.js,tag=TestFlight账户管理 [MITM] hostname = testflight.apple.com \ No newline at end of file diff --git a/Surge/Module/TestFlightAccount.sgmodule b/Surge/Module/TestFlightAccount.sgmodule index 8822e7c..40bb032 100644 --- a/Surge/Module/TestFlightAccount.sgmodule +++ b/Surge/Module/TestFlightAccount.sgmodule @@ -5,7 +5,7 @@ skip-proxy = %APPEND% iosapps.itunes.apple.com [Script] -TestFlight账户管理 = type=http-request,pattern=^https:\/\/testflight\.apple\.com\/v\d\/(app|account|invite)s\/,requires-body=1,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/TestFlight/TestFlightAccount.js +TestFlight账户管理 = type=http-request,pattern=^https:\/\/testflight\.apple\.com\/v\d\/(app|account|invite)s\/,requires-body=1,timeout=120,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/TestFlight/TestFlightAccount.js [MITM] hostname = %APPEND% testflight.apple.com \ No newline at end of file diff --git a/TestFlight/TestFlightAccount.js b/TestFlight/TestFlightAccount.js index 6c47d40..1dc7085 100644 --- a/TestFlight/TestFlightAccount.js +++ b/TestFlight/TestFlightAccount.js @@ -60,7 +60,8 @@ runs() status: 200, headers: { 'Content-Type': 'application/json' - } + }, + body: '{}' }, ...rsp }; @@ -133,6 +134,7 @@ function formatHeaders(h) { function ChangeHeaders(id) { const re = JSON.parse(JSON.stringify(req)); //easy deep copy + re.timeout = $.env.isLoon ? 30 * 1000 : 30; if (id) { $.log(`Request header replaced, using "${id}"`); re.headers[k1] = list[id][k1];