@dns-data/remote 0.2.4 → 0.2.6
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 +17 -3
- package/bin/dns-data.js +55 -5
- package/native/macos-arm64 +0 -0
- package/native/windows-x64.exe +0 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -6,8 +6,22 @@ Start using npx -y @dns-data/remote@latest. The launcher connects only to https:
|
|
|
6
6
|
|
|
7
7
|
It neither installs a system autostart entry nor connects to the former RC5 staging endpoint. User account authentication on AI clients does not count as a bound device; the target hardware must be paired and online. Hardware mismatches fail closed; device count and subscription limits are enforced by the control server.
|
|
8
8
|
|
|
9
|
-
Version 0.2.
|
|
9
|
+
Version 0.2.5 official release. Windows and Apple Silicon builds compiled on X99.
|
|
10
10
|
|
|
11
11
|
After approved macOS pairing and desktop launcher creation, DNS-DATA removes the verified obsolete stable and RC5 Pair Bridge apps from the current user's Applications folder. Existing bound Macs clean them after successful account and hardware validation. Future re-pairing runs through the same official npx launcher; device credentials and Runtime are retained.
|
|
12
|
-
|
|
13
|
-
Version 0.2.4: Local launcher reports confirmed monthly Free quota exhaustion and offers the official DNS-DATA Android app on Google Play. The server still authorizes and enforces all account and tool permissions.
|
|
12
|
+
|
|
13
|
+
Version 0.2.4: Local launcher reports confirmed monthly Free quota exhaustion and offers the official DNS-DATA Android app on Google Play. The server still authorizes and enforces all account and tool permissions.
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
Version 0.2.5: bounded retries for transient control network failures, longer policy and WebSocket handshake timeouts, and corrected response-body cancellation. Authoritative device/account denials are not overridden. Hardware and entitlement verification remain mandatory on every start and reconnect.
|
|
17
|
+
|
|
18
|
+
Version 0.2.6 candidate (not published): macOS users continue starting with
|
|
19
|
+
npx -y @dns-data/remote@latest; the same native Agent now includes LAN Direct
|
|
20
|
+
v3 from the Windows implementation. The launcher installs this verified Agent
|
|
21
|
+
under ~/Library/Application Support/DNS-DATA/Remote-Agent/ so ordinary npm
|
|
22
|
+
cache rotation does not change its executable path. Initial macOS / third-party
|
|
23
|
+
firewall approval may be needed. The system firewall and code-signing policies
|
|
24
|
+
remain in force; this package does not disable or bypass them. The Agent
|
|
25
|
+
performs authorized full-file direct LAN copies over TLS 1.3 and TCP 443
|
|
26
|
+
without an intermediate server handling file bytes. Desktop and Documents
|
|
27
|
+
folder access is still subject to macOS file privacy authorization.
|
package/bin/dns-data.js
CHANGED
|
@@ -3,13 +3,14 @@
|
|
|
3
3
|
const fs=require('fs');
|
|
4
4
|
const path=require('path');
|
|
5
5
|
const crypto=require('crypto');
|
|
6
|
+
const os=require('os');
|
|
6
7
|
const {spawn}=require('child_process');
|
|
7
8
|
|
|
8
9
|
const id=process.platform+'-'+process.arch;
|
|
9
10
|
const binaries={'win32-x64':'windows-x64.exe','darwin-arm64':'macos-arm64'};
|
|
10
11
|
const expected={
|
|
11
|
-
'windows-x64.exe':'
|
|
12
|
-
'macos-arm64':'
|
|
12
|
+
'windows-x64.exe':'6883b48b75a2c6ee313e9e6868619fd56fb74007e3c0db62df1fd7948648c613',
|
|
13
|
+
'macos-arm64':'f0674c40615084531a4ac671a27b05f82be9cdcae5232ff47dade8c8d76e6c82'
|
|
13
14
|
};
|
|
14
15
|
const nativeName=binaries[id];
|
|
15
16
|
if(!nativeName){console.error('[ERROR] DNS-DATA supports Windows x64 and macOS arm64.');process.exit(2);}
|
|
@@ -19,18 +20,67 @@ try{
|
|
|
19
20
|
if(hash.toLowerCase()!==expected[nativeName].toLowerCase()) throw Error('native binary integrity mismatch');
|
|
20
21
|
if(process.platform==='darwin') fs.chmodSync(binary,0o755);
|
|
21
22
|
}catch(e){console.error('[ERROR] DNS-DATA integrity: '+e.message);process.exit(3);}
|
|
23
|
+
|
|
24
|
+
// macOS uses a persistent, per-user Agent path. The executable and its
|
|
25
|
+
// associated network identity no longer change when npx rotates cache paths.
|
|
26
|
+
// All copies are verified against the package's embedded SHA-256. No root,
|
|
27
|
+
// SMB share, SSH daemon, or second macOS application is required.
|
|
28
|
+
let runtimeBinary=binary;
|
|
29
|
+
if(process.platform==='darwin'){
|
|
30
|
+
const stableDir=path.join(os.homedir(),'Library','Application Support',
|
|
31
|
+
'DNS-DATA','Remote-Agent');
|
|
32
|
+
const stableBinary=path.join(stableDir,'dns-data-agent-macos-arm64');
|
|
33
|
+
const digest=(p)=>crypto.createHash('sha256').update(fs.readFileSync(p)).digest('hex');
|
|
34
|
+
try {
|
|
35
|
+
fs.mkdirSync(stableDir,{recursive:true,mode:0o700});
|
|
36
|
+
const dirInfo=fs.lstatSync(stableDir);
|
|
37
|
+
if(!dirInfo.isDirectory()||dirInfo.isSymbolicLink())
|
|
38
|
+
throw Error('unsafe native agent directory');
|
|
39
|
+
fs.chmodSync(stableDir,0o700);
|
|
40
|
+
let current=false;
|
|
41
|
+
try{
|
|
42
|
+
const st=fs.lstatSync(stableBinary);
|
|
43
|
+
if(!st.isFile()||st.isSymbolicLink())throw Error('unsafe native agent path');
|
|
44
|
+
current=digest(stableBinary)===expected[nativeName];
|
|
45
|
+
}catch(e){if(e.code!=='ENOENT')throw e;}
|
|
46
|
+
if(!current){
|
|
47
|
+
const temp=path.join(stableDir,'.dns-data-agent-'+process.pid+
|
|
48
|
+
'-'+crypto.randomBytes(8).toString('hex')+'.tmp');
|
|
49
|
+
try{
|
|
50
|
+
fs.copyFileSync(binary,temp,fs.constants.COPYFILE_EXCL);
|
|
51
|
+
fs.chmodSync(temp,0o700);
|
|
52
|
+
if(digest(temp)!==expected[nativeName])throw Error('staged native hash mismatch');
|
|
53
|
+
fs.renameSync(temp,stableBinary);
|
|
54
|
+
}finally{if(fs.existsSync(temp))fs.unlinkSync(temp);}
|
|
55
|
+
}
|
|
56
|
+
fs.chmodSync(stableBinary,0o700);
|
|
57
|
+
if(digest(stableBinary)!==expected[nativeName])
|
|
58
|
+
throw Error('installed native hash mismatch');
|
|
59
|
+
runtimeBinary=stableBinary;
|
|
60
|
+
}catch(e){
|
|
61
|
+
console.error('[ERROR] DNS-DATA macOS agent installation: '+e.message);
|
|
62
|
+
process.exit(4);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
22
66
|
const args=process.argv.slice(2);
|
|
23
67
|
const safe=new Set(['--start','--pair-only','--hardware-check','--pair-probe','--policy-check']);
|
|
24
68
|
const isPreview=args.length===1&&args[0]==='--flow-preview';
|
|
25
69
|
if(isPreview){
|
|
26
|
-
console.log('DNS-DATA 0.2.
|
|
70
|
+
console.log('DNS-DATA 0.2.6: fresh motherboard/CPU/GPU + account -> native Go executor via npx');
|
|
27
71
|
console.log('New device: eight-digit pairing -> fresh hardware recheck -> built-in remote service (no .NET)');
|
|
28
72
|
console.log('V1 pairing, V1 device startup and legacy bootstrap: disabled');
|
|
29
73
|
process.exit(0);
|
|
30
74
|
}
|
|
31
|
-
|
|
75
|
+
const isNativeLANCopy=['win32','darwin'].includes(process.platform) &&
|
|
76
|
+
args.length===4 &&
|
|
77
|
+
((args[0]==='--lan-copy-send' && args[2]==='--lan-copy-done') ||
|
|
78
|
+
(args[0]==='--lan-copy-receive' && args[2]==='--lan-copy-offer-file')) &&
|
|
79
|
+
[args[1],args[3]].every(p=>typeof p==='string' && p.length>0 && p.length<4096 &&
|
|
80
|
+
path.isAbsolute(p) && [0,10,13].every(c=>!p.includes(String.fromCharCode(c))));
|
|
81
|
+
if(!isNativeLANCopy && (args.length>1||args.some(a=>!safe.has(a)))){console.error('[ERROR] Unknown or unsafe DNS-DATA arguments.');process.exit(2);}
|
|
32
82
|
console.log('DNS-DATA Remote Connection - V2');
|
|
33
|
-
const child=spawn(
|
|
83
|
+
const child=spawn(runtimeBinary,args,{stdio:'inherit',shell:false,windowsHide:false,env:process.env});
|
|
34
84
|
let done=false;
|
|
35
85
|
function finish(code){
|
|
36
86
|
if(done)return;done=true;
|
package/native/macos-arm64
CHANGED
|
Binary file
|
package/native/windows-x64.exe
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dns-data/remote",
|
|
3
|
-
"version": "0.2.
|
|
4
|
-
"description": "DNS-DATA native remote
|
|
3
|
+
"version": "0.2.6",
|
|
4
|
+
"description": "DNS-DATA existing native remote launcher with macOS LAN Direct v3 file transfer",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"private": false,
|
|
7
7
|
"bin": {
|