derptun 0.10.0 → 0.10.2

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
@@ -1,29 +1,28 @@
1
1
  # derphole
2
2
 
3
- `derphole` is a standalone CLI for session-scoped transfers and temporary local TCP service sharing.
3
+ `derphole` is a standalone CLI for session-scoped byte transfer and temporary local TCP service sharing. Use it for one-shot transfers, receive-code flows, and short-lived service sharing.
4
4
 
5
- It supports:
5
+ [`derptun`](#long-lived-tcp-tunnels) is its companion for long-lived TCP tunnels. Use it when a tunnel needs stable tokens, restartable endpoints, and repeated client reconnects.
6
+
7
+ `derphole` supports:
6
8
 
7
9
  - raw byte streams with `listen` and `pipe`
8
10
  - text, file, and directory transfer with `send` and `receive`
9
11
  - local TCP service sharing with `share` and `open`
10
12
  - SSH access exchange with `ssh invite` and `ssh accept`
11
- - durable TCP tunnels with the companion `derptun` package
12
-
13
- `derphole` uses the public Tailscale [DERP](#what-is-derp) relay network for rendezvous and relay fallback. It is **not** affiliated with Tailscale, does **not** require a Tailscale account or tailnet, and does **not** use `tailscaled` for transport.
14
13
 
15
- `derphole` is **not** a WireGuard overlay and **not** a VPN. Tailscale builds a general-purpose secure network on WireGuard. `derphole` is optimized for a different job: one session, one token, one transfer or one shared service, on the shortest secure path it can find for that session. See [Transport Model](#transport-model), [Why It Is Fast](#why-it-is-fast), and [Security Model](#security-model).
14
+ Both tools use the public Tailscale [DERP](#what-is-derp) relay network for rendezvous and fallback, then promote live traffic to direct encrypted UDP when possible. Payload bytes stay end-to-end encrypted on relay fallback, direct UDP, and authenticated QUIC stream paths; DERP sees routing metadata, not contents. They are **not** affiliated with Tailscale and do **not** use `tailscaled`.
16
15
 
17
- For one-shot transfers and temporary service sharing, `derphole` can beat sending the same traffic through a WireGuard-based overlay. It does not build a general-purpose encrypted network path first, then route application traffic through it. It uses DERP for rendezvous and fallback, then moves the live session onto the best direct path it can establish for that workload. Details are in [Transport Model](#transport-model) and [How This Differs From Tailscale / WireGuard](#how-this-differs-from-tailscale--wireguard).
16
+ Neither tool is a WireGuard overlay or VPN. `derphole` handles one token, one session, one transfer or shared service. `derptun` handles one long-lived tunnel. See [Transport Model](#transport-model), [Why It Is Fast](#why-it-is-fast), and [Security Model](#security-model).
18
17
 
19
- It does **not** require:
18
+ Neither tool requires:
20
19
 
21
20
  - a Tailscale account
22
21
  - a tailnet
23
22
  - `tailscaled`
24
23
  - a separate control plane to run yourself
25
24
 
26
- Session tokens carry authorization, and receive-code flows resolve into the same session model. Public sessions fetch the DERP map at runtime so both sides can find relay and bootstrap nodes. See [Security Model](#security-model) for what the token authorizes and what intermediaries can and cannot see.
25
+ Session tokens carry authorization. Public sessions fetch the DERP map at runtime so both sides can find relay and bootstrap nodes. See [Security Model](#security-model) for token and relay details.
27
26
 
28
27
  ## Pick the Workflow
29
28
 
@@ -31,23 +30,23 @@ Session tokens carry authorization, and receive-code flows resolve into the same
31
30
  - Use `send` and `receive` for text, files, directories, progress, and receive-code UX.
32
31
  - Use `share` and `open` for temporary access to a local TCP service.
33
32
  - Use `ssh invite` and `ssh accept` for SSH public key exchange.
34
- - Use `derptun` for durable TCP tunnels with reusable, longer-lived tokens.
33
+ - Use [`derptun`](#long-lived-tcp-tunnels) for long-lived TCP tunnels with reusable tokens.
35
34
 
36
35
  ## Quick Start
37
36
 
38
- `listen` receives bytes and prints a token. `pipe` sends stdin into that token. `share` and `open` use the same token shape for local TCP services. Use `derptun` when the service needs a reusable token and longer-lived tunnel.
37
+ `listen` receives bytes and prints a token. `pipe` sends stdin into that token. `share` and `open` do the same for local TCP services. Use [`derptun`](#long-lived-tcp-tunnels) for reusable, longer-lived tunnels.
39
38
 
40
39
  ### Stream a Raw File
41
40
 
42
- On the receiving machine:
41
+ Receiver:
43
42
 
44
43
  ```bash
45
44
  npx -y derphole@latest listen > received.img
46
45
  ```
47
46
 
48
- `listen` prints a token to stderr so stdout stays clean for received bytes. Copy that token to the sending machine.
47
+ `listen` prints a token to stderr, keeping stdout clean. Copy the token to the sender.
49
48
 
50
- On the sending machine:
49
+ Sender:
51
50
 
52
51
  ```bash
53
52
  cat ./disk.img | npx -y derphole@latest pipe <token>
@@ -61,19 +60,19 @@ printf 'hello\n' | npx -y derphole@latest pipe <token>
61
60
 
62
61
  ### Send with a Receive Code
63
62
 
64
- On the sending machine:
63
+ Sender:
65
64
 
66
65
  ```bash
67
66
  npx -y derphole@latest send ./photo.jpg
68
67
  ```
69
68
 
70
- `send` prints the command to run on the receiving machine:
69
+ `send` prints the receiver command:
71
70
 
72
71
  ```bash
73
72
  npx -y derphole@latest receive <code>
74
73
  ```
75
74
 
76
- For known-size file and directory transfers, `derphole` prints wormhole-shaped progress and rate output on stderr. Use `--hide-progress` for quiet output.
75
+ Known-size files and directories show progress on stderr. Use `--hide-progress` for quiet output.
77
76
 
78
77
  Text uses the same flow:
79
78
 
@@ -81,7 +80,7 @@ Text uses the same flow:
81
80
  npx -y derphole@latest send hello
82
81
  ```
83
82
 
84
- Directories stream as tar on the wire and re-materialize on the receiver:
83
+ Directories stream as tar and re-materialize on the receiver:
85
84
 
86
85
  ```bash
87
86
  npx -y derphole@latest send ./project-dir
@@ -89,54 +88,29 @@ npx -y derphole@latest send ./project-dir
89
88
 
90
89
  ### Exchange SSH Access
91
90
 
92
- The host receiving access runs:
91
+ Host granting access:
93
92
 
94
93
  ```bash
95
94
  npx -y derphole@latest ssh invite --user deploy
96
95
  ```
97
96
 
98
- The other side accepts with:
97
+ Client:
99
98
 
100
99
  ```bash
101
100
  npx -y derphole@latest ssh accept <token>
102
101
  ```
103
102
 
104
- ### Watch Progress with `pv`
105
-
106
- `derphole` is plain stdin/stdout, so `pv` fits naturally in the pipeline.
107
-
108
- Install `pv` if needed:
109
-
110
- ```bash
111
- brew install pv
112
- sudo apt install -y pv
113
- ```
114
-
115
- On the receiving machine:
116
-
117
- ```bash
118
- npx -y derphole@latest listen | pv -brt > received.img
119
- ```
120
-
121
- On the sending machine:
122
-
123
- ```bash
124
- cat ./disk.img | pv -brt | npx -y derphole@latest pipe <token>
125
- ```
126
-
127
- For a concrete Internet/NAT version of the same pattern, see [Real-World Example: Tar Pipe Over Internet](#real-world-example-tar-pipe-over-internet).
128
-
129
103
  ### Share a Local TCP Service
130
104
 
131
- On the machine running the local web app or API:
105
+ Service host:
132
106
 
133
107
  ```bash
134
108
  npx -y derphole@latest share 127.0.0.1:3000
135
109
  ```
136
110
 
137
- `share` prints a token to stderr. Copy that token to the machine that needs access.
111
+ `share` prints a token to stderr. Copy it to the client machine.
138
112
 
139
- On another machine, expose the shared service locally:
113
+ Client:
140
114
 
141
115
  ```bash
142
116
  npx -y derphole@latest open <token>
@@ -150,11 +124,11 @@ Bind `open` to a specific local port:
150
124
  npx -y derphole@latest open <token> 127.0.0.1:8080
151
125
  ```
152
126
 
153
- ### Durable SSH Tunnels with `derptun`
127
+ ### Long-Lived TCP Tunnels
154
128
 
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.
129
+ `derptun` is the long-lived TCP tunnel companion to `derphole`. It uses stable tokens, survives restarts on either side, and lets one client reconnect many times without opening ports on `vps-server`. It fits SSH well.
156
130
 
157
- On `serverhost`:
131
+ On `vps-server`:
158
132
 
159
133
  ```bash
160
134
  npx -y derptun@latest token server > server.dts
@@ -162,9 +136,9 @@ npx -y derptun@latest token client --token-file server.dts > client.dtc
162
136
  npx -y derptun@latest serve --token-file server.dts --tcp 127.0.0.1:22
163
137
  ```
164
138
 
165
- Copy only `client.dtc` to `clienthost`.
139
+ Copy only `client.dtc` to `alice-laptop`.
166
140
 
167
- On `clienthost`:
141
+ On `alice-laptop`:
168
142
 
169
143
  ```bash
170
144
  npx -y derptun@latest open --token-file client.dtc --listen 127.0.0.1:2222
@@ -173,14 +147,11 @@ ssh -p 2222 user@127.0.0.1
173
147
 
174
148
  For SSH without a separate local listener, use `ProxyCommand`:
175
149
 
176
- ```sshconfig
177
- Host serverhost-derptun
178
- HostName serverhost
179
- User foo
180
- ProxyCommand derptun connect --token-file ~/.config/derptun/client.dtc --stdio
150
+ ```bash
151
+ ssh -o ProxyCommand='npx -y derptun@latest connect --token-file ./client.dtc --stdio' foo@127.0.0.1
181
152
  ```
182
153
 
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.
154
+ The server token is serving authority. Keep it on the serving machine or in its secret manager. The client token can connect until expiry, but cannot serve or mint tokens.
184
155
 
185
156
  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:
186
157
 
@@ -189,9 +160,9 @@ npx -y derptun@latest token server --expires 2026-05-01T00:00:00Z > server.dts
189
160
  npx -y derptun@latest token client --token-file server.dts --expires 2026-04-25T00:00:00Z > client.dtc
190
161
  ```
191
162
 
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.
163
+ Use `--token TOKEN` for inline one-off commands. Prefer `--token-file PATH` for durable tokens. `--token-stdin` reads the token from the first stdin line.
193
164
 
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.
165
+ `derptun` is TCP-only for now. UDP forwarding is planned for use cases like Minecraft Bedrock servers.
195
166
 
196
167
  ### Useful Extras
197
168
 
@@ -202,7 +173,7 @@ npx -y derphole@dev version
202
173
  npx -y derptun@dev version
203
174
  ```
204
175
 
205
- By default, `listen`, `pipe`, `send`, `receive`, `share`, and `open` keep transport status quiet. `listen` and `share` print tokens, `open` prints the local listening address, and `send` / `receive` print the receiver command or code needed to complete the transfer. Known-size transfers show wormhole-shaped progress on stderr. Use `--hide-progress` to suppress the progress bar. Use `--verbose` to see state transitions like `connected-relay` and `connected-direct`:
176
+ Default output stays quiet: tokens, bind addresses, receive commands, and progress only. Use `--hide-progress` to suppress progress, or `--verbose` to see transitions like `connected-relay` and `connected-direct`:
206
177
 
207
178
  ```bash
208
179
  npx -y derphole@latest --verbose listen
@@ -210,91 +181,84 @@ npx -y derphole@latest --verbose pipe <token>
210
181
  npx -y derphole@latest --verbose send ./photo.jpg
211
182
  ```
212
183
 
213
- For transport details, see [Transport Model](#transport-model), [Behavior](#behavior), or [Security Model](#security-model).
184
+ For transport details, see [Transport Model](#transport-model), [Behavior](#behavior), and [Security Model](#security-model).
214
185
 
215
186
  ## Transport Model
216
187
 
217
- High-level flow:
188
+ Flow:
218
189
 
219
- 1. `listen`, `share`, or `receive` creates an ephemeral session and prints an opaque bearer token or receive code.
220
- 2. The token carries the session ID, expiry, DERP bootstrap hints, the listener's public peer identity, bearer secret, and allowed capability.
190
+ 1. `listen`, `share`, or `receive` creates a session and prints an opaque bearer token or receive code.
191
+ 2. The token carries session ID, expiry, DERP bootstrap hints, listener public identity, bearer secret, and allowed capability.
221
192
  3. `pipe`, `send`, or `open` uses that token to contact the listener through DERP and claim the session.
222
193
  4. The listener validates the claim, checks the requested capability, and returns current direct-path candidates.
223
- 5. Both sides start on the first working path, including DERP relay if direct connectivity is not ready yet.
224
- 6. Both sides keep probing for a better direct path. If a direct path succeeds, the live session upgrades in place without restarting the transfer.
194
+ 5. Both sides start on the first working path, including DERP relay if needed.
195
+ 6. Both sides keep probing for a better direct path. Successful direct paths upgrade the live session in place.
225
196
 
226
197
  ### Data Plane Selection
227
198
 
228
- DERP provides **rendezvous** and **relay fallback**. If the term is new, see [What Is DERP?](#what-is-derp):
199
+ DERP provides **rendezvous** and **relay fallback**. See [What Is DERP?](#what-is-derp):
229
200
 
230
- - rendezvous: exchange initial claim, decision, and direct-path coordination messages without an account-backed control plane
231
- - relay fallback: keep the session working when NAT traversal fails or direct connectivity is not ready yet
201
+ - rendezvous: exchange claim, decision, and direct-path coordination messages without an account-backed control plane
202
+ - relay fallback: keep the session working when NAT traversal fails or direct connectivity is not ready
232
203
 
233
204
  The data plane is selected per session:
234
205
 
235
- - `share/open` uses multiplexed QUIC streams over `derphole`'s relay/direct UDP transport, so one claimed session can carry many independent TCP connections to the shared service.
236
- - `derptun` uses a stable tunnel token and the same relay/direct UDP transport to carry reconnectable TCP streams. It is built for longer-lived access, such as SSH to a host behind NAT.
237
- - `listen/pipe` uses a one-shot byte stream. By default, `derphole` coordinates through DERP, promotes to rate-adaptive direct UDP when traversal succeeds, and stays on encrypted relay fallback when no direct path is available.
206
+ - `share/open` uses multiplexed QUIC streams over `derphole`'s relay/direct UDP transport. One claimed session can carry many TCP connections to the shared service.
207
+ - `derptun` uses a stable tunnel token and the same transport for reconnectable TCP streams. It is built for longer-lived access, such as SSH to a host behind NAT.
208
+ - `listen/pipe` uses a one-shot byte stream. It coordinates through DERP, promotes to rate-adaptive direct UDP when traversal succeeds, and stays on encrypted relay fallback when direct paths fail.
238
209
  - `send/receive` wraps the same one-shot stream with text, file, directory, and progress metadata.
239
210
 
240
211
  Candidate discovery splits into two phases:
241
212
 
242
- - fast local candidates first: advertise local socket/interface candidates and any cached port mapping immediately
243
- - background traversal discovery: run STUN and UPnP / NAT-PMP / PCP refresh, then send updated candidates and `call-me-maybe` probes when a new direct endpoint appears
213
+ - fast local candidates first: advertise local sockets, interfaces, and cached port mappings immediately
214
+ - background traversal discovery: run STUN and UPnP / NAT-PMP / PCP refresh, then send updated candidates and `call-me-maybe` probes
244
215
 
245
- This keeps startup latency low while still allowing relay-to-direct promotion.
216
+ This keeps startup latency low while preserving relay-to-direct promotion.
246
217
 
247
218
  ## How This Differs From Tailscale / WireGuard
248
219
 
249
- Tailscale uses WireGuard to build a secure general-purpose network between peers. That is the right abstraction for durable machine-to-machine connectivity, stable private addressing, ACLs, subnet routing, exit nodes, and a long-lived encrypted overlay.
220
+ Tailscale uses WireGuard for a secure general-purpose network: durable machine connectivity, private addresses, ACLs, subnet routing, exit nodes, and long-lived overlays.
250
221
 
251
- `derphole` does something narrower. It creates session-scoped transport for a single transfer or one shared service:
222
+ `derphole` is narrower. It creates session-scoped transport for one transfer or one shared service:
252
223
 
253
224
  - no WireGuard tunnel device
254
225
  - no overlay network interface
255
226
  - no persistent mesh control plane
256
227
  - no need to route arbitrary traffic through a general encrypted network
257
228
 
258
- Instead, `derphole` uses a bearer token to authorize one session, uses DERP to get both peers talking immediately, and promotes the session onto the best direct path it can establish for that workload. Supporting details are in [Transport Model](#transport-model) and [Security Model](#security-model).
229
+ Instead, `derphole` authorizes one session with a bearer token, uses DERP to connect peers immediately, then promotes onto the best direct path it can establish. See [Transport Model](#transport-model) and [Security Model](#security-model).
259
230
 
260
- For `listen/pipe`, `send/receive`, and `share/open`, this can beat routing the same traffic through a WireGuard-based overlay because `derphole` is purpose-built for the active session, not for a general secure network abstraction. See [Why It Is Fast](#why-it-is-fast) for concrete transport reasons.
231
+ For `listen/pipe`, `send/receive`, and `share/open`, this can beat routing the same traffic through a WireGuard-based overlay because `derphole` optimizes one active session. See [Why It Is Fast](#why-it-is-fast).
261
232
 
262
233
  ## Why It Is Fast
263
234
 
264
- `derphole` gets performance from its transport design:
235
+ Performance comes from transport shape:
265
236
 
266
- - DERP is for rendezvous and relay fallback, not the preferred steady-state data plane.
267
- - Sessions can start relayed immediately, then promote in place to direct without restarting the transfer.
268
- - `listen/pipe` and `send/receive` can scale from one to multiple direct UDP lanes, run a short path-rate probe, then use paced sending, adaptive rate control, and targeted replay/repair. Fast links can run near their WAN ceiling without forcing slower links into the same send rate.
269
- - Direct UDP payload packets are AEAD-protected with a per-session key derived from the bearer secret. The packet header stays visible for sequencing and repair, while user bytes stay encrypted and authenticated.
237
+ - DERP handles rendezvous and fallback, not preferred steady-state data.
238
+ - Sessions can start relayed, then promote in place to direct without restarting.
239
+ - `listen/pipe` and `send/receive` can scale across direct UDP lanes, run path-rate probes, then use paced sending, adaptive rate control, and targeted replay/repair. Fast links can run near WAN ceiling without forcing slower links into the same send rate.
240
+ - Direct UDP payloads use AEAD with a per-session key derived from the bearer secret. Headers stay visible for sequencing and repair; user bytes stay encrypted and authenticated.
270
241
  - `share/open` keeps QUIC stream multiplexing for service sharing, where many independent TCP streams need one claimed session.
271
- - Candidate discovery is front-loaded with local interface candidates and cached mappings, then refined in the background with STUN and port mapping refresh. That keeps the first byte moving quickly instead of stalling the session until every traversal probe finishes.
242
+ - Candidate discovery starts with local interfaces and cached mappings, then refines in the background with STUN and port mapping refresh.
272
243
 
273
- In practice: move bytes early, keep them moving through relay if needed, then shift the live session onto a faster direct path as soon as direct connectivity is ready.
244
+ Result: move bytes early, keep relay fallback, and shift live sessions to direct paths when ready.
274
245
 
275
246
  ## Security Model
276
247
 
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.
248
+ Tokens are **bearer capabilities**. Anyone with a token can claim the matching session or tunnel until expiry, 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.
278
249
 
279
- DERP relays do **not** get the secret material needed to read or impersonate the session:
250
+ Payload bytes are always end-to-end encrypted between token holders. Session and tunnel encryption is pinned to token-derived identity, so DERP relays do **not** get keys needed to read or impersonate sessions. DERP can see routing metadata and packet timing, but not plaintext user payload bytes:
280
251
 
281
- - On the default `listen/pipe` and `send/receive` direct UDP path, payload packets are encrypted and authenticated with session AEAD derived from the token bearer secret.
252
+ - On `listen/pipe` and `send/receive`, direct UDP and relay fallback both encrypt and authenticate user payloads with session AEAD derived from the bearer secret.
253
+ - Relay-prefix startup frames leave frame kind and byte offsets visible for flow control, but encrypt user payload bytes.
282
254
  - On `share/open`, stream traffic uses authenticated QUIC streams for the claimed session.
283
255
  - On `derptun`, stream traffic uses authenticated QUIC streams pinned to the stable tunnel identity in the token.
284
- - If packets are relayed through DERP, DERP only forwards encrypted session bytes.
285
-
286
- Important security property: `derphole` does not trade speed for plaintext shortcuts:
287
-
288
- - the token authorizes the session, but does not turn DERP into a trusted decrypting proxy
289
- - direct UDP data packets are encrypted and authenticated per session
290
- - QUIC stream-mode peers are pinned to the expected public identity from the token
291
- - DERP forwards encrypted traffic but does not have the keys required to decrypt or impersonate the session
292
256
 
293
- Simple rule: token possession authorizes the session, but intermediaries that only see DERP traffic do not have the keys needed to decrypt it.
257
+ Simple rule: token possession authorizes the session. Relays move packets; they do not hold decrypt keys for user payloads.
294
258
 
295
259
  ## Behavior
296
260
 
297
- Sessions can start on DERP relay and later promote to a direct path without restarting. By default, the CLI keeps transport status quiet and prints only the user-facing token, bind address, or transfer UI needed to use the session. Use `--verbose` to inspect path changes, NAT traversal state, and direct-path tuning.
261
+ Sessions can start on DERP relay and later promote to direct paths without restarting. By default, CLI output stays minimal. Use `--verbose` for path changes, NAT traversal state, and direct-path tuning.
298
262
 
299
263
  ## Use Cases
300
264
 
@@ -303,30 +267,6 @@ Sessions can start on DERP relay and later promote to a direct path without rest
303
267
  - quick sharing of local web apps, APIs, and admin interfaces
304
268
  - `npx` use without manual install
305
269
 
306
- ## Real-World Example: Tar Pipe Over Internet
307
-
308
- Classic tar pipe is fast because it streams bytes from `tar` on one host into `tar` on another host. Good reference: [Using netcat and tar to quickly transfer files between machines, aka tar pipe](https://toast.djw.org.uk/tarpipe.html).
309
-
310
- Problem: classic `tar | nc` assumes the receiver can expose a listening port and the sender can reach it. That breaks down when both hosts are on the public Internet, both sit behind NAT, and neither side should expose an inbound port.
311
-
312
- `derphole` keeps the same streaming shape, but removes the open-port requirement.
313
-
314
- Receiver:
315
-
316
- ```bash
317
- npx -y derphole@latest listen | tar -xpf - -C /restore/path
318
- ```
319
-
320
- `listen` prints a token on stderr. Copy that token to the sender over a channel you trust.
321
-
322
- Sender:
323
-
324
- ```bash
325
- tar -cpf - /srv/data | npx -y derphole@latest pipe <token>
326
- ```
327
-
328
- This is still tar pipe. Difference: no public listener to expose, no SSH daemon required for the data path, no VPN to join, and no permanent mesh to set up. `derphole` starts with DERP if needed, then promotes the live transfer onto direct UDP when a faster direct path becomes available.
329
-
330
270
  ## Development
331
271
 
332
272
  ```bash
@@ -360,17 +300,16 @@ REMOTE_HOST=my-server.example.com mise run promotion-1g
360
300
  - npm packages: `derphole`, `derptun`
361
301
  - production channels: `derphole@latest`, `derptun@latest`
362
302
  - development channels: `derphole@dev`, `derptun@dev`
363
- - bootstrap runbook: [docs/releases/npm-bootstrap.md](docs/releases/npm-bootstrap.md)
364
303
 
365
304
  ## What Is DERP?
366
305
 
367
- DERP stands for **Designated Encrypted Relay for Packets**. In plain terms, it is a globally reachable relay network that both peers can talk to even when they cannot yet talk directly to each other.
306
+ DERP stands for **Designated Encrypted Relay for Packets**. It is a globally reachable relay network that both peers can use when they cannot yet talk directly.
368
307
 
369
- DERP was built by Tailscale for the Tailscale networking stack, and the public Tailscale-operated DERP network is reachable without running your own relays. The same DERP model is also used by Headscale, the open-source Tailscale control server implementation, which can serve its own DERP map and DERP servers.
308
+ DERP was built by Tailscale for the Tailscale networking stack. The public Tailscale-operated DERP network is reachable without running your own relays. Headscale, the open-source Tailscale control server, can also serve DERP maps and DERP servers.
370
309
 
371
310
  In `derphole`, DERP has two jobs:
372
311
 
373
- - rendezvous: carry the initial claim, decision, and direct-path coordination messages so the two peers can find each other without a separate account-backed control plane
374
- - fallback relay: carry encrypted session traffic when NAT traversal has not succeeded yet or when direct connectivity is unavailable
312
+ - rendezvous: carry claim, decision, and direct-path coordination messages without a separate account-backed control plane
313
+ - fallback relay: carry encrypted session traffic when NAT traversal has not succeeded or direct connectivity is unavailable
375
314
 
376
- DERP is not the preferred steady-state path. It is the safety net that gets the session started and keeps it working. If a direct UDP path becomes available, `derphole` promotes the live session onto that direct path. DERP only forwards bytes; it does not get the session keys needed to decrypt the traffic.
315
+ DERP is not the preferred steady-state path. It starts the session and keeps it working. If direct UDP becomes available, `derphole` promotes the live session. DERP forwards bytes; it does not get session decrypt keys.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "derptun",
3
- "version": "0.10.0",
3
+ "version": "0.10.2",
4
4
  "license": "BSD-3-Clause",
5
5
  "bin": {
6
6
  "derptun": "bin/derptun.js"