kokorobox-native 0.9.0 → 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/index.d.ts +3 -0
- package/index.js +1 -0
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -43,6 +43,7 @@ The full TypeScript declarations are shipped in
|
|
|
43
43
|
| Rules | `fileToStr` |
|
|
44
44
|
| Platform | `getLaunchAtLogin`, `setLaunchAtLogin`, `getNetworkContext` |
|
|
45
45
|
| macOS service | `getMacosManagedServiceStatus`, `registerMacosManagedService`, `unregisterMacosManagedService`, `reloadMacosManagedService`, `openMacosLoginItemsSettings` |
|
|
46
|
+
| macOS application routing | `invokeMacosApplicationRouting` |
|
|
46
47
|
| Core permissions | `getCorePrivilegeStatus`, `setCorePrivileges` |
|
|
47
48
|
| Windows | `getCurrentUserSid`, `isRunningAsAdmin`, `runElevated`, `launchElevated`, `launchUnelevated`, `setupFirewallRules` |
|
|
48
49
|
|
|
@@ -77,6 +78,11 @@ LaunchDaemon plist and use `SMAppService` directly. They return an explicit
|
|
|
77
78
|
`requires-approval` state when an administrator must approve the daemon in
|
|
78
79
|
System Settings.
|
|
79
80
|
|
|
81
|
+
`invokeMacosApplicationRouting(request)` runs the bounded, versioned macOS
|
|
82
|
+
application-routing control-plane protocol off the Node.js main thread. It
|
|
83
|
+
controls the bundled System Extension and Network Extension; packet forwarding
|
|
84
|
+
continues to run in the separate extension process.
|
|
85
|
+
|
|
80
86
|
Core-file privilege APIs are supported on macOS and Linux. They accept only
|
|
81
87
|
canonical, existing executables named `mihomo` or `mihomo-alpha`; callers cannot
|
|
82
88
|
use them as a general privileged-command interface. See the repository's
|
package/index.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export interface NativeCapabilities {
|
|
|
14
14
|
networkContext: boolean;
|
|
15
15
|
networkMonitor: boolean;
|
|
16
16
|
macosServiceManagement: boolean;
|
|
17
|
+
macosApplicationRouting: boolean;
|
|
17
18
|
coreFilePrivileges: boolean;
|
|
18
19
|
serviceIdentity: boolean;
|
|
19
20
|
}
|
|
@@ -195,6 +196,8 @@ export function registerMacosManagedService(plistName: string): MacOSManagedServ
|
|
|
195
196
|
export function unregisterMacosManagedService(plistName: string): MacOSManagedServiceStatus;
|
|
196
197
|
export function reloadMacosManagedService(plistName: string): MacOSManagedServiceStatus;
|
|
197
198
|
export function openMacosLoginItemsSettings(): void;
|
|
199
|
+
/** Invoke the versioned macOS Network/System Extension control-plane protocol. */
|
|
200
|
+
export function invokeMacosApplicationRouting(request: string): Promise<string>;
|
|
198
201
|
/** Inspect only validated `mihomo` and `mihomo-alpha` executable paths. */
|
|
199
202
|
export function getCorePrivilegeStatus(paths: string[]): CorePrivilegeStatus[];
|
|
200
203
|
/** Grant or revoke the constrained Unix core-file privilege. */
|
package/index.js
CHANGED
|
@@ -110,6 +110,7 @@ export const registerMacosManagedService = nativeBinding.registerMacosManagedSer
|
|
|
110
110
|
export const unregisterMacosManagedService = nativeBinding.unregisterMacosManagedService;
|
|
111
111
|
export const reloadMacosManagedService = nativeBinding.reloadMacosManagedService;
|
|
112
112
|
export const openMacosLoginItemsSettings = nativeBinding.openMacosLoginItemsSettings;
|
|
113
|
+
export const invokeMacosApplicationRouting = nativeBinding.invokeMacosApplicationRouting;
|
|
113
114
|
export const getCorePrivilegeStatus = nativeBinding.getCorePrivilegeStatus;
|
|
114
115
|
export const setCorePrivileges = nativeBinding.setCorePrivileges;
|
|
115
116
|
export const inspectApplication = nativeBinding.inspectApplication;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kokorobox-native",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.1",
|
|
4
4
|
"description": "KokoroBox native bridge",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -48,11 +48,11 @@
|
|
|
48
48
|
"access": "public"
|
|
49
49
|
},
|
|
50
50
|
"optionalDependencies": {
|
|
51
|
-
"kokorobox-native-win32-x64-msvc": "0.
|
|
52
|
-
"kokorobox-native-win32-arm64-msvc": "0.
|
|
53
|
-
"kokorobox-native-darwin-x64": "0.
|
|
54
|
-
"kokorobox-native-darwin-arm64": "0.
|
|
55
|
-
"kokorobox-native-linux-x64-gnu": "0.
|
|
56
|
-
"kokorobox-native-linux-arm64-gnu": "0.
|
|
51
|
+
"kokorobox-native-win32-x64-msvc": "0.10.1",
|
|
52
|
+
"kokorobox-native-win32-arm64-msvc": "0.10.1",
|
|
53
|
+
"kokorobox-native-darwin-x64": "0.10.1",
|
|
54
|
+
"kokorobox-native-darwin-arm64": "0.10.1",
|
|
55
|
+
"kokorobox-native-linux-x64-gnu": "0.10.1",
|
|
56
|
+
"kokorobox-native-linux-arm64-gnu": "0.10.1"
|
|
57
57
|
}
|
|
58
58
|
}
|