derptun 0.8.1 → 0.10.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
|
@@ -152,39 +152,45 @@ npx -y derphole@latest open <token> 127.0.0.1:8080
|
|
|
152
152
|
|
|
153
153
|
### Durable SSH Tunnels with `derptun`
|
|
154
154
|
|
|
155
|
-
`derptun` is the durable TCP tunnel companion to `derphole`. Use it when
|
|
155
|
+
`derptun` is the durable TCP tunnel companion to `derphole`. Use it when `serverhost` is behind NAT and you want a stable server credential that can survive process restarts.
|
|
156
156
|
|
|
157
|
-
On
|
|
157
|
+
On `serverhost`:
|
|
158
158
|
|
|
159
159
|
```bash
|
|
160
|
-
npx -y derptun@latest token
|
|
161
|
-
npx -y derptun@latest
|
|
160
|
+
npx -y derptun@latest token server > server.dts
|
|
161
|
+
npx -y derptun@latest token client --token-file server.dts > client.dtc
|
|
162
|
+
npx -y derptun@latest serve --token-file server.dts --tcp 127.0.0.1:22
|
|
162
163
|
```
|
|
163
164
|
|
|
164
|
-
|
|
165
|
+
Copy only `client.dtc` to `clienthost`.
|
|
166
|
+
|
|
167
|
+
On `clienthost`:
|
|
165
168
|
|
|
166
169
|
```bash
|
|
167
|
-
npx -y derptun@latest open --token
|
|
168
|
-
ssh -p 2222
|
|
170
|
+
npx -y derptun@latest open --token-file client.dtc --listen 127.0.0.1:2222
|
|
171
|
+
ssh -p 2222 user@127.0.0.1
|
|
169
172
|
```
|
|
170
173
|
|
|
171
174
|
For SSH without a separate local listener, use `ProxyCommand`:
|
|
172
175
|
|
|
173
176
|
```sshconfig
|
|
174
|
-
Host
|
|
175
|
-
HostName
|
|
177
|
+
Host serverhost-derptun
|
|
178
|
+
HostName serverhost
|
|
176
179
|
User foo
|
|
177
|
-
ProxyCommand derptun connect --token ~/.config/derptun/
|
|
180
|
+
ProxyCommand derptun connect --token-file ~/.config/derptun/client.dtc --stdio
|
|
178
181
|
```
|
|
179
182
|
|
|
180
|
-
|
|
183
|
+
The server token is secret serving authority. Keep it on the serving machine or in its secret manager. The client token can connect until it expires, but it cannot serve or mint more tokens.
|
|
181
184
|
|
|
182
|
-
|
|
185
|
+
Server tokens default to 180 days. Client tokens default to 90 days and cannot outlive their server token. Set a relative lifetime with `--days`, or use an absolute expiry:
|
|
183
186
|
|
|
184
187
|
```bash
|
|
185
|
-
npx -y derptun@latest token --expires 2026-05-01T00:00:00Z
|
|
188
|
+
npx -y derptun@latest token server --expires 2026-05-01T00:00:00Z > server.dts
|
|
189
|
+
npx -y derptun@latest token client --token-file server.dts --expires 2026-04-25T00:00:00Z > client.dtc
|
|
186
190
|
```
|
|
187
191
|
|
|
192
|
+
`--token TOKEN` still works for quick one-off commands. Prefer `--token-file PATH` for durable tokens. `--token-stdin` reads the token from the first stdin line when a pipe is more convenient.
|
|
193
|
+
|
|
188
194
|
The first `derptun` release is TCP-only. UDP forwarding is planned for use cases like Minecraft Bedrock servers, but it is not part of this release.
|
|
189
195
|
|
|
190
196
|
### Useful Extras
|
|
@@ -268,7 +274,7 @@ In practice: move bytes early, keep them moving through relay if needed, then sh
|
|
|
268
274
|
|
|
269
275
|
## Security Model
|
|
270
276
|
|
|
271
|
-
Tokens are **bearer capabilities**. Anyone with a token can claim the matching session or tunnel until it expires, so share tokens over a trusted channel. `derphole` session tokens expire after one hour. `derptun` tokens default to
|
|
277
|
+
Tokens are **bearer capabilities**. Anyone with a token can claim the matching session or tunnel until it expires, so share tokens over a trusted channel. `derphole` session tokens expire after one hour. `derptun` server tokens default to 180 days and can mint shorter-lived client tokens; client tokens default to 90 days and cannot serve.
|
|
272
278
|
|
|
273
279
|
DERP relays do **not** get the secret material needed to read or impersonate the session:
|
|
274
280
|
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|