Improve read wait interface &
Refactor Authenticator interface to struct & Update smux & Update gVisor to 20231204.0 & Update wireguard-go & Add GSO support for TUN/WireGuard & Fix router pre-start & Fix bind forwarder to interface for systems stack
This commit is contained in:
@@ -1,3 +1,12 @@
|
||||
---
|
||||
icon: material/alert-decagram
|
||||
---
|
||||
|
||||
!!! quote "Changes in sing-box 1.8.0"
|
||||
|
||||
:material-plus: [gso](#gso)
|
||||
:material-alert-decagram: [stack](#stack)
|
||||
|
||||
!!! quote ""
|
||||
|
||||
Only supported on Linux, Windows and macOS.
|
||||
@@ -12,6 +21,7 @@
|
||||
"inet4_address": "172.19.0.1/30",
|
||||
"inet6_address": "fdfe:dcba:9876::1/126",
|
||||
"mtu": 9000,
|
||||
"gso": false,
|
||||
"auto_route": true,
|
||||
"strict_route": true,
|
||||
"inet4_route_address": [
|
||||
@@ -99,6 +109,16 @@ IPv6 prefix for the tun interface.
|
||||
|
||||
The maximum transmission unit.
|
||||
|
||||
#### gso
|
||||
|
||||
!!! question "Since sing-box 1.8.0"
|
||||
|
||||
!!! quote ""
|
||||
|
||||
Only supported on Linux.
|
||||
|
||||
Enable generic segmentation offload.
|
||||
|
||||
#### auto_route
|
||||
|
||||
Set the default route to the Tun.
|
||||
@@ -161,18 +181,19 @@ UDP NAT expiration time in seconds, default is 300 (5 minutes).
|
||||
|
||||
#### stack
|
||||
|
||||
!!! quote "Changes in sing-box 1.8.0"
|
||||
|
||||
:material-delete-alert: The legacy LWIP stack has been deprecated and removed.
|
||||
|
||||
TCP/IP stack.
|
||||
|
||||
| Stack | Description | Status |
|
||||
|--------|----------------------------------------------------------------------------------|-------------------|
|
||||
| system | Sometimes better performance | recommended |
|
||||
| gVisor | Better compatibility, based on [google/gvisor](https://github.com/google/gvisor) | recommended |
|
||||
| mixed | Mixed `system` TCP stack and `gVisor` UDP stack | recommended |
|
||||
| LWIP | Based on [eycorsican/go-tun2socks](https://github.com/eycorsican/go-tun2socks) | upstream archived |
|
||||
| Stack | Description |
|
||||
|----------|-------------------------------------------------------------------------------------------------------|
|
||||
| `system` | Perform L3 to L4 translation using the system network stack |
|
||||
| `gvisor` | Perform L3 to L4 translation using [gVisor](https://github.com/google/gvisor)'s virtual network stack |
|
||||
| `mixed` | Mixed `system` TCP stack and `gvisor` UDP stack |
|
||||
|
||||
!!! warning ""
|
||||
|
||||
LWIP stacks is not included by default, see [Installation](/installation/build-from-source/#build-tags).
|
||||
Defaults to the `mixed` stack if the gVisor build tag is enabled, otherwise defaults to the `system` stack.
|
||||
|
||||
#### include_interface
|
||||
|
||||
@@ -218,10 +239,10 @@ Exclude users in route, but in range.
|
||||
|
||||
Limit android users in route.
|
||||
|
||||
| Common user | ID |
|
||||
|--------------|-----|
|
||||
| Main | 0 |
|
||||
| Work Profile | 10 |
|
||||
| Common user | ID |
|
||||
|--------------|----|
|
||||
| Main | 0 |
|
||||
| Work Profile | 10 |
|
||||
|
||||
#### include_package
|
||||
|
||||
|
||||
@@ -1,3 +1,12 @@
|
||||
---
|
||||
icon: material/alert-decagram
|
||||
---
|
||||
|
||||
!!! quote "sing-box 1.8.0 中的更改"
|
||||
|
||||
:material-plus: [gso](#gso)
|
||||
:material-alert-decagram: [stack](#stack)
|
||||
|
||||
!!! quote ""
|
||||
|
||||
仅支持 Linux、Windows 和 macOS。
|
||||
@@ -12,6 +21,7 @@
|
||||
"inet4_address": "172.19.0.1/30",
|
||||
"inet6_address": "fdfe:dcba:9876::1/126",
|
||||
"mtu": 9000,
|
||||
"gso": false,
|
||||
"auto_route": true,
|
||||
"strict_route": true,
|
||||
"inet4_route_address": [
|
||||
@@ -99,6 +109,16 @@ tun 接口的 IPv6 前缀。
|
||||
|
||||
最大传输单元。
|
||||
|
||||
#### gso
|
||||
|
||||
!!! question "自 sing-box 1.8.0 起"
|
||||
|
||||
!!! quote ""
|
||||
|
||||
仅支持 Linux。
|
||||
|
||||
启用通用分段卸载。
|
||||
|
||||
#### auto_route
|
||||
|
||||
设置到 Tun 的默认路由。
|
||||
@@ -158,17 +178,19 @@ UDP NAT 过期时间,以秒为单位,默认为 300(5 分钟)。
|
||||
|
||||
#### stack
|
||||
|
||||
!!! quote "sing-box 1.8.0 中的更改"
|
||||
|
||||
:material-delete-alert: 旧的 LWIP 栈已被弃用并移除。
|
||||
|
||||
TCP/IP 栈。
|
||||
|
||||
| 栈 | 描述 | 状态 |
|
||||
|-------------|--------------------------------------------------------------------------|-------|
|
||||
| system (默认) | 有时性能更好 | 推荐 |
|
||||
| gVisor | 兼容性较好,基于 [google/gvisor](https://github.com/google/gvisor) | 推荐 |
|
||||
| LWIP | 基于 [eycorsican/go-tun2socks](https://github.com/eycorsican/go-tun2socks) | 上游已存档 |
|
||||
| 栈 | 描述 |
|
||||
|--------|------------------------------------------------------------------|
|
||||
| system | 基于系统网络栈执行 L3 到 L4 转换 |
|
||||
| gVisor | 基于 [gVisor](https://github.com/google/gvisor) 虚拟网络栈执行 L3 到 L4 转换 |
|
||||
| mixed | 混合 `system` TCP 栈与 `gvisor` UDP 栈 |
|
||||
|
||||
!!! warning ""
|
||||
|
||||
默认安装不包含 LWIP 栈,参阅 [安装](/zh/installation/build-from-source/#_5)。
|
||||
默认使用 `mixed` 栈如果 gVisor 构建标记已启用,否则默认使用 `system` 栈。
|
||||
|
||||
#### include_interface
|
||||
|
||||
@@ -215,8 +237,8 @@ TCP/IP 栈。
|
||||
限制被路由的 Android 用户。
|
||||
|
||||
| 常用用户 | ID |
|
||||
|--|-----|
|
||||
| 您 | 0 |
|
||||
|------|----|
|
||||
| 您 | 0 |
|
||||
| 工作资料 | 10 |
|
||||
|
||||
#### include_package
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
---
|
||||
icon: material/new-box
|
||||
---
|
||||
|
||||
!!! quote "Changes in sing-box 1.8.0"
|
||||
|
||||
:material-plus: [gso](#gso)
|
||||
|
||||
### Structure
|
||||
|
||||
```json
|
||||
@@ -8,6 +16,7 @@
|
||||
"server": "127.0.0.1",
|
||||
"server_port": 1080,
|
||||
"system_interface": false,
|
||||
"gso": false,
|
||||
"interface_name": "wg0",
|
||||
"local_address": [
|
||||
"10.0.0.2/32"
|
||||
@@ -52,15 +61,25 @@ The server port.
|
||||
|
||||
#### system_interface
|
||||
|
||||
Use system tun support.
|
||||
Use system interface.
|
||||
|
||||
Requires privilege and cannot conflict with system interfaces.
|
||||
Requires privilege and cannot conflict with exists system interfaces.
|
||||
|
||||
Forced if gVisor not included in the build.
|
||||
|
||||
#### interface_name
|
||||
|
||||
Custom device name when `system_interface` enabled.
|
||||
Custom interface name for system interface.
|
||||
|
||||
#### gso
|
||||
|
||||
!!! question "Since sing-box 1.8.0"
|
||||
|
||||
!!! quote ""
|
||||
|
||||
Only supported on Linux.
|
||||
|
||||
Try to enable generic segmentation offload.
|
||||
|
||||
#### local_address
|
||||
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
---
|
||||
icon: material/new-box
|
||||
---
|
||||
|
||||
!!! quote "sing-box 1.8.0 中的更改"
|
||||
|
||||
:material-plus: [gso](#gso)
|
||||
|
||||
### 结构
|
||||
|
||||
```json
|
||||
@@ -8,6 +16,7 @@
|
||||
"server": "127.0.0.1",
|
||||
"server_port": 1080,
|
||||
"system_interface": false,
|
||||
"gso": false,
|
||||
"interface_name": "wg0",
|
||||
"local_address": [
|
||||
"10.0.0.2/32"
|
||||
@@ -40,15 +49,25 @@
|
||||
|
||||
#### system_interface
|
||||
|
||||
使用系统 tun 支持。
|
||||
使用系统设备。
|
||||
|
||||
需要特权且不能与系统接口冲突。
|
||||
需要特权且不能与已有系统接口冲突。
|
||||
|
||||
如果 gVisor 未包含在构建中,则强制执行。
|
||||
|
||||
#### interface_name
|
||||
|
||||
启用 `system_interface` 时的自定义设备名称。
|
||||
为系统接口自定义设备名称。
|
||||
|
||||
#### gso
|
||||
|
||||
!!! question "自 sing-box 1.8.0 起"
|
||||
|
||||
!!! quote ""
|
||||
|
||||
仅支持 Linux。
|
||||
|
||||
尝试启用通用分段卸载。
|
||||
|
||||
#### local_address
|
||||
|
||||
|
||||
Reference in New Issue
Block a user