Generated config is not working with Wireguard on Android
When I pay for VPN I got option to scan qr code or I get the .txt file.
-
I cannot scan QR code from phone when I bought this via the very same phone. (Screenshot workaround is not working, Wireguard does not allow scan qr from file.)
-
The exported file is .txt but Wireguard requires .conf or .zip
-
When I rename .txt to .conf I get error:
Unable to import tunnel: Invalid name -
Workaround to manually copy-paste all info works.
Thanks for the feedback.
We are aware of this Android related problem and tried to fix it many times. But it seems there is no way as some Android version do not support .conf extensions and change it to .txt. iOS is not affected.
Maybe it is possible to change the wireguard config file name to "wireguard.zip". I will do some tests.
We also give 300k Sats if someone manages to solve this problem.
What is the recommended setup for test/debug, android versions where this is an issue and whatnot?
Instead of having a download button that triggers some JS to initialize the download, you could have a HTML link that "links" inline to a base64 encoded version of the config like in this demo. The download attribute sets the destination file name. Works on my android device where LNVPN was broken in the same way.
<a href="data:application/octet-stream;charset=utf-8;base64,Zm9vIGJhcg==" download="test.conf">test file</a>
Maybe I'm misunderstanding though and the .txt ext is intentional to the DL doesn't get blocked on some Android versions?
That sounds like a good idea and promising. I will do some tests. Maybe @anton-isidore could test @elsirion link too.
Instead of (not) using type: 'text/plain' which is commented out, it will work with type: 'application/octet-stream'.
Ok that would be a even better idea. I already changed it and tested for iOS and it worked. So if some could give feedback for Android?
And please provide a Lightning invoice or LNURL to get reimbursed for your testing.
Ok that would be a even better idea. I already changed it and tested for iOS and it worked. So if some could give feedback for Android?
Works for me now :tada: Downloads a Wireguard.conf that can be imported.
Would be nice if the file had a more descriptive/unique name that is also a valid tunnel name. I had the problem that I downloaded a second such file which was renamed to Wireguard(1).conf, which isn't a valid tunnel name and could not be imported into wireguard for android.
So it seems that the issue is solved now.
I will implement a better wording for the config file. Like: usa-server-one-hour. I have to figure out what is allowed. Thanks for the advice. Good idea!