Improve bridge

This commit is contained in:
世界
2026-08-30 17:41:42 +08:00
parent 1e2f1d04da
commit 97bbf2a9a4
21 changed files with 276 additions and 191 deletions
+8
View File
@@ -18,6 +18,14 @@ icon: material/new-box
or other L3 endpoints via the `route` action in
[Pre-match](/configuration/shared/pre-match/); L4 connections will be rejected.
Traffic to local addresses of the machine (loopback, or addresses assigned to its
network interfaces) will be rejected.
It is recommended to use [`preferred_by`](/configuration/route/rule/#preferred_by)
as a gate in the `route` rule: it only matches in
[pre-match](/configuration/shared/pre-match/) and excludes local addresses that
cannot be routed.
### Structure
```json
+5
View File
@@ -16,6 +16,11 @@ icon: material/new-box
通过[预匹配](/zh/configuration/shared/pre-match/)中的 `route` 动作,将 L3 流量从 TUN
或其他 L3 endpoints 路由到它;L4 连接将被拒绝。
到本机本地地址(loopback 或分配给本机网络接口的地址)的流量将被拒绝。
建议使用 [`preferred_by`](/zh/configuration/route/rule/#preferred_by) 作为 `route`
规则的门禁:它仅在[预匹配](/zh/configuration/shared/pre-match/)中匹配,且排除了无法路由的本地地址。
### 结构
```json
+5 -4
View File
@@ -465,10 +465,11 @@ See [Wi-Fi State](/configuration/shared/wifi-state/) for details.
Match specified outbounds' preferred routes.
| Type | Match |
|-------------|-----------------------------------------------|
| `tailscale` | Match MagicDNS domains and peers' allowed IPs |
| `wireguard` | Match peers's allowed IPs |
| Type | Match |
|-------------|----------------------------------------------------|
| `tailscale` | Match MagicDNS domains and peers' allowed IPs |
| `wireguard` | Match peers's allowed IPs |
| `bridge` | Match all addresses except local addresses of the machine, only in [pre-match](/configuration/shared/pre-match/) |
#### source_mac_address
+1
View File
@@ -467,6 +467,7 @@ icon: material/new-box
|-------------|--------------------------------|
| `tailscale` | 匹配 MagicDNS 域名和对端的 allowed IPs |
| `wireguard` | 匹配对端的 allowed IPs |
| `bridge` | 匹配除本机本地地址外的所有地址,仅在[预匹配](/zh/configuration/shared/pre-match/)中 |
#### source_mac_address