kokorobox-native 0.12.0 → 0.13.0
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 +5 -2
- package/index.d.ts +5 -9
- package/index.js +1 -2
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -46,7 +46,7 @@ The full TypeScript declarations are shipped in
|
|
|
46
46
|
| macOS application routing | `applyMacosApplicationRouting`, `getMacosApplicationRoutingStatus`, `stopMacosApplicationRouting`, `openMacosApplicationRoutingSettings` |
|
|
47
47
|
| Core permissions | `getCorePrivilegeStatus`, `setCorePrivileges` |
|
|
48
48
|
| Privileged operations | `runServiceLifecycleElevated`, `cleanupLegacyMacosService`, `stopMacosManagedService`, `repairManagedFilePermissions` |
|
|
49
|
-
| Windows | `getCurrentUserSid`, `isRunningAsAdmin`, `relaunchCurrentApplicationWithPrivilege`, `
|
|
49
|
+
| Windows | `getCurrentUserSid`, `isRunningAsAdmin`, `relaunchCurrentApplicationWithPrivilege`, `ensureKokoroBoxCoreFirewall` |
|
|
50
50
|
|
|
51
51
|
`inspectApplication` validates the input for the current platform and resolves
|
|
52
52
|
it to a routing identifier: an executable path on Windows and Linux, or a code
|
|
@@ -59,6 +59,10 @@ list.
|
|
|
59
59
|
tools. It returns canonical paths for stable deduplication; prefix matching is
|
|
60
60
|
available only when explicitly requested.
|
|
61
61
|
|
|
62
|
+
`ensureKokoroBoxCoreFirewall` accepts the two Mihomo executable paths and the
|
|
63
|
+
KokoroBox application path. Native fixes the three rule names and validates
|
|
64
|
+
the executable basenames before changing Windows Firewall state.
|
|
65
|
+
|
|
62
66
|
`fileToStr` converts a rule file and returns each generated output keyed by its
|
|
63
67
|
behavior, metadata for those outputs, and rules that were skipped. Its optional
|
|
64
68
|
`RuleConvertOptions` accepts Mihomo, General, Egern, and sing-box targets and
|
|
@@ -108,7 +112,6 @@ support than the package itself:
|
|
|
108
112
|
|
|
109
113
|
| Capability | Supported platforms |
|
|
110
114
|
| --- | --- |
|
|
111
|
-
| `networkDnsMutation` | macOS |
|
|
112
115
|
| `serviceLifecycle` | Windows, macOS, Linux |
|
|
113
116
|
| `managedFilePermissions` | macOS, Linux |
|
|
114
117
|
| `windowsPrivilegeRelaunch` | Windows |
|
package/index.d.ts
CHANGED
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
export interface FirewallRule {
|
|
2
|
-
name: string;
|
|
3
|
-
applicationPath: string;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
1
|
export interface UwpLoopbackApp {
|
|
7
2
|
sid: string;
|
|
8
3
|
packageName: string;
|
|
@@ -20,7 +15,6 @@ export interface NativeCapabilities {
|
|
|
20
15
|
launchAtLogin: boolean;
|
|
21
16
|
networkContext: boolean;
|
|
22
17
|
networkMonitor: boolean;
|
|
23
|
-
networkDnsMutation: boolean;
|
|
24
18
|
serviceLifecycle: boolean;
|
|
25
19
|
managedFilePermissions: boolean;
|
|
26
20
|
macosServiceManagement: boolean;
|
|
@@ -197,8 +191,6 @@ export function setLaunchAtLogin(
|
|
|
197
191
|
enabled: boolean,
|
|
198
192
|
): Promise<LaunchAtLoginStatus>;
|
|
199
193
|
export function getNetworkContext(): Promise<NetworkContext>;
|
|
200
|
-
/** Set DNS on the active macOS network service; [] restores automatic DNS. */
|
|
201
|
-
export function setActiveNetworkDns(servers: string[]): Promise<void>;
|
|
202
194
|
/** Resolve when the native network snapshot changes, or `undefined` on timeout. */
|
|
203
195
|
export function waitForNetworkContextChange(
|
|
204
196
|
previous: NetworkContext,
|
|
@@ -292,6 +284,10 @@ export function scanWindowsApplications(
|
|
|
292
284
|
): Promise<ApplicationScanResult>;
|
|
293
285
|
export function getCurrentUserSid(): string;
|
|
294
286
|
export function isRunningAsAdmin(): boolean;
|
|
295
|
-
export function
|
|
287
|
+
export function ensureKokoroBoxCoreFirewall(
|
|
288
|
+
mihomoPath: string,
|
|
289
|
+
mihomoAlphaPath: string,
|
|
290
|
+
applicationPath: string,
|
|
291
|
+
): void;
|
|
296
292
|
export function listUwpLoopbackApps(): UwpLoopbackApp[];
|
|
297
293
|
export function setUwpLoopbackExemption(sid: string, enabled: boolean): void;
|
package/index.js
CHANGED
|
@@ -104,7 +104,6 @@ export const findExecutables = nativeBinding.findExecutables;
|
|
|
104
104
|
export const getLaunchAtLogin = nativeBinding.getLaunchAtLogin;
|
|
105
105
|
export const setLaunchAtLogin = nativeBinding.setLaunchAtLogin;
|
|
106
106
|
export const getNetworkContext = nativeBinding.getNetworkContext;
|
|
107
|
-
export const setActiveNetworkDns = nativeBinding.setActiveNetworkDns;
|
|
108
107
|
export const waitForNetworkContextChange = nativeBinding.waitForNetworkContextChange;
|
|
109
108
|
export const getMacosManagedServiceStatus = nativeBinding.getMacosManagedServiceStatus;
|
|
110
109
|
export const registerMacosManagedService = nativeBinding.registerMacosManagedService;
|
|
@@ -126,7 +125,7 @@ export const inspectApplication = nativeBinding.inspectApplication;
|
|
|
126
125
|
export const scanWindowsApplications = nativeBinding.scanWindowsApplications;
|
|
127
126
|
export const getCurrentUserSid = nativeBinding.getCurrentUserSid;
|
|
128
127
|
export const isRunningAsAdmin = nativeBinding.isRunningAsAdmin;
|
|
129
|
-
export const
|
|
128
|
+
export const ensureKokoroBoxCoreFirewall = nativeBinding.ensureKokoroBoxCoreFirewall;
|
|
130
129
|
export const listUwpLoopbackApps = nativeBinding.listUwpLoopbackApps;
|
|
131
130
|
export const setUwpLoopbackExemption = nativeBinding.setUwpLoopbackExemption;
|
|
132
131
|
export const ServiceIdentity = nativeBinding.ServiceIdentity;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kokorobox-native",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
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.13.0",
|
|
52
|
+
"kokorobox-native-win32-arm64-msvc": "0.13.0",
|
|
53
|
+
"kokorobox-native-darwin-x64": "0.13.0",
|
|
54
|
+
"kokorobox-native-darwin-arm64": "0.13.0",
|
|
55
|
+
"kokorobox-native-linux-x64-gnu": "0.13.0",
|
|
56
|
+
"kokorobox-native-linux-arm64-gnu": "0.13.0"
|
|
57
57
|
}
|
|
58
58
|
}
|