From 3ac2d42b1bcd2cbf35cfd7ecc03a1a7655cc3202 Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Fri, 19 Dec 2025 00:46:14 +0100 Subject: [PATCH] docs(changelog): improve p2p tunnel section clarity reframe to lead with user benefit and add example output --- docs/changelogs/v0.40.md | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/docs/changelogs/v0.40.md b/docs/changelogs/v0.40.md index 7f39c9798..46dc6fb77 100644 --- a/docs/changelogs/v0.40.md +++ b/docs/changelogs/v0.40.md @@ -12,7 +12,7 @@ This release was brought to you by the [Shipyard](https://ipshipyard.com/) team. - [๐Ÿ”ฆ Highlights](#-highlights) - [Routing V1 HTTP API now exposed by default](#routing-v1-http-api-now-exposed-by-default) - [Track total size when adding pins](#track-total-size-when-adding-pins) - - [`ipfs p2p` ssh-like tunnel foreground mode](#ipfs-p2p-ssh-like-tunnel-foreground-mode) + - [๐Ÿš‡ Improved `ipfs p2p` tunnels with foreground mode](#-improved-ipfs-p2p-tunnels-with-foreground-mode) - [๐Ÿ“ฆ๏ธ Dependency updates](#-dependency-updates) - [๐Ÿ“ Changelog](#-changelog) - [๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ Contributors](#-contributors) @@ -34,13 +34,22 @@ Example output: Fetched/Processed 336 nodes (83 MB) ``` -#### `ipfs p2p` ssh-like tunnel foreground mode +#### ๐Ÿš‡ Improved `ipfs p2p` tunnels with foreground mode -The `ipfs p2p listen` and `ipfs p2p forward` commands now support a `--foreground` (`-f`) flag that keeps the command running until interrupted. When the command exits (via Ctrl+C, SIGTERM, or daemon shutdown), the listener/forwarder is automatically removed. +P2P tunnels can now run like SSH port forwarding: start a tunnel, use it, and it cleans up automatically when you're done. -Without `--foreground`, the commands return immediately and the listener persists in the daemon (existing behavior). +The new `--foreground` (`-f`) flag for `ipfs p2p listen` and `ipfs p2p forward` keeps the command running until interrupted. When you Ctrl+C, send SIGTERM, or stop the service, the tunnel is removed automatically: -Run `ipfs p2p listen --help` or `ipfs p2p forward --help` for usage, or see [docs/p2p-tunnels.md](https://github.com/ipfs/kubo/blob/master/docs/p2p-tunnels.md) for examples. +```console +$ ipfs p2p listen /x/ssh /ip4/127.0.0.1/tcp/22 --foreground +Listening on /x/ssh, forwarding to /ip4/127.0.0.1/tcp/22, waiting for interrupt... +^C +Received interrupt, removing listener for /x/ssh +``` + +Without `--foreground`, commands return immediately and tunnels persist until explicitly closed (existing behavior). + +See [docs/p2p-tunnels.md](https://github.com/ipfs/kubo/blob/master/docs/p2p-tunnels.md) for usage examples. #### ๐Ÿ“ฆ๏ธ Dependency updates