forked from ihaoljy/Rewrite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRevenuecat.js
129 lines (118 loc) · 5.54 KB
/
Revenuecat.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
/*************************************
项目名称:revenuecat合集 (此合集只包含10.5及以后的软件)
软件版本:均适配2023.9.8最新 (每一个下载地址对应一个UAMappings)
下载地址:星锤日记 https://is.gd/R5KqD4
下载地址:倒数鸭 https://is.gd/rETAhp
下载地址:星垂专注 https://is.gd/rEG9H5
下载地址:Context https://is.gd/splCnF
下载地址: Vision-个人OKR目标管理 https://t.cn/A6OxXNxK
下载地址:Structured-每日计划 https://t.cn/A6cWhz4X
下载地址:cookie记账
下载地址:倒数鸭
下载地址:HTTPBOT 2022.2.1 作者zoo
下载地址:Mypianist 2.08
下载地址:TouchRetouch 5.1.12
下载地址:Appspree https://t.cn/A6otfeAc 3.1
下载地址:Persona 1.824
下载地址:WordSwag 4.56
下载地址:AnkiPro 1.22.1
下载地址:SmartAI
下载地址:AI Chat
下载地址:AI Type
下载地址:TextMask
下载地址:Music Mate
下载地址:Langster https://too.st/7aW 同作者5个软件
下载地址:muse 同作者2个软件
下载地址:Funexpected
下载地址:中国法律
使用声明:⚠️仅供参考,🈲️转载与售卖!
**************************************
[rewrite_local]
#修改
^https?:\/\/api\.revenuecat\.com\/v1\/(subscribers\/[^\/]+$|receipts$) url script-response-body https://raw.githubusercontent.com/Yu9191/Rewrite/main/Revenuecat.js
#清理
^https?:\/\/api\.revenuecat\.com\/v1\/(subscribers\/[^\/]+$|receipts$) url script-request-header https://raw.githubusercontent.com/Yu9191/Rewrite/main/Revenuecat.js
[mitm]
hostname = api.revenuecat.com
************************************/
const Q = {};
const Q1 = JSON.parse(typeof $response != "undefined" && $response.body || null);
if (typeof $response == "undefined") {
delete $request.headers["x-revenuecat-etag"];
delete $request.headers["X-RevenueCat-ETag"];
Q.headers = $request.headers;
} else if (Q1 && Q1.subscriber) {
Q1.subscriber.subscriptions = Q1.subscriber.subscriptions || {};
Q1.subscriber.entitlements = Q1.subscriber.entitlements || {};
var headers = {};
for (var key in $request.headers) {
const reg = /^[a-z]+$/;
if (key === "User-Agent" && !reg.test(key)) {
var lowerkey = key.toLowerCase();
$request.headers[lowerkey] = $request.headers[key];
delete $request.headers[key];
}
}
var UA = $request.headers['user-agent'];
const app = '1';
const UAMappings = {
'StarDiary':{ name: 'pro', id: 'com.gsdyx.StarDiary.nonConsumable.forever'},
'CountDuck':{ name: 'premium', id: 'Lifetime'},
'StarFocus':{ name: 'pro', id: 'com.gsdyx.StarFocus.nonConsumable.forever'},
'Context_iOS':{ name: 'pro', id: 'ctx_3y_sspai_preorder_angel'},
'Vision':{ name: 'promo_3.0', id: 'vis_lifetime_3.0_promo'},
'Structured':{ name: 'pro', id: 'today.structured.pro'},
'Cookie':{ name: 'allaccess', id: 'app.ft.Bookkeeping.lifetime'},
'CountDuck':{ name: 'premium', id: 'Lifetime'},
'HTTPBot':{ name: 'Pro', id: 'httpbot_1499_1y_1w0'},
'MyPianist':{ name: 'pro', id: 'com.collaparte.mypianist.pro.gift.twelve'},
'TouchRetouchBasic':{ name: 'premium', id: 'tr5_yearlysubsc_30_and_20_dlrs'},//年底订阅
'Free':{ name: 'pro', id: 'appspree_pro_lifetime'},
'Version':{ name: 'pro', id: 'httpbot_1499_1y_1w0'},
'wordswag':{ name: 'pro', id: 'Pro_Launch_Monthly'},
'BlackBox':{ name: 'plus', id: 'app.filmnoir.appstore.purchases.lifetime'},
'LongmaoApp':{ name: 'pro', id: 'douyina_forever_01'},
'AnkiPro':{ name: 'Premium', id: 'com.ankipro.app.lifetime'},
'AIChat':{ name: 'AI Plus', id: 'aiplus_yearly'},
'SmartAIChat':{ name: 'Premium', id: 'sc_3999_1y'},
'AIKeyboard':{ name: 'plus_keyboard', id: 'aiplus_keyboard_yearly'},
'TextMask':{ name: 'pro', id: 'tm_lifetime'},
'MusicMate':{ name: 'premium', id: 'mm_lifetime_68_premium'},
'ImagineAI':{ name: 'pro', id: 'artistai.yearly.1'},
'VoiceAI':{ name: 'Special Offer', id: 'voiceannualspecial'},
'Langster':{ name: 'Premium', id: 'com.langster.universal.lifetime'},
'Chat%E7%BB%83%E5%8F%A3%E8%AF%AD':{ name: 'Premium', id: 'com.tech.AiSpeak.All'},
'Readle':{ name: 'Premium', id: 'com.hello.german.yearly'},
'image_upscaler':{ name: 'pro', id: 'yearly_sub_pro'},
'Muse':{ name: 'pro', id: 'monthly_pro_muse'},
'Funexpected%20Math':{ name: 'plus', id: 'Plus6Months14DaysTrial'},
'cdiary':{ name: 'Premium', id: 'pub.kiya.daymoment.lifetime'},
'Sex%20Actions':{ name: 'Premium Plus', id: 'ru.sexactions.subscriptionPlusWeek1'},
'Law':{ name: 'vip', id: 'LawVIPOneYear'},
'Emoji+%20%F0%9F%98%9':{ name: 'premium', id: 'com.emoji.freemium.subscription.premium'},
'universal':{ name: 'Premium', id: 'remotetv.yearly.01'},
'HabitKit':{ name: 'Pro', id: 'habitkit_1799_lt'},
'windiary':{ name: 'Pro', id: 'windiary_1799_lt'},
'Liftbear':{ name: 'Pro', id: 'liftbear_2399_1y'},
'Currency':{ name: 'plus', id: 'com.jeffreygrossman.currencyapp.iap.pro.crossgrade'},
};
const data = {
"expires_date": "2099-12-31T12:00:00Z",
"original_purchase_date": "2023-09-01T11:00:00Z",
"purchase_date": "2023-09-01T11:00:00Z",
"ownership_type": "PURCHASED",
"store": "app_store"
};
for (const i in UAMappings) {
if (new RegExp(`^${i}`, 'i').test(UA)) {
const { name, id } = UAMappings[i];
Q1.subscriber.subscriptions = {};
Q1.subscriber.subscriptions[id] = data;
Q1.subscriber.entitlements[name] = JSON.parse(JSON.stringify(data));
Q1.subscriber.entitlements[name].product_identifier = id;
break;
}
}
Q.body = JSON.stringify(Q1);
}
$done(Q);