mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-11-06 10:12:37 +00:00
Add netns and unshare support
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
---
|
||||
icon: material/new-box
|
||||
---
|
||||
|
||||
!!! question "Since sing-box 1.14.0"
|
||||
|
||||
# Unshare
|
||||
|
||||
Create a new network namespace, without root privilege.
|
||||
|
||||
!!! info ""
|
||||
|
||||
Rootless operation requires the kernel to allow unprivileged user namespace creation.
|
||||
|
||||
### Structure
|
||||
|
||||
```json
|
||||
{
|
||||
"network_namespaces": [
|
||||
{
|
||||
"type": "unshare",
|
||||
"tag": "",
|
||||
"pid_file": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### Fields
|
||||
|
||||
#### pid_file
|
||||
|
||||
If set, the PID of the process holding the namespace open is written to this path.
|
||||
|
||||
The namespace can be entered with `nsenter -t <pid> -n` when sing-box is run as root,
|
||||
or `nsenter -t <pid> -U --preserve-credentials -n` otherwise.
|
||||
Reference in New Issue
Block a user