yinghuocho / gotun2socks

A Golang implementation of tun2socks
BSD 2-Clause "Simplified" License
290 stars 103 forks source link

UDP loopback IP transport problems #6

Open dogfight360 opened 7 years ago

dogfight360 commented 7 years ago

Listen to loopback IP:127.0.0.1 TCP and UDP work properly

but Listen to loopback IP:127.0.0.2 or 2-255 TCP is working properly, UDP can not be transport

send Application.UDP------>gotun2socks------>server------>target recv Application.UDP--x---<gotun2socks------<server------<target

The packet passes through the server and returns But there is no return from the gotun2socks to the Application

yinghuocho commented 7 years ago

@wu360463231 I just fixed a bug in gotun2socks's UDP processing, which may cause the problem you described. Please update the code and test again and let me know the result. Thanks.

dogfight360 commented 7 years ago

UDP Still does not work Socks5 listen to loopback IP: 127.0.0.2 or 2-255

yinghuocho commented 7 years ago

I tried to listen socks5 proxy on 127.0.0.2. UDP tunnelling worked fine.

dogfight360 commented 7 years ago

May be shadowsocksR c# client error? but openvpn UDP mode working