libra146 / docker-topsap Goto Github PK
View Code? Open in Web Editor NEW使天融信开发的TopSAP运行在 docker 或 podman 中,并提供 socks5 代理服务
License: GNU Affero General Public License v3.0
使天融信开发的TopSAP运行在 docker 或 podman 中,并提供 socks5 代理服务
License: GNU Affero General Public License v3.0
你好,
我正在使用 docker-topsec 来配置 VPN。通过 VPN 后,我可以在浏览器中正常访问资源,但在使用工具尝试连接到 22 端口时遇到了问题。clash的日志显示流量已经正确引导至 Docker 容器后的本机端口,如下所示:
[TCP] 198.18.0.1:61752 --> 192.168.40.148:22 match IPCIDR(192.168.40.148/32) using topsec[socks5-topsec]
具体情况是:
浏览器可以正常访问 VPN 后的资源。
使用工具连接到 22 端口失败。
从日志来看,流量确实已引导到 Docker 容器后的本机端口。
我已经确认了 Docker 容器的网络配置,似乎没有明显的问题。请问有没有什么建议或解决方案可以帮助我排查和解决这个问题?
非常感谢!
已经将启动代码中的127.0.0.1去掉,也试过改为本机内网地址(192.168.1.77),10888端口映射的内网1080端口,通过“curl --socks5 127.0.0.1:10888 网址”可以访问,但通过“curl --socks5 192.168.1.77:10888 网址”就打不开,试过换端口,可以确定肯定不是端口被占用。什么方法都试过了,实在没办法。可以确定docker的端口映射是没问题的,因为docker版nginx映射的9443端口都可能在内网用192.168.1.77:9443打开。
日志有一条警告,但感觉应该不成问题,因为下一条显示启动成功,也能通过127.0.0.1:10888访问(见上面示例)。关键的几条日志如下:
Login Success!
Sep 18 10:59:58 (1695034798.282122) danted[79]: warning: could not open pidfile /var/run/danted.pid for writing: Permission denied
Sep 18 10:59:59 (1695034799.617496) danted[79]: info: Dante/server[1/1] v1.4.2 running
启动指令
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.
.4 Current default time zone: 'Etc/UTC'
881.4 Local time is now: Sun Sep 17 14:39:41 UTC 2023.
881.4 Universal Time is now: Sun Sep 17 14:39:41 UTC 2023.
881.4
881.4 dpkg-deb: error: 'TopSAP-3.5.2.36.2-x86_64.deb' is not a Debian format archive
881.4 dpkg: error processing archive TopSAP-3.5.2.36.2-x86_64.deb (--install):
881.4 dpkg-deb --control subprocess returned error exit status 2
881.4 Errors were encountered while processing:
881.4 TopSAP-3.5.2.36.2-x86_64.deb
------
Dockerfile:14
--------------------
13 |
14 | >>> RUN export DEBIAN_FRONTEND=noninteractive && \
15 | >>> ln -fs /usr/share/zoneinfo/Asia /etc/localtime && \
16 | >>> # if [ "${BUILD_ENV}" = "local" ]; then sed -i s/deb.debian.org/mirrors.aliyun.com/ /etc/apt/sources.list; fi &&\
17 | >>> apt-get update && apt-get -y --no-install-suggests --no-install-recommends install tzdata sudo curl dante-server iproute2 ca-certificates iptables psmisc cron && \
18 | >>> dpkg-reconfigure --frontend noninteractive tzdata && \
19 | >>> # 解决TopSap检测到Debian系统无法安装的问题,可以看这篇文章:https://blog.d77.xyz/archives/649aab5b.html
20 | >>> echo Ubuntu >> /etc/issue && \
21 | >>> # 根据架构安装对应的 TopSAP
22 | >>> if [ "$(uname -m)" = "x86_64" ]; then dpkg -i TopSAP-3.5.2.36.2-x86_64.deb; else dpkg -i TopSAP-3.5.2.36.2-aarch64.deb; fi && \
23 | >>> rm -r TopSAP-3.5.2.36.2-x86_64.deb TopSAP-3.5.2.36.2-aarch64.deb && \
24 | >>> apt-get install -y expect && \
25 | >>> rm -rf /var/lib/apt/lists/*
26 |
--------------------
ERROR: failed to solve: process "/bin/sh -c export DEBIAN_FRONTEND=noninteractive && ln -fs /usr/share/zoneinfo/Asia /etc/localtime && apt-get update && apt-get -y --no-install-suggests --no-install-recommends install tzdata sudo curl dante-server iproute2 ca-certificates iptables psmisc cron && dpkg-reconfigure --frontend noninteractive tzdata && echo Ubuntu >> /etc/issue && if [ \"$(uname -m)\" = \"x86_64\" ]; then dpkg -i TopSAP-3.5.2.36.2-x86_64.deb; else dpkg -i TopSAP-3.5.2.36.2-aarch64.deb; fi && rm -r TopSAP-3.5.2.36.2-x86_64.deb TopSAP-3.5.2.36.2-aarch64.deb && apt-get install -y expect && rm -rf /var/lib/apt/lists/*" did not complete successfully: exit code: 1
[imic@imic docker-topsap]$
[imic@imic docker-topsap]$
本人因工作原因,目前已经没有足够时间与精力维护本项目,并且工作变动,已经没有相关 vpn 软件的访问权。
本项目目前整体代码比较简单,现在只有一些兼容性问题需要解决,希望感兴趣的朋友可以加入进项目的维护。
Welcome Login Mode!
Input your server address(example:192.168.74.12:8112): 106.120.220.78:8000
The Client Server is NOT Started.
Please start the Client Server first!
大佬,怎么使用 clash 配置代理呢
乐,最近整了个类似的 https://github.com/inclyc/containerized-topsap
我直接解压 deb 包,没安装,他那里面一大堆灵车脚本(
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.