-
Notifications
You must be signed in to change notification settings - Fork 4k
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
[critical] xray + wireguard confuses certificates when opening multiple tabs simultaneously. #4025
Comments
The investigation is good, but I didn't see the configuration and log |
@Fangliding Everything is set to default there; it's easier to look at the picture. |
Anyway, it is needed because writing another configuration is annoying and may miss some information (but just assume that this problem does not exist) |
If you are using x3-ui, then indeed, by looking at the picture, you can literally reproduce the environment. Everything is set to default there. I think you need this, the complete config. I only trimmed the serverUrl and Keys.
I will provide and explain everything you need; feel free to ask. |
It seems that it is the same problem I've had before. #3948 @Fangliding |
@hr567 |
dup |
Integrity requirements
Description
v24.11.11
After 26 hours of and 5 updates (#4022) to my investigation, I found the problem!
The main problem is that with high parallelism, xray + wireguard are mixing up the site certificates.
Here's what the problem looks like. I opened about 30 websites simultaneously without caches. As we can see, a couple of websites returned an error stating that the certificates do not match.
The interesting thing about the error on this site is that the certificate actually belongs to a neighboring site:
After countless combinations and usage variations, I found a scenario in which this bug appears.
This is a variation when using the inbound WireGuard protocol + sniffing. I try with 3 clients (WG official | WireSock | ASUS WG).
Additional information and interesting points that will also help you understand that the problem with xray + wireguard.
This indicates that the xray sniffer + WireGuard correctly identifies the domains (IP <-> DOMAIN), BUT it incorrectly processes the domains cannot properly parse the packets/frames (I'm not sure what it's called) and make the correct routing.
I replaced the WireGuard Inbound in the above setup with VLESS without changing anything else. And you know what? Everything started working perfectly; there were no ".ru" domains in the logs on SERVER2. It worked flawlessly when opening more than 100 tabs simultaneously.
In summary,
The problem in the parsing/processing/routing of packets/frames (I'm not sure what it's called) when using WireGuard Inbound with Sniffer. You should take a look at the piece of code that is responsible for this.
Reproduction Method
For a quick understanding of whether this has been fixed, refer to the image with two server above. The first server has WireGuard inbound with a sniffer and blocking domains like ".com," and there should be no ".com" domains in the logs on the second server. This will already be a sign that you are fixing the issue in the right place.
Client config
Server config
Client log
Server log
The text was updated successfully, but these errors were encountered: