Specification NestOS Project Component Description File
Signed-off-by: duyiwei <duyiwei@kylinos.cn>
This commit is contained in:
parent
3cfd99c4f6
commit
1a2e2c4dea
48
README.md
48
README.md
@ -1,30 +1,50 @@
|
|||||||
# slirp4netns
|
# slirp4netns
|
||||||
|
|
||||||
#### 介绍
|
#### 介绍
|
||||||
User-mode networking for unprivileged network namespaces.
|
slirp4netns provides user-mode networking ("slirp") for unprivileged network namespaces.
|
||||||
|
|
||||||
#### 软件架构
|
|
||||||
软件架构说明
|
|
||||||
|
|
||||||
|
|
||||||
#### 安装教程
|
#### 安装教程
|
||||||
|
|
||||||
1. xxxx
|
Install slirp4netns rpm package:
|
||||||
2. xxxx
|
|
||||||
3. xxxx
|
yum install slirp4netns
|
||||||
|
|
||||||
#### 使用说明
|
#### 使用说明
|
||||||
|
|
||||||
1. xxxx
|
**Terminal 1**: Create user/network/mount namespaces
|
||||||
2. xxxx
|
|
||||||
3. xxxx
|
```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 本仓库
|
master分支使用最新的上游版本,如果检测到上游有最新版本发布,先形成issue后再提交对应PR更新,流程如下。
|
||||||
2. 新建 Feat_xxx 分支
|
1. 提交issue
|
||||||
3. 提交代码
|
2. Fork 本仓库
|
||||||
4. 新建 Pull Request
|
3. 新建 Feat_xxx 分支
|
||||||
|
4. 提交代码
|
||||||
|
5. 新建 Pull Request
|
||||||
|
|
||||||
|
|
||||||
#### 特技
|
#### 特技
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user