libra146 / docker-topsap

使天融信开发的TopSAP运行在 docker 或 podman 中,并提供 socks5 代理服务
GNU Affero General Public License v3.0
23 stars 5 forks source link

请问Device tun0 not found.需要怎么解决 #15

Closed anyin233 closed 8 months ago

anyin233 commented 8 months ago

启动指令

docker run -d -it --device /dev/net/tun \
    --cap-add NET_ADMIN -p 127.0.0.1:1088:1080 \
    --name *** -e USER_NAME=*** -e PASSWORD=*** \
    -e SERVER_ADDRESS=*** libra146/docker-topsap

docker logs 输出

spawn /opt/TopSAP/topvpn login
Welcome Login Mode!

Input your server address(example:192.168.74.12:8112): ***

 Login_Mode
1.Password
2.Certificate
3.Double_Factor
4.Exit
5.Need_Proxy*
Choose the Login_mode: 1

Please enter user and password:
User: ***
Password: 

The Client Server respond error,err_no:0!
Device tun0 not found.
anyin233 commented 8 months ago

补充 操作系统为MacOS,平台为arm

libra146 commented 8 months ago

使用什么方式安装的 docker 呢,Docker Desktop吗,可否进入到容器中确认一下是否真正创建了 tun0?我本地暂未复现。

anyin233 commented 8 months ago

我是用的是orbstack

libra146 commented 8 months ago

那你可能要搜一下orbstack如何启用虚拟网卡的权限,例如是否可以将本机的文件映射到容器内,-v /dev/net/tun:/dev/net/tun类似于这样

anyin233 commented 8 months ago

我这里突然成功了,原因暂时未知,还是感谢你能回复我的问题