Compare commits
12 Commits
3cfd99c4f6
...
5a360d648e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5a360d648e | ||
|
|
481f9a8e36 | ||
|
|
2938a8e4a8 | ||
|
|
16301e1622 | ||
|
|
528a269478 | ||
|
|
ea311b3666 | ||
|
|
c4ab491763 | ||
|
|
4cd9a324ff | ||
|
|
665fbc204e | ||
|
|
c89cc1ed15 | ||
|
|
b252610662 | ||
|
|
a54286329e |
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
|
||||||
|
|
||||||
|
|
||||||
#### 特技
|
#### 特技
|
||||||
|
|||||||
Binary file not shown.
@ -1,19 +1,14 @@
|
|||||||
%global git0 https://github.com/rootless-containers/%{name}
|
%global built_tag v1.2.3
|
||||||
%global commit0 6dc0186e020232ae1a6fcc1f7afbc3ea02fd3876
|
%global built_tag_strip %(b=%{built_tag}; echo ${b:1})
|
||||||
%global shortcommit0 %(c=%{commit0}; echo ${c:0:7})
|
|
||||||
|
|
||||||
# Used for comparing with latest upstream tag
|
|
||||||
# to decide whether to autobuild (non-rawhide only)
|
|
||||||
%define built_tag v1.1.9
|
|
||||||
|
|
||||||
Name: slirp4netns
|
Name: slirp4netns
|
||||||
Version: 1.1.9
|
Version: 1.2.3
|
||||||
Release: 1
|
Release: 1
|
||||||
Summary: slirp for network namespaces
|
Summary: slirp for network namespaces
|
||||||
License: GPLv2
|
License: GPL-2.0-only
|
||||||
URL: https://github.com/rootless-containers/slirp4netns
|
URL: https://github.com/rootless-containers/slirp4netns
|
||||||
Source0: %{git0}/archive/%{commit0}/%{name}-%{shortcommit0}.tar.gz
|
Source0: %{url}/archive/%{built_tag}.tar.gz
|
||||||
Source1: https://github.com/cpuguy83/go-md2man/archive/v1.0.10.tar.gz
|
Source1: https://github.com/cpuguy83/go-md2man/archive/refs/tags/v2.0.3.tar.gz
|
||||||
BuildRequires: autoconf automake gcc glib2-devel
|
BuildRequires: autoconf automake gcc glib2-devel
|
||||||
BuildRequires: git libcap-devel golang
|
BuildRequires: git libcap-devel golang
|
||||||
BuildRequires: libseccomp-devel libslirp-devel make
|
BuildRequires: libseccomp-devel libslirp-devel make
|
||||||
@ -33,7 +28,7 @@ building other packages which use import path with
|
|||||||
%{import_path} prefix.
|
%{import_path} prefix.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -Sgit -n %{name}-%{commit0}
|
%autosetup -Sgit -n %{name}-%{built_tag_strip}
|
||||||
tar -xf %SOURCE1
|
tar -xf %SOURCE1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -64,5 +59,17 @@ make DESTDIR=%{buildroot} install install-man
|
|||||||
%{_mandir}/man1/%{name}.1.gz
|
%{_mandir}/man1/%{name}.1.gz
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Apr 12 2024 duyiwei <duyiwei@kylinos.cn> - 1.2.3-1
|
||||||
|
- upgrade version to 1.2.3
|
||||||
|
|
||||||
|
* Wed Jan 03 2024 lijian <lijian2@kylinos.cn> - 1.2.2-1
|
||||||
|
- upgrade to 1.2.2
|
||||||
|
|
||||||
|
* Fri Dec 09 2022 liukuo <liukuo@kylinos.cn> - 1.2.0-2
|
||||||
|
- License compliance rectification
|
||||||
|
|
||||||
|
* Tue Jun 07 2022 duyiwei <duyiwei@kylinos.cn> - 1.2.0-1
|
||||||
|
- upgrade to v1.2.0
|
||||||
|
|
||||||
* Wed Jan 26 2022 duyiwei <duyiwei@kylinos.cn> - 1.1.9-1
|
* Wed Jan 26 2022 duyiwei <duyiwei@kylinos.cn> - 1.1.9-1
|
||||||
- Package init
|
- Package init
|
||||||
4
slirp4netns.yaml
Normal file
4
slirp4netns.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
version_control: github
|
||||||
|
src_repo: rootless-containers/slirp4netns
|
||||||
|
tag_prefix: "^v"
|
||||||
|
separator: "."
|
||||||
BIN
v1.0.10.tar.gz
BIN
v1.0.10.tar.gz
Binary file not shown.
BIN
v1.2.3.tar.gz
Normal file
BIN
v1.2.3.tar.gz
Normal file
Binary file not shown.
BIN
v2.0.3.tar.gz
Normal file
BIN
v2.0.3.tar.gz
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user