heiher / hev-socks5-tunnel

A high-performance tun2socks for Linux/Android/FreeBSD/macOS/iOS/WSL2 (IPv4/IPv6/TCP/UDP)
MIT License
636 stars 130 forks source link

和shadowsocks-rust连接的时候,udp连接有问题,数据传输失败 #121

Closed Yewenyu closed 1 month ago

Yewenyu commented 1 month ago

如题

`tunnel: mtu: 9000 multi-queue: true

socks5: port: 7890 address: ::1 udp: 'udp'

misc: task-stack-size: 4096 connect-timeout: 2000 read-write-timeout: 2000 `

tun2socks log:

log 3.log

ssrust log: log.log

heiher commented 1 month ago

根据我的实验,看上去是shadowsocks-rust的实现存在问题,当配置为local_address: 0.0.0.0时,通过局域网其它主机访问udp是不通的。而当配置为local_address: 192.168.0.1时,通过局域网段192.168.0.0/24的其它主机访问则没问题。

Yewenyu commented 1 month ago

192.168.0.1 是路由地址吧,还是本机在局域网的地址?

heiher commented 1 month ago

192.168.0.1 是路由地址吧,还是本机在局域网的地址?

本机局域网地址

Yewenyu commented 1 month ago

192.168.0.1 是路由地址吧,还是本机在局域网的地址?

本机局域网地址

还是不行,不过确实shadowsocks-rust的问题,我用其他tun2socks也不行

Yewenyu commented 1 month ago

192.168.0.1 是路由地址吧,还是本机在局域网的地址?

本机局域网地址

请问 mode 那里填了 tcp是变成了 udp over tcp吗

heiher commented 1 month ago

192.168.0.1 是路由地址吧,还是本机在局域网的地址?

本机局域网地址

还是不行,不过确实shadowsocks-rust的问题,我用其他tun2socks也不行

我这测试可以,不过我这ss-rust只是socks5本地代理模式,没有上游。可能是你那的上游不支持吧

heiher commented 1 month ago

192.168.0.1 是路由地址吧,还是本机在局域网的地址?

本机局域网地址

请问 mode 那里填了 tcp是变成了 udp over tcp吗

对,但udp over tcp需要配合hev-socks5-server的服务端。

Yewenyu commented 1 month ago

192.168.0.1 是路由地址吧,还是本机在局域网的地址?

本机局域网地址

请问 mode 那里填了 tcp是变成了 udp over tcp吗

对,但udp over tcp需要配合hev-socks5-server的服务端。

hev-socks5-server 可以用在移动端吗,应该怎么配置

heiher commented 1 month ago

192.168.0.1 是路由地址吧,还是本机在局域网的地址?

本机局域网地址

请问 mode 那里填了 tcp是变成了 udp over tcp吗

对,但udp over tcp需要配合hev-socks5-server的服务端。

hev-socks5-server 可以用在移动端吗,应该怎么配置

可以跑在移动端,不过这是什么场景?

Yewenyu commented 1 month ago

192.168.0.1 是路由地址吧,还是本机在局域网的地址?

本机局域网地址

请问 mode 那里填了 tcp是变成了 udp over tcp吗

对,但udp over tcp需要配合hev-socks5-server的服务端。

hev-socks5-server 可以用在移动端吗,应该怎么配置

可以跑在移动端,不过这是什么场景?

我想试试能不能用udp over tcp连上shadowsocks-rust

heiher commented 1 month ago

192.168.0.1 是路由地址吧,还是本机在局域网的地址?

本机局域网地址

请问 mode 那里填了 tcp是变成了 udp over tcp吗

对,但udp over tcp需要配合hev-socks5-server的服务端。

hev-socks5-server 可以用在移动端吗,应该怎么配置

可以跑在移动端,不过这是什么场景?

我想试试能不能用udp over tcp连上shadowsocks-rust

可以用ss协议作为hev-socks5-tunnel和hev-socks5-server的桥梁,直接在hev-socks5-tunnel和ss-rust之间使用udp-over-tcp不行。