Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

udp tunnel not work #380

Closed
czzhao95 opened this issue Nov 19, 2024 · 9 comments
Closed

udp tunnel not work #380

czzhao95 opened this issue Nov 19, 2024 · 9 comments

Comments

@czzhao95
Copy link

Describe the goal

Test udp tunnel by wstunnel

Describe what does not work

  • pc_1
    Has a UDP server with port 9999. Run the wstunnel client and perform remote port forwarding.
wstunnel client -R udp://10000:127.0.0.1:9999 ws://172.29.7.73:12345
  • pc_2
    As a wstunnel server, IP is 172.29.7.73.
wstunnel server ws://0.0.0.0:12345

Failed to communicate with the UDP server on 127.0.0.1:10000 on pc_2.

Describe your wstunnel setup

  • client
    wstunnel client -R udp://10000:127.0.0.1:9999 ws://172.29.7.73:12345
  • server
    wstunnel server ws://0.0.0.0:12345

Desktop (please complete the following information):

  • OS: [ubuntu]
  • Version [20]
@Da-Teach
Copy link

Da-Teach commented Dec 5, 2024

It's a bug, when running v10.1.16 UDP does not work, installed 9.7.4 and UDP works again. Tested this with a Windows client and an Ubuntu host and tunneling Wireguard data.

@czzhao95
Copy link
Author

czzhao95 commented Dec 6, 2024

It's a bug, when running v10.1.16 UDP does not work, installed 9.7.4 and UDP works again. Tested this with a Windows client and an Ubuntu host and tunneling Wireguard data.这是一个错误,运行 v10.1.16 时 UDP 不起作用,安装 9.7.4 后 UDP 又可以工作了。使用 Windows 客户端和 Ubuntu 主机以及隧道 Wireguard 数据对此进行了测试。

Thanks for the reminder. I tried it, and version 9.7.4 works fine.

@erebe
Copy link
Owner

erebe commented Dec 6, 2024

Hello,

I am busy with familly affairs at the moment, so i am going to take a look at a later time.

Does the bug only happens with reverse tunnel ?
Would you mind sharing some log with TRACE verbosity enabled ?

@niknah
Copy link

niknah commented Dec 6, 2024

It's ok for me on v10.1.6

After starting the wstunnels.
On pc_1 run...
nc -ul 9999
On pc_2 run...
echo 'themessage' | nc -u 10000

You should get the message on pc_1

@czzhao95
Copy link
Author

czzhao95 commented Dec 9, 2024

Hello, 你好,

I am busy with familly affairs at the moment, so i am going to take a look at a later time.我现在正忙着家里的事情,所以稍后再去看看。

Does the bug only happens with reverse tunnel ?该错误是否只发生在反向隧道中? Would you mind sharing some log with TRACE verbosity enabled ?您介意在启用 TRACE 详细程度的情况下共享一些日志吗?

Hello, thanks for your reply.
Yes, forward tunnel is ok.
Here are the logs
server
image
client
image

@czzhao95
Copy link
Author

czzhao95 commented Dec 9, 2024

It's ok for me on v10.1.6我的 v10.1.6 没问题

After starting the wstunnels.启动 wstunnels 后。 On pc_1 run... 在 pc_1 上运行... nc -ul 9999 On pc_2 run... 在 pc_2 上运行... echo 'themessage' | nc -u 10000

You should get the message on pc_1您应该在 pc_1 上收到消息

Did you use the forward tunnel or reverse tunnel? I found that only reverse tunnel does not work.

@niknah
Copy link

niknah commented Dec 9, 2024

Did you use the forward tunnel or reverse tunnel? I found that only reverse tunnel does not work.

Reverse. Ubuntu 24.04 on both.

In your screen shots you're missing the bits to the right. It's best to copy and paste from the screen instead of doing screen shots.

Another thing to try is on pc_1 run sudo tcpdump -i lo -nl port 10000
pc_2 sudo tcpdump -i lo -nl port 9999

See if anything is being sent or received.

erebe added a commit that referenced this issue Dec 11, 2024
Correctly set the correct destination in the udp connector
@erebe
Copy link
Owner

erebe commented Dec 11, 2024

Should be fixed in the latest release
https://github.com/erebe/wstunnel/releases/tag/v10.1.7

Let me know if it is not the case

@czzhao95
Copy link
Author

Should be fixed in the latest release应该在最新版本中修复 https://github.com/erebe/wstunnel/releases/tag/v10.1.7

Let me know if it is not the case如果情况并非如此,请告诉我

I tried, the bug is fixed in v10.1.7.

@erebe erebe closed this as completed Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants