# slirp4netns **Repository Path**: src-openeuler/slirp4netns ## Basic Information - **Project Name**: slirp4netns - **Description**: User-mode networking for unprivileged network namespaces. - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 7 - **Created**: 2022-01-25 - **Last Updated**: 2025-10-11 ## Categories & Tags **Categories**: Uncategorized **Tags**: sig-CloudNative ## README # slirp4netns #### 介绍 slirp4netns provides user-mode networking ("slirp") for unprivileged network namespaces. #### 安装教程 Install slirp4netns rpm package: yum install slirp4netns #### 使用说明 **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 ... ``` #### 参与贡献 master分支使用最新的上游版本,如果检测到上游有最新版本发布,先形成issue后再提交对应PR更新,流程如下。 1. 提交issue 2. Fork 本仓库 3. 新建 Feat_xxx 分支 4. 提交代码 5. 新建 Pull Request #### 特技 1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md 2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) 3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) 6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)