1cattunnel 0.2.0 → 0.3.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
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Global npm wrapper for the 1Cat Tunnel client.
|
|
4
4
|
|
|
5
|
+
Version 0.3.0 uses TLS 1.3 by default and persists the dedicated per-node credential after first enrollment.
|
|
6
|
+
|
|
5
7
|
## Install
|
|
6
8
|
|
|
7
9
|
```bash
|
|
@@ -21,7 +23,7 @@ On first run it creates a writable user config and the Go client wizard asks for
|
|
|
21
23
|
- a WebUI bootstrap token; or
|
|
22
24
|
- the enrollment password from the administrator.
|
|
23
25
|
|
|
24
|
-
The
|
|
26
|
+
The enrollment password is saved only until the first successful connection. It is then replaced by the dedicated node token. On Windows, choose `Manual custom ports` in the wizard to expose one or more custom TCP/UDP local ports.
|
|
25
27
|
|
|
26
28
|
Config path:
|
|
27
29
|
|
package/bin/1cattunnel.js
CHANGED
|
@@ -82,13 +82,16 @@ function ensureUserConfig() {
|
|
|
82
82
|
const dir = configRoot();
|
|
83
83
|
const target = path.join(dir, configName);
|
|
84
84
|
if (fs.existsSync(target)) {
|
|
85
|
+
if (!isWindows) {
|
|
86
|
+
fs.chmodSync(target, 0o600);
|
|
87
|
+
}
|
|
85
88
|
return target;
|
|
86
89
|
}
|
|
87
90
|
|
|
88
91
|
fs.mkdirSync(dir, { recursive: true });
|
|
89
92
|
const config = JSON.parse(fs.readFileSync(templatePath, 'utf8'));
|
|
90
93
|
config.node_name = safeNodeName();
|
|
91
|
-
fs.writeFileSync(target, `${JSON.stringify(config, null, 2)}\n
|
|
94
|
+
fs.writeFileSync(target, `${JSON.stringify(config, null, 2)}\n`, { mode: 0o600 });
|
|
92
95
|
console.log(`1cattunnel: created default config at ${target}`);
|
|
93
96
|
return target;
|
|
94
97
|
}
|
|
@@ -109,4 +112,4 @@ if (result.error) {
|
|
|
109
112
|
fail(result.error.message);
|
|
110
113
|
}
|
|
111
114
|
|
|
112
|
-
process.exit(typeof result.status === 'number' ? result.status : 1);
|
|
115
|
+
process.exit(typeof result.status === 'number' ? result.status : 1);
|
package/dist/client-linux.json
CHANGED
package/dist/client-windows.json
CHANGED
|
Binary file
|
|
Binary file
|