Minor improvements.

This commit is contained in:
NobyDa 2024-02-22 21:55:59 +08:00
parent cc13ac8aac
commit 4bb08662cc
No known key found for this signature in database
GPG Key ID: E6B0AC788D373C5B
3 changed files with 5 additions and 3 deletions

View File

@ -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

View File

@ -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

View File

@ -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];