!8 Specification NestOS Project Component Description File

From: @duyiwei7w 
Reviewed-by: @fu-shanqing 
Signed-off-by: @fu-shanqing
This commit is contained in:
openeuler-ci-bot 2023-06-21 07:17:16 +00:00 committed by Gitee
commit 1f17b6fdd1
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -1,30 +1,50 @@
# slirp4netns
#### 介绍
User-mode networking for unprivileged network namespaces.
#### 软件架构
软件架构说明
slirp4netns provides user-mode networking ("slirp") for unprivileged network namespaces.
#### 安装教程
1. xxxx
2. xxxx
3. xxxx
Install slirp4netns rpm package:
yum install slirp4netns
#### 使用说明
1. xxxx
2. xxxx
3. xxxx
**Terminal 1**: Create user/network/mount namespaces
```console
(host)$ unshare --user --map-root-user --net --mount
(namespace)$ echo $$ > /tmp/pid
```
In this documentation, we use `(host)$` as the prompt of the host shell, `(namespace)$` as the prompt of the shell running in the namespaces.
If `unshare` fails, try the following commands (known to be needed on Debian, Arch, and old CentOS 7.X):
```console
(host)$ sudo sh -c 'echo "user.max_user_namespaces=28633" >> /etc/sysctl.d/userns.conf'
(host)$ [ -f /proc/sys/kernel/unprivileged_userns_clone ] && sudo sh -c 'echo "kernel.unprivileged_userns_clone=1" >> /etc/sysctl.d/userns.conf'
(host)$ sudo sysctl --system
```
**Terminal 2**: Start slirp4netns
```console
(host)$ slirp4netns --configure --mtu=65520 --disable-host-loopback $(cat /tmp/pid) tap0
starting slirp, MTU=65520
...
```
#### 参与贡献
1. Fork 本仓库
2. 新建 Feat_xxx 分支
3. 提交代码
4. 新建 Pull Request
master分支使用最新的上游版本如果检测到上游有最新版本发布先形成issue后再提交对应PR更新流程如下。
1. 提交issue
2. Fork 本仓库
3. 新建 Feat_xxx 分支
4. 提交代码
5. 新建 Pull Request
#### 特技