diff --git a/script/boxjs.json b/script/boxjs.json index a87933adc..6e825b02e 100644 --- a/script/boxjs.json +++ b/script/boxjs.json @@ -545,6 +545,7 @@ "tf_loop_count", "tf_session_info", "tf_joined_app_id", + "tf_storefront_id", "tf_invalid_app_id", "tf_check_account_id", "tf_join_concurrency", @@ -645,6 +646,13 @@ "placeholder": "", "autoGrow": true, "desc": "选择一个账号专门用于检测TF是否可以加入,以保护主号" + }, + { + "id": "tf_storefront_id", + "name": "自定义storefrontId", + "val": "143441-19,29", + "type": "input", + "desc": "自定义storefrontId,以解决国区账号TestFlight下载App受限问题" } ], "icons": [ diff --git a/script/testflight/testflight.js b/script/testflight/testflight.js index 682ea6c24..5258baacc 100644 --- a/script/testflight/testflight.js +++ b/script/testflight/testflight.js @@ -6,6 +6,7 @@ const tfSessionInfoKey = "tf_session_info"; const tfCheckSessionTimeKey = "tf_check_session_time"; const tfCheckSessionTimeDiffKey = "tf_check_session_time_diff"; const tfAppUseAccountIdKey = "tf_app_use_account_id"; +const tfStorefrontId = "tf_storefront_id"; const getSessionRegex = /^https:\/\/testflight\.apple\.com\/v3\/accounts\/(\w{8}-\w{4}-\w{4}-\w{4}-\w{12})\/apps$/; const getFullAppIdRegex = /^https:\/\/testflight\.apple\.com\/v3\/accounts\/\w{8}-\w{4}-\w{4}-\w{4}-\w{12}\/ru\/([a-zA-Z0-9]{8})$/; const modifyTFRequest = /^https:\/\/testflight\.apple\.com\/v\d\/accounts\/\w{8}-\w{4}-\w{4}-\w{4}-\w{12}\/apps\/\d+/ @@ -79,7 +80,7 @@ function modifyRequest() { } } if (/\/install$/.test($.request.url) && Object.keys(body).length > 0) { - body.storefrontId = "143441-19,29"; + body.storefrontId = $.data.read(tfStorefrontId, "143441-19,29"); } return [url, headers, JSON.stringify(body)]; }