Skip to content

Commit

Permalink
Minor improvements.
Browse files Browse the repository at this point in the history
  • Loading branch information
NobyDa committed Feb 22, 2024
1 parent cc13ac8 commit 4bb0866
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Loon/Loon_TF_Account.plugin
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion Surge/Module/TestFlightAccount.sgmodule
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 3 additions & 1 deletion TestFlight/TestFlightAccount.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ runs()
status: 200,
headers: {
'Content-Type': 'application/json'
}
},
body: '{}'
},
...rsp
};
Expand Down Expand Up @@ -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];
Expand Down

0 comments on commit 4bb0866

Please sign in to comment.