Add netns and unshare support

This commit is contained in:
世界
2026-08-30 17:41:42 +08:00
parent 7b3993db12
commit 9531a6a9cd
34 changed files with 891 additions and 49 deletions
+5 -1
View File
@@ -4,7 +4,8 @@ icon: material/new-box
!!! quote "Changes in sing-box 1.14.0"
:material-alert: [domain_resolver](#domain_resolver)
:material-alert: [domain_resolver](#domain_resolver)
:material-alert: [netns](#netns)
!!! quote "Changes in sing-box 1.13.0"
@@ -118,6 +119,9 @@ Reuse listener address.
Set network namespace, name or path.
Since sing-box 1.14.0, the tag of a [network namespace](/configuration/network-namespace/) can also be used.
Referencing an `unshare` network namespace should be avoided, since its only route out is the tun interface managed by sing-box itself.
#### connect_timeout
Connect timeout, in golang's Duration format.
+5 -1
View File
@@ -4,7 +4,8 @@ icon: material/new-box
!!! quote "sing-box 1.14.0 中的更改"
:material-alert: [domain_resolver](#domain_resolver)
:material-alert: [domain_resolver](#domain_resolver)
:material-alert: [netns](#netns)
!!! quote "sing-box 1.13.0 中的更改"
@@ -118,6 +119,9 @@ icon: material/new-box
设置网络命名空间,名称或路径。
自 sing-box 1.14.0 起,也可以使用[网络命名空间](/zh/configuration/network-namespace/)的标签。
应避免引用 `unshare` 类型的网络命名空间,因为其唯一出口是由 sing-box 自身管理的 tun 接口。
#### connect_timeout
连接超时,采用 golang 的 Duration 格式。
+6
View File
@@ -2,6 +2,10 @@
icon: material/new-box
---
!!! quote "Changes in sing-box 1.14.0"
:material-alert: [netns](#netns)
!!! quote "Changes in sing-box 1.13.0"
:material-plus: [disable_tcp_keep_alive](#disable_tcp_keep_alive)
@@ -97,6 +101,8 @@ Reuse listener address.
Set network namespace, name or path.
Since sing-box 1.14.0, the tag of a [network namespace](/configuration/network-namespace/) can also be used.
#### tcp_fast_open
Enable TCP Fast Open.
+6
View File
@@ -2,6 +2,10 @@
icon: material/new-box
---
!!! quote "sing-box 1.14.0 中的更改"
:material-alert: [netns](#netns)
!!! quote "sing-box 1.13.0 中的更改"
:material-plus: [disable_tcp_keep_alive](#disable_tcp_keep_alive)
@@ -97,6 +101,8 @@ icon: material/new-box
设置网络命名空间,名称或路径。
自 sing-box 1.14.0 起,也可以使用[网络命名空间](/zh/configuration/network-namespace/)的标签。
#### tcp_fast_open
启用 TCP Fast Open。