SagerNet / sing-box

The universal proxy platform
https://sing-box.sagernet.org/
Other
20.04k stars 2.38k forks source link

Add domain names support in WireGuard configs #2163

Closed Anderhar closed 5 days ago

Anderhar commented 1 month ago

Operating system

Android

System version

any

Installation type

see below

If you are using a graphical client, please provide the version of the client.

see below

Version

see below

Description

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

Personally tested with Box for Magisk 1.7.1 , Hiddify 2.1.5 , Husi 0.8.6 on Android, but there is the similar report from Windows user as well.

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

Reproduction

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 sing-box doesn't seem to know what to do with it. But if you resolve domain manually and put the resulting IP in the "server:" field of the sing-box config, connection will be established.

Logs

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.

Supporter

Integrity requirements

Anderhar commented 1 month ago

Edit: Xray is actually not affected and performs the same task correctly, so the issue only applies to sing-box (retested both).

Anderhar commented 5 days ago

I would like to know why the issue was tagged as spam. Because the problem itself is real and well known, otherwise the developers of Xray and Amnezia wouldn't have addressed it, and sing-box shouldn't fall behind.

If I have not satisfied some very necessary criteria – please point it out so I can work on it. I wouldn't want my personal underperformance to become a roadblock. Sorry.