如何让容器/进程不走代理
如何让容器/进程不走代理
5202 年了, 还有人不会...根本不需要 macvlan
0. 创建一个用户
5202 年了, 还有人不会...根本不需要 macvlan
0. 创建一个用户
shell
useradd -u 8964 xxx
usermod -aG sudo xxx
id xxx
以二进制版 snell-server 为例1. 编辑
/etc/systemd/system/snell-server.service 里的 User[Service]
User=xxx2. 重启
shell
systemctl daemon-reload
systemctl restart snell-server3. 检查
shell
ps -eo user,group,uid,gid,comm | grep snell
ps -u 8964
以容器版 snell-server 为例1. 配置容器
user: 8964:89642. 检查
shell
ps -eo user,group,uid,gid,comm | grep snell
ps -u 8964
以容器版 qBittorrent 为例1. 配置容器
environment:
- UID=8964
- GID=89643. mihomo 配置参考, sing-box 同理
tun:
exclude-uid: [8964]重载配置/重启
4. 检查
4. 检查
shell
ps -eo user,group,uid,gid,comm | grep qbittorrent
ps -u 8964
#代理 #容器 #配置 #服务 #TUN #mihomo #singbox #docker #绕过 #exclude #uid