From e27a335ee0fcaeb018418c4890779bdfdb496e81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Mon, 22 Dec 2025 04:51:27 +0800 Subject: [PATCH] documentation: Add Wi-Fi state shared page --- docs/configuration/route/rule.md | 12 +++---- docs/configuration/route/rule.zh.md | 12 +++---- docs/configuration/shared/wifi-state.md | 41 ++++++++++++++++++++++ docs/configuration/shared/wifi-state.zh.md | 41 ++++++++++++++++++++++ mkdocs.yml | 2 ++ 5 files changed, 92 insertions(+), 16 deletions(-) create mode 100644 docs/configuration/shared/wifi-state.md create mode 100644 docs/configuration/shared/wifi-state.zh.md diff --git a/docs/configuration/route/rule.md b/docs/configuration/route/rule.md index 6bbb00dee..31f768fe2 100644 --- a/docs/configuration/route/rule.md +++ b/docs/configuration/route/rule.md @@ -428,20 +428,16 @@ Match default interface address. #### wifi_ssid -!!! quote "" - - Only supported in graphical clients on Android and Apple platforms, or on Linux. - Match WiFi SSID. +See [Wi-Fi State](/configuration/shared/wifi-state/) for details. + #### wifi_bssid -!!! quote "" - - Only supported in graphical clients on Android and Apple platforms, or on Linux. - Match WiFi BSSID. +See [Wi-Fi State](/configuration/shared/wifi-state/) for details. + #### preferred_by !!! question "Since sing-box 1.13.0" diff --git a/docs/configuration/route/rule.zh.md b/docs/configuration/route/rule.zh.md index 164bf40e5..1ffe57d68 100644 --- a/docs/configuration/route/rule.zh.md +++ b/docs/configuration/route/rule.zh.md @@ -425,20 +425,16 @@ icon: material/new-box #### wifi_ssid -!!! quote "" - - 仅在 Android 与 Apple 平台图形客户端和 Linux 中支持。 - 匹配 WiFi SSID。 +参阅 [Wi-Fi 状态](/zh/configuration/shared/wifi-state/)。 + #### wifi_bssid -!!! quote "" - - 仅在 Android 与 Apple 平台图形客户端和 Linux 中支持。 - 匹配 WiFi BSSID。 +参阅 [Wi-Fi 状态](/zh/configuration/shared/wifi-state/)。 + #### preferred_by !!! question "自 sing-box 1.13.0 起" diff --git a/docs/configuration/shared/wifi-state.md b/docs/configuration/shared/wifi-state.md new file mode 100644 index 000000000..b509d0e9b --- /dev/null +++ b/docs/configuration/shared/wifi-state.md @@ -0,0 +1,41 @@ +--- +icon: material/new-box +--- + +# Wi-Fi State + +!!! quote "Changes in sing-box 1.13.0" + + :material-plus: Linux support + :material-plus: Windows support + +sing-box can monitor Wi-Fi state to enable routing rules based on `wifi_ssid` and `wifi_bssid`. + +### Platform Support + +| Platform | Support | Notes | +|-----------------|------------------|--------------------------| +| Android | :material-check: | In graphical client | +| Apple platforms | :material-check: | In graphical clients | +| Linux | :material-check: | Requires supported daemon | +| Windows | :material-check: | WLAN API | +| Others | :material-close: | | + +### Linux + +!!! question "Since sing-box 1.13.0" + +The following backends are supported and will be auto-detected in order of priority: + +| Backend | Interface | +|------------------|-------------| +| NetworkManager | D-Bus | +| IWD | D-Bus | +| wpa_supplicant | Unix socket | +| ConnMan | D-Bus | + +### Windows + +!!! question "Since sing-box 1.13.0" + +Uses Windows WLAN API. diff --git a/docs/configuration/shared/wifi-state.zh.md b/docs/configuration/shared/wifi-state.zh.md new file mode 100644 index 000000000..a44340cf2 --- /dev/null +++ b/docs/configuration/shared/wifi-state.zh.md @@ -0,0 +1,41 @@ +--- +icon: material/new-box +--- + +# Wi-Fi 状态 + +!!! quote "sing-box 1.13.0 的变更" + + :material-plus: Linux 支持 + :material-plus: Windows 支持 + +sing-box 可以监控 Wi-Fi 状态,以启用基于 `wifi_ssid` 和 `wifi_bssid` 的路由规则。 + +### 平台支持 + +| 平台 | 支持 | 备注 | +|-----------------|------------------|----------------| +| Android | :material-check: | 仅图形客户端 | +| Apple 平台 | :material-check: | 仅图形客户端 | +| Linux | :material-check: | 需要支持的守护进程 | +| Windows | :material-check: | WLAN API | +| 其他 | :material-close: | | + +### Linux + +!!! question "自 sing-box 1.13.0 起" + +支持以下后端,将按优先级顺序自动探测: + +| 后端 | 接口 | +|------------------|-------------| +| NetworkManager | D-Bus | +| IWD | D-Bus | +| wpa_supplicant | Unix socket | +| ConnMan | D-Bus | + +### Windows + +!!! question "自 sing-box 1.13.0 起" + +使用 Windows WLAN API。 diff --git a/mkdocs.yml b/mkdocs.yml index a505f3e4d..236252b98 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -126,6 +126,7 @@ nav: - V2Ray Transport: configuration/shared/v2ray-transport.md - UDP over TCP: configuration/shared/udp-over-tcp.md - TCP Brutal: configuration/shared/tcp-brutal.md + - Wi-Fi State: configuration/shared/wifi-state.md - Endpoint: - configuration/endpoint/index.md - WireGuard: configuration/endpoint/wireguard.md @@ -268,6 +269,7 @@ plugins: DNS01 Challenge Fields: DNS01 验证字段 Multiplex: 多路复用 V2Ray Transport: V2Ray 传输层 + Wi-Fi State: Wi-Fi 状态 Endpoint: 端点 Inbound: 入站