derptun 0.10.1 → 0.10.3
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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
|
|
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`
|
|
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
|
-
|
|
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
|
|
47
|
+
`listen` prints a token to stderr, keeping stdout clean. Copy the token to the sender.
|
|
49
48
|
|
|
50
|
-
|
|
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
|
-
|
|
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
|
|
69
|
+
`send` prints the receiver command:
|
|
71
70
|
|
|
72
71
|
```bash
|
|
73
72
|
npx -y derphole@latest receive <code>
|
|
74
73
|
```
|
|
75
74
|
|
|
76
|
-
|
|
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
|
|
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
|
-
|
|
91
|
+
Host granting access:
|
|
93
92
|
|
|
94
93
|
```bash
|
|
95
94
|
npx -y derphole@latest ssh invite --user deploy
|
|
96
95
|
```
|
|
97
96
|
|
|
98
|
-
|
|
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
|
-
|
|
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
|
|
111
|
+
`share` prints a token to stderr. Copy it to the client machine.
|
|
138
112
|
|
|
139
|
-
|
|
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
|
-
###
|
|
127
|
+
### Long-Lived TCP Tunnels
|
|
154
128
|
|
|
155
|
-
`derptun` is the
|
|
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 `
|
|
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 `
|
|
139
|
+
Copy only `client.dtc` to `alice-laptop`.
|
|
166
140
|
|
|
167
|
-
On `
|
|
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
|
-
```
|
|
177
|
-
|
|
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
|
|
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`
|
|
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
|
-
|
|
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
|
-
|
|
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),
|
|
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
|
-
|
|
188
|
+
Flow:
|
|
218
189
|
|
|
219
|
-
1. `listen`, `share`, or `receive` creates
|
|
220
|
-
2. The token carries
|
|
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
|
|
224
|
-
6. Both sides keep probing for a better direct path.
|
|
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**.
|
|
199
|
+
DERP provides **rendezvous** and **relay fallback**. See [What Is DERP?](#what-is-derp):
|
|
229
200
|
|
|
230
|
-
- rendezvous: exchange
|
|
231
|
-
- relay fallback: keep the session working when NAT traversal fails or direct connectivity is not ready
|
|
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
|
|
236
|
-
- `derptun` uses a stable tunnel token and the same
|
|
237
|
-
- `listen/pipe` uses a one-shot byte stream.
|
|
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
|
|
243
|
-
- background traversal discovery: run STUN and UPnP / NAT-PMP / PCP refresh, then send updated candidates and `call-me-maybe` probes
|
|
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
|
|
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
|
|
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`
|
|
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`
|
|
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`
|
|
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
|
-
|
|
235
|
+
Performance comes from transport shape:
|
|
265
236
|
|
|
266
|
-
- DERP
|
|
267
|
-
- Sessions can start relayed
|
|
268
|
-
- `listen/pipe` and `send/receive` can scale
|
|
269
|
-
- Direct UDP
|
|
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
|
|
242
|
+
- Candidate discovery starts with local interfaces and cached mappings, then refines in the background with STUN and port mapping refresh.
|
|
272
243
|
|
|
273
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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**.
|
|
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
|
|
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
|
|
374
|
-
- fallback relay: carry encrypted session traffic when NAT traversal has not succeeded
|
|
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
|
|
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
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|