derptun 0.16.0 → 0.16.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
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
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
|
-
[`derptun`](#
|
|
5
|
+
[`derptun`](#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
6
|
|
|
7
7
|
[`derpssh`](#share-a-terminal) is its companion for interactive terminal sharing. Use it when two people need one shared PTY with host approval and no open ports.
|
|
8
8
|
|
|
@@ -33,11 +33,11 @@ Session tokens carry authorization. Public sessions fetch the DERP map at runtim
|
|
|
33
33
|
- Use `share` and `open` for temporary access to a local TCP service.
|
|
34
34
|
- Use `ssh invite` and `ssh accept` for SSH public key exchange.
|
|
35
35
|
- Use [`derpssh`](#share-a-terminal) for approved terminal sharing.
|
|
36
|
-
- Use [`derptun`](#
|
|
36
|
+
- Use [`derptun`](#tcp-tunnels) for long-lived TCP tunnels with reusable tokens.
|
|
37
37
|
|
|
38
38
|
## Quick Start
|
|
39
39
|
|
|
40
|
-
`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`](#
|
|
40
|
+
`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`](#tcp-tunnels) for reusable, longer-lived tunnels.
|
|
41
41
|
|
|
42
42
|
### Stream a Raw File
|
|
43
43
|
|
|
@@ -143,46 +143,51 @@ npx -y derpssh@latest connect <invite>
|
|
|
143
143
|
|
|
144
144
|
The host approves the guest as read-only or read/write. The session uses the derptun transport path, so neither side needs an inbound port.
|
|
145
145
|
|
|
146
|
-
###
|
|
146
|
+
### TCP Tunnels
|
|
147
147
|
|
|
148
|
-
`derptun`
|
|
148
|
+
`derptun` exposes a local TCP service without requiring either side to open an inbound port. Start with a one-off tunnel:
|
|
149
149
|
|
|
150
|
-
On
|
|
150
|
+
On the serving machine:
|
|
151
151
|
|
|
152
152
|
```bash
|
|
153
|
-
npx -y derptun@latest
|
|
154
|
-
|
|
155
|
-
|
|
153
|
+
npx -y derptun@latest serve --tcp 127.0.0.1:3000
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
`serve` prints the command for the other side:
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
npx -y derptun@latest open --token DT1...
|
|
156
160
|
```
|
|
157
161
|
|
|
158
|
-
|
|
162
|
+
Run that command on the connecting machine. It opens a local listener and forwards connections through the tunnel.
|
|
159
163
|
|
|
160
|
-
|
|
164
|
+
For a persistent tunnel, create both tokens on the serving machine and keep the server token there:
|
|
161
165
|
|
|
162
166
|
```bash
|
|
163
|
-
npx -y derptun@latest
|
|
164
|
-
|
|
167
|
+
npx -y derptun@latest token server > server.dts
|
|
168
|
+
npx -y derptun@latest token client --token-file server.dts > client.dt1
|
|
169
|
+
npx -y derptun@latest serve --token-file server.dts --tcp 127.0.0.1:3000
|
|
165
170
|
```
|
|
166
171
|
|
|
167
|
-
|
|
172
|
+
Copy only `client.dt1` to the connecting machine.
|
|
173
|
+
|
|
174
|
+
On the connecting machine:
|
|
168
175
|
|
|
169
176
|
```bash
|
|
170
|
-
|
|
177
|
+
npx -y derptun@latest open --token-file client.dt1 --listen 127.0.0.1:3001
|
|
171
178
|
```
|
|
172
179
|
|
|
173
|
-
The server token is serving authority. Keep it on the serving machine or in
|
|
180
|
+
The server token is serving authority. Keep it on the serving machine or in a secret manager. Client tokens can connect until expiry, but cannot serve or mint tokens.
|
|
174
181
|
|
|
175
182
|
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:
|
|
176
183
|
|
|
177
184
|
```bash
|
|
178
185
|
npx -y derptun@latest token server --expires 2026-05-01T00:00:00Z > server.dts
|
|
179
|
-
npx -y derptun@latest token client --token-file server.dts --expires 2026-04-25T00:00:00Z > client.
|
|
186
|
+
npx -y derptun@latest token client --token-file server.dts --expires 2026-04-25T00:00:00Z > client.dt1
|
|
180
187
|
```
|
|
181
188
|
|
|
182
189
|
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.
|
|
183
190
|
|
|
184
|
-
`derptun` is TCP-only for now. UDP forwarding is planned for use cases like Minecraft Bedrock servers.
|
|
185
|
-
|
|
186
191
|
### Useful Extras
|
|
187
192
|
|
|
188
193
|
Use the development channel for the latest commit from `main`:
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|