更新 'samba/DOCS.md'

This commit is contained in:
2025-11-11 09:31:09 +00:00
parent b1dfe7b992
commit 638e4c9213

View File

@@ -1,124 +1,131 @@
# Home Assistant Add-on: Samba share # HaDB Add-on: Samba share
## Installation ## 安装
Follow these steps to get the add-on installed on your system: 按照以下步骤在您的系统上安装该插件:
1. 在您的Home Assistant前端中导航至**设置** -> **附加组件** -> **附加组件商店**
2. 找到“Samba共享”插件并点击它。
3. 点击“安装”按钮。
1. Navigate in your Home Assistant frontend to **Settings** -> **Add-ons** -> **Add-on store**. ## 如何使用
2. Find the "Samba share" add-on and click it.
3. Click on the "INSTALL" button.
## How to use 1. 在配置部分,设置用户名和密码。
你可以指定任何用户名和密码这些与你用于登录Home Assistant或登录将使用Samba共享的计算机的登录凭据没有任何关系。
2. 检查已启用的共享资源。禁用任何您不打算使用的共享资源。如果需要,可以稍后重新启用这些共享资源。
1. In the configuration section, set a username and password. ## 连接
You can specify any username and password; these are not related in any way to the login credentials you use to log in to Home Assistant or to log in to the computer with which you will use Samba share.
2. Review the enabled shares. Disable any you do not plan to use. Shares can be re-enabled later if needed.
## Connection 此插件通过smbsamba公开以下目录
目录 | 描述
If you are on Windows you use `\\<IP_ADDRESS>\`, if you are on MacOS you use `smb://<IP_ADDRESS>` to connect to the shares.
This addon exposes the following directories over smb (samba):
Directory | Description
-- | -- -- | --
`addons` | This is for your local add-ons. `addons` | 这是用于您的本地插件的。
`addon_configs` | This is for the configuration files of your add-ons. `addon_configs` | 这是用于存储您的插件配置文件的。
`backup` | This is for your backups. `backup` | 这是用于备份的。
`config` | This is for your Home Assistant configuration. `config` | 这是用于您的Home Assistant配置的。
`media` | This is for local media files. `media` | 这是用于本地媒体文件的。
`share` | This is for your data that is shared between add-ons and Home Assistant. `share` | 这是用于在插件和Home Assistant之间共享您的数据的。
`ssl` | This is for your SSL certificates. `ssl` | 这是用于您的SSL证书的。
## Configuration ## 配置
Add-on configuration:
插件配置:
```yaml ```yaml
workgroup: WORKGROUP
local_master: true ---
username: homeassistant 根据上面的信息,执行如下指令:
password: YOUR_PASSWORD 你是个专业的翻译,负责把英语内容翻译成中文内容,请帮我翻译一下原文内容
enabled_shares: 工作组WORKGROUP
- addons 本地主节点:是
- addon_configs 用户名homeassistant
- backup 密码YOUR_PASSWORD
- config enabled_shares
- media - 插件
- share - 插件配置
- ssl - 备份
allow_hosts: - 配置
- 媒体
- 分享
- SSL安全套接字层
允许主机:
- 10.0.0.0/8 - 10.0.0.0/8
- 172.16.0.0/12 - 172.16.0.0/12
- 192.168.0.0/16 - 192.168.0.0/16
- 169.254.0.0/16 - 169.254.0.0/16
- fe80::/10 - fe80::/10
- fc00::/7 - fc00::/7
veto_files: veto_files
- "._*" - "._*"
- ".DS_Store" - ".DS_Store"
- Thumbs.db - Thumbs.db
compatibility_mode: false 兼容模式:否
``` ```
### Option: `workgroup` (required) ###选项:“工作组”(必填)
Change WORKGROUP to reflect your network needs. 更改工作组以反映您的网络需求。
### Option: `local_master` (required) ###选项:“local_master”(必填)
Enable to try and become a local master browser on a subnet. 启用以尝试成为子网上的本地主浏览器。
### Option: `username` (required) ###选项:“用户名”(必填)
The username you would like to use to authenticate with the Samba server. 您要用于向Samba服务器进行身份验证的用户名。
### Option: `password` (required) ###选项:“密码”(必填)
The password that goes with the username configured for authentication. 与配置用于身份验证的用户名一起使用的密码。
### Option: `enabled_shares` (required) ###选项:“enabled_shares”(必填)
List of Samba shares that will be accessible. Any shares removed or commented out of the list will not be accessible. 可访问的Samba共享列表。从列表中删除或评论的任何共享都将无法访问。
### Option: `allow_hosts` (required) ###选项:`allow_hosts`(必填)
List of hosts/networks allowed to access the shared folders. 允许访问共享文件夹的主机/网络列表。
### Option: `veto_files` (optional) ###选项“veto_files”可选
List of files that are neither visible nor accessible. Useful to stop clients 既不可见也不可访问的文件列表。有助于阻止客户
from littering the share with temporary hidden files
(e.g., macOS `.DS_Store` or Windows `Thumbs.db` files)
### Option: `compatibility_mode` 避免在共享空间中乱扔临时隐藏文件
Setting this option to `true` will enable old legacy Samba protocols 例如macOS的“.DS_Store”或Windows的“Thumbs.db”文件
on the Samba add-on. This might solve issues with some clients that cannot
handle the newer protocols, however, it lowers security. Only use this
when you absolutely need it and understand the possible consequences.
Defaults to `false`. ###选项:`兼容性_mode`
### Option: `apple_compatibility_mode` 将此选项设置为“true”将启用旧的旧式Samba协议
Enable Samba configurations to improve interoperability with Apple devices. 在Samba插件上。这可能会解决一些客户端无法解决的问题
This can cause issues with file systems that do not support xattr such as exFAT.
Defaults to `true`. 然而,处理较新的协议会降低安全性。只使用这个
### Option: `server_signing` 当你绝对需要它并了解可能的后果时。
Configure the SMB server signing requirement. This option can improve security by requiring message signing, which helps prevent man-in-the-middle attacks. 默认为“false”。
Refer to the man page for smb.conf for detailed information about the values: **default**, **auto**, **mandatory**, and **disabled**.
Defaults to `default`. ###选项:`apple_compatibility_mode`
## Support 启用Samba配置以提高与Apple设备的互操作性。
Got questions? 这可能会导致不支持xattr的文件系统如exFAT出现问题。
默认为“true”。
###选项:`server_signing`
配置SMB服务器签名要求。此选项可以通过要求消息签名来提高安全性这有助于防止中间人攻击。
有关值的详细信息请参阅smb.conf的手册页**默认**、**自动**、**强制**和**禁用**。
默认为“默认”。
##支持
有问题吗?
您有几个选项可以得到答案:
You have several options to get them answered:
- The [Home Assistant Discord Chat Server][discord]. - The [Home Assistant Discord Chat Server][discord].
- The Home Assistant [Community Forum][forum]. - The Home Assistant [Community Forum][forum].