XTLS / Xray-core

Xray, Penetrates Everything. Also the best v2ray-core, with XTLS support. Fully compatible configuration.
https://t.me/projectXray
Mozilla Public License 2.0
25.88k stars 3.98k forks source link

Add domain names support in WireGuard configs #3892

Closed Anderhar closed 1 month ago

Anderhar commented 1 month ago

Integrity requirements

Description

If WireGuard provider uses domain name as an endpoint instead of a regular static IP, xray (as well as sing-box) cannot resolve it which leads to connection failure.

Personally tested with v2rayNG.

Notably, the AmneziaVPN developers also discovered this problem and have already solved it in the recent release.

Reproduction Method

Try connecting to Widscribe VPN provider. In it's WG configs endpoint looks like lux-123-wg.whiskergalaxy.com:443, and you'll see that xray doesn't seem to know what to do with it. But if you resolve domain manually and put the resulting IP in coresponding field of the xray config, connection will be established.

Client config

Not providing my config just because it has to contain my personal credentials of the Windscribe user to be functional (sorry). Though, it is easily reproducible.

Server config



Client log



Server log



Fangliding commented 1 month ago

I have a warp config generate bot and it have no problem with "endpoint": "engage.cloudflareclient.com:2408" Considering that you have not provided any useful additional information, not following template, I can't fix anything

Anderhar commented 1 month ago

I have a warp config generate bot and it have no problem with "endpoint": "engage.cloudflareclient.com:2408" Considering that you have not provided any useful additional information, not following template, I can't fix anything

Tested more carefully: indeed impurity of my experiment. The main tests were made for sing-box (really affected) and were extrapolated to xray just by my oversight. Please pardon me for the false accusation against your great work!