Commit 759f8c5
committed
feat: unify Kotlin hubs into Rust getter via OutsideProvider registration
Route all update requests through the Rust getter's JSON-RPC system by
registering Kotlin-implemented hubs (GooglePlay, CoolApk) as OutsideProviders.
This eliminates the old hub-specific routing/fallback logic in ClientProxyApi.
Flow: Kotlin -> GetterPort (WebSocket JSON-RPC) -> Rust Provider Map ->
OutsideProvider -> HTTP JSON-RPC -> KotlinHubRpcServer -> Hub impls
Kotlin changes:
- Add KotlinHubRpcServer: Ktor CIO HTTP JSON-RPC server exposing hub methods
- Rewrite ClientProxyApi to delegate all methods to getterPort (remove hubMap,
getHub, NoFunction, fallback logic)
- Simplify ServerApi by removing callOrBack/NoFunction patterns
- Add registerProvider() and getDownloadInfo() to GetterService/Impl/Port
- Start KotlinHubRpcServer in Init.kt and register hubs at startup
- Add ktor-server-core and ktor-server-cio dependencies
Rust changes (getter submodule):
- Add register_provider and get_download JSON-RPC server methods
- Add DownloadItemData, RpcRegisterProviderRequest, RpcDownloadInfoRequest
- Implement get_download on OutsideProvider via HTTP JSON-RPC callback
- Add GetDownload to FunctionType enum with default impl on BaseProvider
- Make rpc::data module public for cross-module imports1 parent b21e322 commit 759f8c5
File tree
10 files changed
+580
-223
lines changed- core-getter
- rpc/src/main/java/net/xzos/upgradeall/getter/rpc
- src/main
- java/net/xzos/upgradeall/getter
- rust
- core-websdk
- src/main/java/net/xzos/upgradeall/core/websdk
- api
- client_proxy
- rpc
- gradle
10 files changed
+580
-223
lines changedLines changed: 30 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
8 | | - | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | | - | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
41 | | - | |
42 | | - | |
43 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
44 | 63 | | |
45 | 64 | | |
46 | 65 | | |
| |||
50 | 69 | | |
51 | 70 | | |
52 | 71 | | |
53 | | - | |
| 72 | + | |
54 | 73 | | |
55 | 74 | | |
56 | | - | |
57 | | - | |
58 | | - | |
| 75 | + | |
59 | 76 | | |
60 | 77 | | |
61 | 78 | | |
62 | | - | |
| 79 | + | |
63 | 80 | | |
64 | 81 | | |
65 | | - | |
66 | | - | |
67 | | - | |
| 82 | + | |
68 | 83 | | |
69 | | - | |
70 | | - | |
71 | | - | |
| 84 | + | |
72 | 85 | | |
73 | | - | |
74 | | - | |
75 | | - | |
| 86 | + | |
76 | 87 | | |
77 | 88 | | |
78 | 89 | | |
| |||
Lines changed: 84 additions & 42 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
8 | | - | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
38 | | - | |
| 39 | + | |
39 | 40 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
45 | 47 | | |
46 | 48 | | |
47 | 49 | | |
48 | 50 | | |
49 | 51 | | |
50 | 52 | | |
51 | | - | |
| 53 | + | |
52 | 54 | | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
58 | 61 | | |
59 | 62 | | |
60 | 63 | | |
61 | 64 | | |
62 | 65 | | |
63 | 66 | | |
64 | | - | |
| 67 | + | |
65 | 68 | | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
71 | 75 | | |
72 | 76 | | |
73 | 77 | | |
| |||
76 | 80 | | |
77 | 81 | | |
78 | 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 | + | |
79 | 119 | | |
80 | 120 | | |
81 | 121 | | |
| |||
84 | 124 | | |
85 | 125 | | |
86 | 126 | | |
87 | | - | |
| 127 | + | |
88 | 128 | | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
93 | 134 | | |
94 | 135 | | |
95 | | - | |
| 136 | + | |
96 | 137 | | |
97 | 138 | | |
98 | 139 | | |
| |||
103 | 144 | | |
104 | 145 | | |
105 | 146 | | |
106 | | - | |
| 147 | + | |
107 | 148 | | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
112 | 154 | | |
113 | 155 | | |
114 | 156 | | |
| |||
128 | 170 | | |
129 | 171 | | |
130 | 172 | | |
131 | | - | |
| 173 | + | |
132 | 174 | | |
133 | 175 | | |
134 | 176 | | |
| |||
0 commit comments