yrutschle / sslh

Applicative Protocol Multiplexer (e.g. share SSH and HTTPS on the same port)
https://www.rutschle.net/tech/sslh/README.html
GNU General Public License v2.0
4.59k stars 366 forks source link

Wireguard and H/3 #415

Open Avamander opened 12 months ago

Avamander commented 12 months ago

I'm trying to differentiate between Wireguard and H/3 (QUIC) connections on UDP.

But even with this config (that is quite accepting):

     { name: "wireguard"; host: "localhost"; is_udp: true; port: "1443"; log_level: 1 },
     { name: "regex"; host: "localhost"; is_udp: true; port: "8443"; regex_patterns: [ "\x00\x00\x00" ], log_level: 1 }

Quite a few H/3 connections fail. I've also tried reordering the protocols and to manually match Wireguard. I still can't achieve a reliable combination between the two. I'm using nginx as the H/3 server configured as their documentation states.

Is it possible to redirect just Wireguard and not touch anything else on that port?

yrutschle commented 10 months ago

Yes, you can use anyprot instead of regex, and everything that's not matched by other rules will go there.