Skip to content

Commit a5cf5b8

Browse files
authored
Add mieru plugin (MatsuriDayo#482)
* Add mieru plugin * Amend mieru plugin
1 parent c286ec3 commit a5cf5b8

File tree

16 files changed

+705
-1
lines changed

16 files changed

+705
-1
lines changed
Lines changed: 360 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,360 @@
1+
{
2+
"formatVersion": 1,
3+
"database": {
4+
"version": 3,
5+
"identityHash": "cff00d0142d9e53d2ca24a6a55cd213c",
6+
"entities": [
7+
{
8+
"tableName": "proxy_groups",
9+
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `userOrder` INTEGER NOT NULL, `ungrouped` INTEGER NOT NULL, `name` TEXT, `type` INTEGER NOT NULL, `subscription` BLOB, `order` INTEGER NOT NULL, `isSelector` INTEGER NOT NULL, `frontProxy` INTEGER NOT NULL, `landingProxy` INTEGER NOT NULL)",
10+
"fields": [
11+
{
12+
"fieldPath": "id",
13+
"columnName": "id",
14+
"affinity": "INTEGER",
15+
"notNull": true
16+
},
17+
{
18+
"fieldPath": "userOrder",
19+
"columnName": "userOrder",
20+
"affinity": "INTEGER",
21+
"notNull": true
22+
},
23+
{
24+
"fieldPath": "ungrouped",
25+
"columnName": "ungrouped",
26+
"affinity": "INTEGER",
27+
"notNull": true
28+
},
29+
{
30+
"fieldPath": "name",
31+
"columnName": "name",
32+
"affinity": "TEXT",
33+
"notNull": false
34+
},
35+
{
36+
"fieldPath": "type",
37+
"columnName": "type",
38+
"affinity": "INTEGER",
39+
"notNull": true
40+
},
41+
{
42+
"fieldPath": "subscription",
43+
"columnName": "subscription",
44+
"affinity": "BLOB",
45+
"notNull": false
46+
},
47+
{
48+
"fieldPath": "order",
49+
"columnName": "order",
50+
"affinity": "INTEGER",
51+
"notNull": true
52+
},
53+
{
54+
"fieldPath": "isSelector",
55+
"columnName": "isSelector",
56+
"affinity": "INTEGER",
57+
"notNull": true
58+
},
59+
{
60+
"fieldPath": "frontProxy",
61+
"columnName": "frontProxy",
62+
"affinity": "INTEGER",
63+
"notNull": true
64+
},
65+
{
66+
"fieldPath": "landingProxy",
67+
"columnName": "landingProxy",
68+
"affinity": "INTEGER",
69+
"notNull": true
70+
}
71+
],
72+
"primaryKey": {
73+
"autoGenerate": true,
74+
"columnNames": [
75+
"id"
76+
]
77+
},
78+
"indices": [],
79+
"foreignKeys": []
80+
},
81+
{
82+
"tableName": "proxy_entities",
83+
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `groupId` INTEGER NOT NULL, `type` INTEGER NOT NULL, `userOrder` INTEGER NOT NULL, `tx` INTEGER NOT NULL, `rx` INTEGER NOT NULL, `status` INTEGER NOT NULL, `ping` INTEGER NOT NULL, `uuid` TEXT NOT NULL, `error` TEXT, `socksBean` BLOB, `httpBean` BLOB, `ssBean` BLOB, `vmessBean` BLOB, `trojanBean` BLOB, `trojanGoBean` BLOB, `mieruBean` BLOB, `naiveBean` BLOB, `hysteriaBean` BLOB, `tuicBean` BLOB, `sshBean` BLOB, `wgBean` BLOB, `shadowTLSBean` BLOB, `chainBean` BLOB, `nekoBean` BLOB, `configBean` BLOB)",
84+
"fields": [
85+
{
86+
"fieldPath": "id",
87+
"columnName": "id",
88+
"affinity": "INTEGER",
89+
"notNull": true
90+
},
91+
{
92+
"fieldPath": "groupId",
93+
"columnName": "groupId",
94+
"affinity": "INTEGER",
95+
"notNull": true
96+
},
97+
{
98+
"fieldPath": "type",
99+
"columnName": "type",
100+
"affinity": "INTEGER",
101+
"notNull": true
102+
},
103+
{
104+
"fieldPath": "userOrder",
105+
"columnName": "userOrder",
106+
"affinity": "INTEGER",
107+
"notNull": true
108+
},
109+
{
110+
"fieldPath": "tx",
111+
"columnName": "tx",
112+
"affinity": "INTEGER",
113+
"notNull": true
114+
},
115+
{
116+
"fieldPath": "rx",
117+
"columnName": "rx",
118+
"affinity": "INTEGER",
119+
"notNull": true
120+
},
121+
{
122+
"fieldPath": "status",
123+
"columnName": "status",
124+
"affinity": "INTEGER",
125+
"notNull": true
126+
},
127+
{
128+
"fieldPath": "ping",
129+
"columnName": "ping",
130+
"affinity": "INTEGER",
131+
"notNull": true
132+
},
133+
{
134+
"fieldPath": "uuid",
135+
"columnName": "uuid",
136+
"affinity": "TEXT",
137+
"notNull": true
138+
},
139+
{
140+
"fieldPath": "error",
141+
"columnName": "error",
142+
"affinity": "TEXT",
143+
"notNull": false
144+
},
145+
{
146+
"fieldPath": "socksBean",
147+
"columnName": "socksBean",
148+
"affinity": "BLOB",
149+
"notNull": false
150+
},
151+
{
152+
"fieldPath": "httpBean",
153+
"columnName": "httpBean",
154+
"affinity": "BLOB",
155+
"notNull": false
156+
},
157+
{
158+
"fieldPath": "ssBean",
159+
"columnName": "ssBean",
160+
"affinity": "BLOB",
161+
"notNull": false
162+
},
163+
{
164+
"fieldPath": "vmessBean",
165+
"columnName": "vmessBean",
166+
"affinity": "BLOB",
167+
"notNull": false
168+
},
169+
{
170+
"fieldPath": "trojanBean",
171+
"columnName": "trojanBean",
172+
"affinity": "BLOB",
173+
"notNull": false
174+
},
175+
{
176+
"fieldPath": "trojanGoBean",
177+
"columnName": "trojanGoBean",
178+
"affinity": "BLOB",
179+
"notNull": false
180+
},
181+
{
182+
"fieldPath": "mieruBean",
183+
"columnName": "mieruBean",
184+
"affinity": "BLOB",
185+
"notNull": false
186+
},
187+
{
188+
"fieldPath": "naiveBean",
189+
"columnName": "naiveBean",
190+
"affinity": "BLOB",
191+
"notNull": false
192+
},
193+
{
194+
"fieldPath": "hysteriaBean",
195+
"columnName": "hysteriaBean",
196+
"affinity": "BLOB",
197+
"notNull": false
198+
},
199+
{
200+
"fieldPath": "tuicBean",
201+
"columnName": "tuicBean",
202+
"affinity": "BLOB",
203+
"notNull": false
204+
},
205+
{
206+
"fieldPath": "sshBean",
207+
"columnName": "sshBean",
208+
"affinity": "BLOB",
209+
"notNull": false
210+
},
211+
{
212+
"fieldPath": "wgBean",
213+
"columnName": "wgBean",
214+
"affinity": "BLOB",
215+
"notNull": false
216+
},
217+
{
218+
"fieldPath": "shadowTLSBean",
219+
"columnName": "shadowTLSBean",
220+
"affinity": "BLOB",
221+
"notNull": false
222+
},
223+
{
224+
"fieldPath": "chainBean",
225+
"columnName": "chainBean",
226+
"affinity": "BLOB",
227+
"notNull": false
228+
},
229+
{
230+
"fieldPath": "nekoBean",
231+
"columnName": "nekoBean",
232+
"affinity": "BLOB",
233+
"notNull": false
234+
},
235+
{
236+
"fieldPath": "configBean",
237+
"columnName": "configBean",
238+
"affinity": "BLOB",
239+
"notNull": false
240+
}
241+
],
242+
"primaryKey": {
243+
"autoGenerate": true,
244+
"columnNames": [
245+
"id"
246+
]
247+
},
248+
"indices": [
249+
{
250+
"name": "groupId",
251+
"unique": false,
252+
"columnNames": [
253+
"groupId"
254+
],
255+
"orders": [],
256+
"createSql": "CREATE INDEX IF NOT EXISTS `groupId` ON `${TABLE_NAME}` (`groupId`)"
257+
}
258+
],
259+
"foreignKeys": []
260+
},
261+
{
262+
"tableName": "rules",
263+
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `name` TEXT NOT NULL, `userOrder` INTEGER NOT NULL, `enabled` INTEGER NOT NULL, `domains` TEXT NOT NULL, `ip` TEXT NOT NULL, `port` TEXT NOT NULL, `sourcePort` TEXT NOT NULL, `network` TEXT NOT NULL, `source` TEXT NOT NULL, `protocol` TEXT NOT NULL, `outbound` INTEGER NOT NULL, `packages` TEXT NOT NULL)",
264+
"fields": [
265+
{
266+
"fieldPath": "id",
267+
"columnName": "id",
268+
"affinity": "INTEGER",
269+
"notNull": true
270+
},
271+
{
272+
"fieldPath": "name",
273+
"columnName": "name",
274+
"affinity": "TEXT",
275+
"notNull": true
276+
},
277+
{
278+
"fieldPath": "userOrder",
279+
"columnName": "userOrder",
280+
"affinity": "INTEGER",
281+
"notNull": true
282+
},
283+
{
284+
"fieldPath": "enabled",
285+
"columnName": "enabled",
286+
"affinity": "INTEGER",
287+
"notNull": true
288+
},
289+
{
290+
"fieldPath": "domains",
291+
"columnName": "domains",
292+
"affinity": "TEXT",
293+
"notNull": true
294+
},
295+
{
296+
"fieldPath": "ip",
297+
"columnName": "ip",
298+
"affinity": "TEXT",
299+
"notNull": true
300+
},
301+
{
302+
"fieldPath": "port",
303+
"columnName": "port",
304+
"affinity": "TEXT",
305+
"notNull": true
306+
},
307+
{
308+
"fieldPath": "sourcePort",
309+
"columnName": "sourcePort",
310+
"affinity": "TEXT",
311+
"notNull": true
312+
},
313+
{
314+
"fieldPath": "network",
315+
"columnName": "network",
316+
"affinity": "TEXT",
317+
"notNull": true
318+
},
319+
{
320+
"fieldPath": "source",
321+
"columnName": "source",
322+
"affinity": "TEXT",
323+
"notNull": true
324+
},
325+
{
326+
"fieldPath": "protocol",
327+
"columnName": "protocol",
328+
"affinity": "TEXT",
329+
"notNull": true
330+
},
331+
{
332+
"fieldPath": "outbound",
333+
"columnName": "outbound",
334+
"affinity": "INTEGER",
335+
"notNull": true
336+
},
337+
{
338+
"fieldPath": "packages",
339+
"columnName": "packages",
340+
"affinity": "TEXT",
341+
"notNull": true
342+
}
343+
],
344+
"primaryKey": {
345+
"autoGenerate": true,
346+
"columnNames": [
347+
"id"
348+
]
349+
},
350+
"indices": [],
351+
"foreignKeys": []
352+
}
353+
],
354+
"views": [],
355+
"setupQueries": [
356+
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
357+
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'cff00d0142d9e53d2ca24a6a55cd213c')"
358+
]
359+
}
360+
}

app/src/main/AndroidManifest.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,9 @@
164164
<activity
165165
android:name="io.nekohasekai.sagernet.ui.profile.TrojanGoSettingsActivity"
166166
android:configChanges="uiMode" />
167+
<activity
168+
android:name="io.nekohasekai.sagernet.ui.profile.MieruSettingsActivity"
169+
android:configChanges="uiMode" />
167170
<activity
168171
android:name="io.nekohasekai.sagernet.ui.profile.NaiveSettingsActivity"
169172
android:configChanges="uiMode" />

0 commit comments

Comments
 (0)