omnip icon indicating copy to clipboard operation
omnip copied to clipboard

Tunnel UDP

Open cornzzy opened this issue 1 year ago • 13 comments

Is UDP over QUIC available? Any way to tunnel wireguard on this setup?

client -> server1 omni client -> server2 omni and wg server

cornzzy avatar Sep 27 '24 05:09 cornzzy

Currently UDP tunneling is not supported, I am working on something related to that though. I am curious about your use case, can you elaborate on that a little bit?

neevek avatar Sep 28 '24 01:09 neevek

Wireguard directly is blocked and it uses UDP. I use server1 as a middle local server which listens on UDP from client wireguard and sends it as QUIC to abroad server2. udp2raw does it but it's not QUIC.

cornzzy avatar Sep 28 '24 06:09 cornzzy

Wireguard directly is blocked and it uses UDP. I use server1 as a middle local server which listens on UDP from client wireguard and sends it as QUIC to abroad server2. udp2raw does it but it's not QUIC.

Well this will be supported soon, as the UDP over QUIC part is already implemented in the rstun project, which omnip depends on to support all the over-QUIC tunneling.

neevek avatar Sep 29 '24 00:09 neevek

Does that mean I can use rstun right now for UDP? I thought it only handles TCP. This part of the readme is why I made this issue: image

cornzzy avatar Sep 29 '24 05:09 cornzzy

Does that mean I can use rstun right now for UDP? I thought it only handles TCP. This part of the readme is why I made this issue: image

The code that implements UDP tunneling is not merged into master branch yet, the README is also not updated. Anyway I just released a beta version that includes the feature, check it out here and give it a try, it will be great if you can report back later.

neevek avatar Sep 30 '24 11:09 neevek

It seems like QUIC is blocked on my "internet". These can affect it:

  • set fingerprint, for example chrome, firefox or google apps.
  • set SNI

If this is in your interest, I can try again with different fingerprint and SNI. It could also be wireguard MTU. What MTU should I set? Currently it's 1420. Here is the log, tunnel is created but packets drop on strict internet.

image

cornzzy avatar Oct 01 '24 05:10 cornzzy

It seems like QUIC is blocked on my "internet". These can affect it:

  • set fingerprint, for example chrome, firefox or google apps.
  • set SNI

If this is in your interest, I can try again with different fingerprint and SNI. It could also be wireguard MTU. What MTU should I set? Currently it's 1420. Here is the log, tunnel is created but packets drop on strict internet.

image

I think it is most probably related to MTU, try setting it to 1200.

neevek avatar Oct 01 '24 06:10 neevek

The lowest MTU wg accepts is 1280, same log happened with 1280. Also tried shadowsocks TCP with the previous version and the same things happens.

cornzzy avatar Oct 01 '24 06:10 cornzzy

@cornzzy check out this one, and if possible let me know if it works as expected.

neevek avatar Oct 13 '24 13:10 neevek

Awesome, it works on 1420 MTU and with great speed. I'm going to put 40 clients on it and see if it gets detected and blocked by DPI.

There are some warnings but I don't know if its a problem. 2024-10-14 00:39:28.228 [rstunc] [rstun::udp::udp_tunnel:145] [W] failed to read for udp, err: unexpected end of file 2024-10-14 04:21:13.228 [rstund] [rstun::udp::udp_tunnel:274] [W] failed to read from udp packet from tunnel, err: unexpected end of file

As a side note, it would be great if dns was moved to options like --dns 9.9.9.9 or --dns https://dns.quad9.net/dns-query. This is too opinionated: image

cornzzy avatar Oct 14 '24 04:10 cornzzy

Awesome, it works on 1420 MTU and with great speed. I'm going to put 40 clients on it and see if it gets detected and blocked by DPI.

Good to hear that. By the way, what kind of DPI system you are testing against?

As a side note, it would be great if dns was moved to options like --dns 9.9.9.9 or --dns https://dns.quad9.net/dns-query. This is too opinionated: image

Sure, I will fix that in later release.

neevek avatar Oct 14 '24 11:10 neevek

Government censorships (Ir‌‌a‌‌‌‌n), but I believe it's the same as C‌hi‌n‌‌‌‌a if not worse.

I tried many tunnels such as chisel (ssh), wstunnel (websocket), pingtunnel (icmp) and they all get blocked within days. Some xray/v2ray stuff and udp2raw work but bad performance. Let's see how this one goes 😊

cornzzy avatar Oct 14 '24 13:10 cornzzy

Well, I don't think this one would be that different compared to those you tried in terms of security, many of those use TLS with known cipher suites. It's like normal HTTP 3.

neevek avatar Oct 14 '24 14:10 neevek

Yes it went out. It was worth trying. It had the highest speed I've seen while it lasted.

image image image

cornzzy avatar Oct 15 '24 03:10 cornzzy

@cornzzy udp tunneling is supported in latest release of omnip with udp:// and udp+quic://.

neevek avatar Nov 03 '24 14:11 neevek