Add domain names support in WireGuard configs
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
- [ ] I am a sponsor
Integrity requirements
- [X] I confirm that I have read the documentation, understand the meaning of all the configuration items I wrote, and did not pile up seemingly useful options or default values.
- [X] I confirm that I have provided the server and client configuration files and process that can be reproduced locally, instead of a complicated client configuration file that has been stripped of sensitive data.
- [X] I confirm that I have provided the simplest configuration that can be used to reproduce the error I reported, instead of depending on remote servers, TUN, graphical interface clients, or other closed-source software.
- [X] I confirm that I have provided the complete configuration files and logs, rather than just providing parts I think are useful out of confidence in my own intelligence.
Edit: Xray is actually not affected and performs the same task correctly, so the issue only applies to sing-box (retested both).
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.