PinkD / corplink-rs

使用 rust 实现的飞连客户端
GNU General Public License v2.0
217 stars 30 forks source link

v2.0.10 开始使用 tcp 连接 #2

Closed PinkD closed 1 month ago

PinkD commented 2 years ago

1 中 @ttys3 反馈道,飞连在 v2.0.10 版本开始使用 tcp 连接 wireguard ,通过查看 log 可以发现新增了 tunc_linux.go ,之前使用的是 tun_linux.go

从网络连接和抓包结果也可以确认,新版本只有 tcp 连接了

PinkD commented 2 years ago

https://github.com/PinkD/corplink-rs/commit/3ae24f9db6ad35c297b95d1bd66c00ad037ae353#diff-7f93c4e263c4e9ec748f804c7fd04a3b2fde86ffd741fb5516d67e1097bae4c1R446-R454

https://github.com/PinkD/corplink-rs/blob/3ae24f9db6ad35c297b95d1bd66c00ad037ae353/src/client.rs#L446-L454

1.4 版本加了个过滤非 udp vpn 的判断

jixiuf commented 1 year ago

最近有支持的计划吗 Edit: 运行后 发现公司内网的网站可以访问了,但是像google等需要梯子的网站都打不开 (mac上可以),不知是不是跟这个issue相关

PinkD commented 1 year ago

最近有支持的计划吗

没有,这个是开发来我自己用的,然后 udp 暂时够用了,就没有搞 tcp 了 🤣 如果你有空闲时间,欢迎 pr

运行后 发现公司内网的网站可以访问了,但是像google等需要梯子的网站都打不开 (mac上可以),不知是不是跟这个issue相关

大概率不是,能访问内网就说明程序在正常运行,如果公司配了 google 的透明代理,那可能要把 google 的路由指向 corplink 的接口才行。例如我要让 8.8.8.8corplink 接口,那就 ip route add 8.8.8.8/32 dev corplink

PinkD commented 1 month ago

我司终于也干掉了 udp 服务器,只留了 tcp ,今天研究了一下,先加了个 bind_tcp.go ,然后发现连不上 看了下以前抓的包,应该是在每个包之前加了个 uint32 的 size ,我再改改 image

PinkD commented 1 month ago

附上原版 wg 的 udp 包 image

PinkD commented 1 month ago

fixed by https://github.com/PinkD/corplink-rs/commit/445c4c59638c4b69b5992559d140006e54d4929c 升级到 5.0 及以上的版本即可