Skip to content

Commit af87621

Browse files
committed
release: v0.3.1
1 parent 566e4cc commit af87621

22 files changed

Lines changed: 1566 additions & 124 deletions

CHANGELOG.en.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@
22

33
All notable changes to `ii` are documented here. The default Chinese version is [CHANGELOG.md](CHANGELOG.md).
44

5+
## 0.3.1 - 2026-08-05
6+
7+
### Added
8+
9+
- Added `ii send --r2` with separate Cloudflare R2 profiles, and `ii send --azure` for Azure Block Blob with Shared Key or Container SAS authentication.
10+
11+
### Changed
12+
13+
- `ii send --s3` now means generic S3-compatible object storage only, and first-run setup collects endpoint, region, bucket, credentials, and path-style mode.
14+
- Legacy `provider = "cloudflare-r2"` entries under `[storage.s3.<name>]` are no longer migrated; move them to `[storage.r2.<name>]` and use `--r2`. Existing signed object URL tickets remain receivable.
15+
516
## 0.3.0 - 2026-08-05
617

718
### Added

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@
22

33
本文件记录 `ii` 的重要变更。默认中文版本在这里,英文版本见 [CHANGELOG.en.md](CHANGELOG.en.md)
44

5+
## 0.3.1 - 2026-08-05
6+
7+
### 新增
8+
9+
- `ii send --r2` 使用独立的 Cloudflare R2 profile;`ii send --azure` 支持 Azure Block Blob 的 Shared Key 或 Container SAS。
10+
11+
### 变更
12+
13+
- `ii send --s3` 现在只表示通用 S3 兼容对象存储,首次配置 endpoint、region、bucket、凭据和 path-style。
14+
-`[storage.s3.<name>]``provider = "cloudflare-r2"` 不再迁移;改写为 `[storage.r2.<name>]` 并使用 `--r2`。已生成的签名对象 URL ticket 仍可接收。
15+
516
## 0.3.0 - 2026-08-05
617

718
### 新增

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ exclude = ["vendor/iroh", "vendor/suppaftp"]
44
resolver = "3"
55

66
[workspace.package]
7-
version = "0.3.0"
7+
version = "0.3.1"
88
edition = "2024"
99
rust-version = "1.91"
1010
license = "MIT"

README.en.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
<a href="README.md">简体中文</a> · <strong>English</strong>
2020
</p>
2121

22-
`ii` is a CLI for temporary file transfer: it connects peer-to-peer by default, discovers services on the LAN, and falls back to relays when direct connectivity is unavailable.
22+
`ii` is a CLI for temporary file transfer: it connects peer-to-peer by default, discovers services on the LAN, and automatically falls back to Iroh's default n0 relay when direct connectivity is unavailable.
2323

2424
- Send files, folders, multiple paths, or piped data. Receives resume, skip matching MD5 files, and overwrite conflicts.
25-
- Use S3/R2, WebDAV, FTP, or SFTP as optional backends, with cleanup after receiving.
25+
- Use generic S3, Cloudflare R2, Azure Blob, WebDAV, FTP, or SFTP as optional backends, with cleanup after receiving.
2626
- It also provides LAN web sharing, WebDAV, browser transfer, TCP tunnels, and self-hosted relays.
2727

2828
## Quick Start
@@ -110,12 +110,14 @@ Plain `ii send` exits after its first successful transfer. `-t` serves up to 16
110110

111111
| Backend | Send command | Notes |
112112
| --- | --- | --- |
113-
| S3 / R2 | `ii send .\video.mp4 --s3` | Prompts for configuration on first use |
113+
| Generic S3 | `ii send .\video.mp4 --s3` | Configure a compatible endpoint, region, bucket, and path-style mode |
114+
| Cloudflare R2 | `ii send .\video.mp4 --r2` | Separate R2 configuration with the fixed R2 endpoint |
115+
| Azure Blob | `ii send .\video.mp4 --azure` | Shared Key or Container SAS |
114116
| WebDAV | `ii send .\video.mp4 --webdav` | Supports portable tickets |
115117
| FTP | `ii send .\video.mp4 --ftp` | Plaintext `ftp://` only |
116118
| SFTP | `ii send .\video.mp4 --sftp` | Password and private-key authentication |
117119

118-
`--profile <name>` selects a backend configuration. `-p` writes WebDAV, FTP, or SFTP credentials into the ticket; tickets are not encrypted, so share them only with trusted receivers. `-d` attempts to delete the backend object after a successful receive. See [ii.md](ii.md), [ftp.md](ftp.md), and [sftp.md](sftp.md) for configuration and protocol limits.
120+
`--profile <name>` selects a backend configuration. S3, R2, and Azure tickets contain only signed object URLs, so receivers need no local profile. `-p` writes WebDAV, FTP, or SFTP credentials into the ticket; tickets are not encrypted, so share them only with trusted receivers. `-d` attempts to delete the backend object after a successful receive. Mounted SMB/NFS directories remain usable as local send paths; native SMB/NFS backends are not provided. See [ii.md](ii.md), [ftp.md](ftp.md), and [sftp.md](sftp.md) for configuration and protocol limits.
119121

120122
## Receive
121123

@@ -206,7 +208,7 @@ Without `--port`, the relay chooses a free port. The terminal prints usable IPv4
206208

207209
## Desktop GUI
208210

209-
Releases also include `ii-gui`. It supports the default automatic path, local-only transfers, a chosen HTTPS relay, S3, and WebDAV. FTP and SFTP are CLI-only.
211+
Releases also include `ii-gui`. It supports the default automatic path, local-only transfers, a chosen HTTPS relay, S3, and WebDAV. R2, Azure, FTP, and SFTP are CLI-only.
210212

211213
## Diagnostics
212214

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
<strong>简体中文</strong> · <a href="README.en.md">English</a>
2020
</p>
2121

22-
`ii` 是临时文件传输命令行工具:默认 P2P 直连,局域网可发现,无法直连时自动使用 relay。
22+
`ii` 是临时文件传输命令行工具:默认 P2P 直连,局域网可发现;无法直连时自动降级到 Iroh 默认的 n0 relay。
2323

2424
- 发送文件、目录、多文件和管道数据;接收支持断点续传、同 MD5 跳过和冲突覆盖。
25-
- 可选 S3/R2、WebDAV、FTP、SFTP 中转;传完可删除中转对象。
25+
- 可选通用 S3、Cloudflare R2、Azure Blob、WebDAV、FTP、SFTP 中转;传完可删除中转对象。
2626
- 另有局域网网页、WebDAV、浏览器直传、TCP 隧道和自建 relay。
2727

2828
## 快速开始
@@ -110,12 +110,14 @@ ii send .\video.mp4 --json
110110

111111
| 后端 | 发送命令 | 说明 |
112112
| --- | --- | --- |
113-
| S3 / R2 | `ii send .\video.mp4 --s3` | 首次使用按提示配置 |
113+
| 通用 S3 | `ii send .\video.mp4 --s3` | 配置兼容 endpoint、region、bucket 和 path-style |
114+
| Cloudflare R2 | `ii send .\video.mp4 --r2` | 独立 R2 配置,固定 R2 endpoint |
115+
| Azure Blob | `ii send .\video.mp4 --azure` | Shared Key 或 Container SAS |
114116
| WebDAV | `ii send .\video.mp4 --webdav` | 支持便携 ticket |
115117
| FTP | `ii send .\video.mp4 --ftp` | 仅明文 `ftp://` |
116118
| SFTP | `ii send .\video.mp4 --sftp` | 支持密码和私钥 |
117119

118-
`--profile <name>` 选择后端配置;`-p` 将 WebDAV、FTP 或 SFTP 凭据写入 ticket,ticket 未加密,只能交给可信接收方;`-d` 在接收成功后尝试删除中转对象。配置和协议限制见 [ii.md](ii.md)[ftp.md](ftp.md)[sftp.md](sftp.md)
120+
`--profile <name>` 选择后端配置;S3、R2 和 Azure ticket 只包含对象 URL,接收端无需本机配置。`-p` 将 WebDAV、FTP 或 SFTP 凭据写入 ticket,ticket 未加密,只能交给可信接收方;`-d` 在接收成功后尝试删除中转对象。SMB/NFS 已挂载目录可直接作为本地发送路径,不提供原生中转。配置和协议限制见 [ii.md](ii.md)[ftp.md](ftp.md)[sftp.md](sftp.md)
119121

120122
## 接收
121123

@@ -206,7 +208,7 @@ ii send .\video.mp4 --relay https://relay.example.com:8443
206208

207209
## 图形界面
208210

209-
Release 同时提供 `ii-gui`。它支持默认自动路径、仅局域网、指定 HTTPS relay、S3 和 WebDAV;FTP/SFTP 仅在 CLI 中提供。
211+
Release 同时提供 `ii-gui`。它支持默认自动路径、仅局域网、指定 HTTPS relay、S3 和 WebDAV;R2、Azure、FTPSFTP 仅在 CLI 中提供。
210212

211213
## 诊断
212214

SIZE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ All measurements use `cargo build -p ii --release --locked` followed by UPX
3333
| `ii web` Range, media MIME, and HEAD responses | 6,078,464 | 2,194,432 | +4,608 | `cargo test -p ii --locked` (98 tests), `cargo build -p ii --release --locked`, UPX `5.1.0 --best --lzma`, `upx -t` |
3434
| `ii webrtc` text messages | 6,124,544 | 2,204,672 | +512 | Compared with the same `0.2.2` tunnel baseline (6,120,448 / 2,204,160); `cargo test -p ii --locked` (104 tests), `cargo build -p ii --release --locked`, UPX `5.1.0 --best --lzma`, `upx -t` |
3535
| Seven extension plan: multi-send, filters, rate, JSON, discover, bind, DAV | 6,315,008 | 2,265,600 | +60,928 | `cargo test -p ii --offline --no-fail-fast -- --test-threads=1` (121 tests), workspace check, `cargo build -p ii --release --locked`, `cargo bloat --crates`, UPX `5.1.0 --best --lzma`, `upx -t` |
36+
| Generic S3/R2 split and Azure Blob backend | 6,413,312 | 2,436,608 | +171,008 | `cargo test -p ii --locked` (131 tests), `cargo check -p ii-gui --locked`, `cargo bloat --crates`, UPX `5.1.0 --best --lzma`, `upx -t` |
3637

3738
Equivalent release rebuilds have varied by up to `1,536` UPX bytes; the latest
3839
measurement is recorded with the pinned `5.1.0` packer.

ii.md

Lines changed: 59 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
```text
1212
ii help [<command>]
13-
ii send [<path>...] [--name <name>] [--include <glob>] [--exclude <glob>] [--rate <bytes/s>] [--json] [-t] [-c] [-o <path>] [--web [--port <port>] [--bind <ip>] [--token [<value>]] [--upload] [--path <path>] | --s3 | --webdav | --ftp | --sftp] [--profile <name>] [-d] [-p] [--local] [--relay <url> [-k]] [--no-relay]
13+
ii send [<path>...] [--name <name>] [--include <glob>] [--exclude <glob>] [--rate <bytes/s>] [--json] [-t] [-c] [-o <path>] [--web [--port <port>] [--bind <ip>] [--token [<value>]] [--upload] [--path <path>] | --s3 | --r2 | --azure | --webdav | --ftp | --sftp] [--profile <name>] [-d] [-p] [--local] [--relay <url> [-k]] [--no-relay]
1414
ii web [<目录>] [--port <port>] [--bind <ip>] [--token [<value>]] [--upload] [--path <目录>]
1515
ii dav [<目录>] [--port <port>] [--bind <ip>] [--token [<value>]] [--read-only]
1616
ii webrtc [--port <port>] [--bind <ip>] [--token [<value>]]
@@ -32,7 +32,7 @@ ii version
3232
- 默认先走直连和局域网,必要时再走公网 relay。
3333
- 需要显式限制路径时,用 `--local``--relay``--no-relay`
3434
- `ii relay` 是运维命令,不是用户日常发文件要记的东西。
35-
- `--s3``--webdav``--ftp``--sftp` 是可选中转后端,第一次会初始化本机 `ii.toml`
35+
- `--s3``--r2``--azure``--webdav``--ftp``--sftp` 是可选中转后端,第一次会初始化本机 `ii.toml`
3636

3737
## `ii send`
3838

@@ -87,7 +87,7 @@ tar czf - .\project | ii send --name project.tar.gz
8787
如果文件已存在,会覆盖。这个 `-o` 属于 `ii send`,不影响 `ii recv -o <dir>` 的保存目录语义。
8888

8989
`--web`
90-
: 在局域网内临时开放一个无账号鉴权 HTTP 下载页。执行后会在主 URL 上方展示进入下载页的二维码,随后在 `other:` 下列出其余物理和虚拟网卡的 IPv4 URL;下载页顶部二维码直达 `/download`。默认只提供下载;传入 `--upload` 后才开放多文件上传。按 `Ctrl+C` 停止服务。文件直接下载;文件夹会按原目录名打包为 `.tar` 下载。它不生成 ticket,不能和 `-c``-o``--s3``--webdav``--ftp``--sftp``--local``--relay``--no-relay` 同时使用。
90+
: 在局域网内临时开放一个无账号鉴权 HTTP 下载页。执行后会在主 URL 上方展示进入下载页的二维码,随后在 `other:` 下列出其余物理和虚拟网卡的 IPv4 URL;下载页顶部二维码直达 `/download`。默认只提供下载;传入 `--upload` 后才开放多文件上传。按 `Ctrl+C` 停止服务。文件直接下载;文件夹会按原目录名打包为 `.tar` 下载。它不生成 ticket,不能和 `-c``-o``--s3``--r2``--azure``--webdav``--ftp``--sftp``--local``--relay``--no-relay` 同时使用。
9191

9292
`--port <port>`
9393
: 仅和 `--web` 同用,指定 `1``65535` 的 HTTP 监听端口。未提供时由系统随机选择;`0`、非数字、超范围或已占用端口会报错。
@@ -132,17 +132,20 @@ tar czf - .\project | ii send --name project.tar.gz
132132
: 禁用 relay,只允许直连和局域网路径。
133133

134134
`--s3`
135-
: 走对象存储后端,不走 peer/relay 路径。默认 profile 是 `default`,默认 provider 是 Cloudflare R2。
136-
如果本机还没有配置,`ii` 会在终端里依次提示 `Account ID``Bucket``Access Key ID``Secret Access Key`,成功后把配置写到平台默认路径:Windows 是 `ii.exe` 同目录下的 `ii.toml`,Linux/macOS/其他 Unix-like 是 `/etc/ii/ii.toml`
137-
之后再执行 `ii send ... --s3` 时,会直接复用这份配置。
135+
: 走通用 S3 兼容对象存储,不走 peer/relay 路径。默认 profile 是 `default`;首次使用依次配置 endpoint、region、bucket、access key、secret 和 path-style。path-style 默认开启,可改为虚拟主机风格。上传、HEAD 同 MD5 去重、流式 PUT、预签名 GET/DELETE 和 Range 续传都使用 S3 兼容 API。
136+
137+
`--r2`
138+
: 走 Cloudflare R2,不走 peer/relay 路径。默认 profile 是 `default`;首次使用配置 Account ID、bucket、access key 和 secret。endpoint 固定推导为 R2 S3 API endpoint,region 固定为 `auto`,path-style 固定开启。R2 与通用 S3 使用独立配置段。
139+
140+
`--azure`
141+
: 走 Azure Block Blob,不走 peer/relay 路径。默认 profile 是 `default`;支持 `auth = "shared-key"``auth = "sas"`。Shared Key 会生成对象级 GET SAS,使用 `-d` 时再生成对象级 DELETE SAS;SAS 模式要求 Container SAS 具有 `r``w` 权限,`-d` 还要求 `d`。SAS 会完整写入 ticket,ticket 泄露者得到 SAS 本身的全部权限范围。
138142

139143
`--profile <name>`
140-
: 只在 `--s3``--webdav``--ftp``--sftp` 模式下生效,用来选择 `ii.toml` 里的后端 profile。
141-
例子:`ii send .\file.zip --s3 --profile work``ii send .\file.zip --webdav --profile nas``ii send .\file.zip --ftp --profile legacy``ii send .\file.zip --sftp --profile server`
142-
四种后端不指定时都默认使用 `default`。旧的 `[storage.s3.cloudflare]` 会自动兼容迁移为 S3 的 `default` profile。
144+
: 只在 `--s3``--r2``--azure``--webdav``--ftp``--sftp` 模式下生效,用来选择 `ii.toml` 里的后端 profile。
145+
例子:`ii send .\file.zip --s3 --profile work``ii send .\file.zip --r2 --profile r2``ii send .\file.zip --azure --profile blob``ii send .\file.zip --webdav --profile nas`。六种后端不指定时都默认使用 `default`。旧 S3 profile 若 `provider = "cloudflare-r2"` 会明确报错,必须手工写到 `[storage.r2.<name>]` 并改用 `--r2`;不会自动迁移或改写旧配置。
143146

144147
`-d`
145-
: 只在 `--s3``--webdav``--ftp``--sftp` 模式下生效。接收端拿到文件后,会尝试删除中转端里的对应对象;删除失败会忽略,不影响下载结果。
148+
: 只在 `--s3``--r2``--azure``--webdav``--ftp``--sftp` 模式下生效。接收端拿到文件后,会尝试删除中转端里的对应对象;删除失败会忽略,不影响下载结果。
146149

147150
`--webdav`
148151
: 走 WebDAV 中转后端,不走 peer/relay 路径。
@@ -155,13 +158,55 @@ tar czf - .\project | ii send --name project.tar.gz
155158
`--sftp`
156159
: 走 SFTP 中转后端,不走 peer/relay 路径。首次缺配置时,`ii` 提示主机、用户名和密码或私钥路径,上传成功后才写入 `ii.toml`。支持密码与 SSH 私钥认证。每次连接都会打印并直接接受服务器 SSH SHA-256 主机指纹,不保存 known-hosts;服务器仍可被中间人替换。详见 [sftp.md](sftp.md)
157160

161+
`SMB/NFS`
162+
: 不提供原生 SMB/NFS 中转。SMB 的认证、签名、加密和 dialect 兼容,以及 NFS 的 RPC、认证、端口发现和版本兼容,不适合当前 Windows/Linux/macOS 完整兼容和小包体目标。系统已挂载的 SMB/NFS 目录仍可直接作为本地 `ii send` 输入。
163+
158164
`-p`
159165
: 只在 `--webdav``--ftp``--sftp` 模式下生效。生成便携 ticket。WebDAV/FTP ticket 写入 URL、用户名和密码;SFTP 密码 ticket 写入密码,私钥 ticket 写入私钥文本和口令。
160166
ticket 只有编码,没有加密。谁拿到 ticket 谁就拿到了这次后端访问凭据。接收成功后,配置会写入本机 `ii.toml`;便携 SFTP 私钥会另存为密钥文件,配置只保存路径。
161167

168+
### 对象存储配置
169+
170+
Windows 配置文件在 `ii.exe` 同目录的 `ii.toml`;Linux、macOS 和其他 Unix-like 在 `/etc/ii/ii.toml`。三个对象存储后端各自使用独立 profile:
171+
172+
```toml
173+
[storage.s3.default]
174+
endpoint = "https://s3.example.com"
175+
region = "us-east-1"
176+
bucket = "files"
177+
access_key_id = "..."
178+
secret_access_key = "..."
179+
path_style = true
180+
prefix = "ii/"
181+
presign_ttl_seconds = 86400
182+
```
183+
184+
```toml
185+
[storage.r2.default]
186+
account_id = "..."
187+
bucket = "files"
188+
access_key_id = "..."
189+
secret_access_key = "..."
190+
prefix = "ii/"
191+
presign_ttl_seconds = 86400
192+
```
193+
194+
```toml
195+
[storage.azure.default]
196+
auth = "shared-key"
197+
account_name = "..."
198+
container = "files"
199+
account_key = "..."
200+
# endpoint = "https://<account>.blob.core.windows.net"
201+
prefix = "ii/"
202+
presign_ttl_seconds = 86400
203+
```
204+
205+
Azure SAS 模式把 `auth` 改为 `"sas"`,移除 `account_key`,加入具有 `sr=c``sp=rw``sas_token`;使用 `-d` 时还需要 `sp` 包含 `d`。自定义 `endpoint` 可用于 Azure China、Azure Stack 或 Azurite。
206+
162207
### 路径规则
163208

164-
- `--web``--s3``--webdav``--ftp``--sftp``--local``--relay``--no-relay` 互斥。
209+
- `--web``--s3``--r2``--azure``--webdav``--ftp``--sftp``--local``--relay``--no-relay` 互斥。
165210
- 默认不需要用户选 relay。
166211
- 如果没有局域网或直连可用,默认会自动退到公网 relay。
167212
- 指定 `--relay http://...``--relay https://...` 后,当前发送会强制走 relay-only,不使用默认公网 relay。
@@ -465,8 +510,9 @@ ii version
465510
- 局域网发现:`iroh-mdns-address-lookup`
466511
- 公网发现、NAT 穿透、relay:`iroh`
467512
- relay 服务:`iroh-relay`
468-
- S3 中转:`rust-s3`
469-
- WebDAV 中转:`reqwest_dav`
513+
- S3、R2 中转:内部精简 SigV4/HTTP 客户端
514+
- Azure Blob 中转:内部精简 Block Blob REST 客户端
515+
- WebDAV 中转:内部精简 HTTP/WebDAV 客户端
470516
- FTP 中转:`suppaftp`
471517
- SFTP 中转:`russh``russh-sftp`
472518

0 commit comments

Comments
 (0)