feat(smb): add SMB dialect selection and persistence (#445)
Deploy docs to GitHub Pages / deploy (push) Has been cancelled
Install.sh / build (ubuntu-latest) (push) Has been cancelled
CI / toolchain (push) Has been cancelled
CI / fmt (push) Has been cancelled
CI / install-scripts (push) Has been cancelled
Install.sh / build (macos-latest) (push) Has been cancelled
Site / build-site (push) Has been cancelled
CI / crates-macos-latest (push) Has been cancelled
CI / crates-ubuntu-latest (push) Has been cancelled
CI / crates-windows-latest (push) Has been cancelled
CI / doc (push) Has been cancelled
CI / deny (push) Has been cancelled

Support Auto, SMB1, SMB2, and SMB3 selection on Unix, bound negotiation to the selected dialect family, preserve legacy bookmarks as Auto, and document the new option. Windows keeps operating-system-managed negotiation.

Closes #439
This commit is contained in:
Christian Visintin
2026-09-02 14:14:23 +02:00
committed by GitHub
parent e966a83220
commit 751f68f6d4
20 changed files with 802 additions and 121 deletions
@@ -151,8 +151,22 @@ CLI 连接使用 ADC 和默认端点。如果需要自定义端点或服务账
- 密码
- 端口(仅其他系统;默认 `445`)
- 工作组(仅其他系统)
- SMB 版本(仅其他系统;默认 `Auto`)
在 Windows 上,端口和工作组字段不会被使用。
在 Windows 上,端口、工作组和 SMB 版本字段不会被使用:SMB 协议协商由操作系统管理。
SMB 版本字段限定协商时可用的方言:
| 选项 | 协商的方言 |
| ---- | ------------------ |
| Auto | SMB 2.0.2 至 3.1.1 |
| SMB1 | 仅 NT1(CIFS) |
| SMB2 | SMB 2.0.2 至 2.1 |
| SMB3 | SMB 3.0 至 3.1.1 |
`Auto` 永远不会协商 SMB1。SMB1 已弃用且不安全:仅在无法支持更新协议的隔离旧设备上选择它。选择 SMB1 时,表单中会显示警告。
书签使用 SMB 表中的 `dialect` 键保存所选项(`auto`、`smb1`、`smb2` 或 `smb3`)。在此选项出现之前保存的书签没有 `dialect` 键,其行为等同于 `Auto`。下方的地址语法不包含版本;从命令行发起的连接使用 `Auto`。
Windows 地址语法: