Add a new feature to import a tunnel from a saved QR image, this feature
integrates into 'import from file' flow, however adds a condition, if
file is an image, attempt to parse it as QR image file.
My use case for this feature, is to allow easier sharing of tunnels to
family. Scanning QR code is ok when you have an external display to
show it, but if you sent QR code to someone, there is no way to import
it in the app. If you share a config file, that becomes way harder for
a non-technical person to import as now they need to find a file with
that name in the file picker etc etc, Where the images are very visible
in the file picker, and user can easily recognize it for import.
Testing:
- Click "+" blue button, try to import a valid `.conf` file - the
'original' file flow should not be affected
- Click "+" blue button, try to import a valid QR code image - if QR
code was parsed, then a new tunnel will be added.
- Click "+" blue button, try to import an invalid QR code image - Error
message will be shown
Signed-off-by: Nikita Pustovoi <deishelon@gmail.com>
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Fix the test by changing the DNS to a string with an invalid char in the
`invalid-value.conf` test configuration file.
Signed-off-by: Michal Murin <michal.murin@jamf.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Nathan Chance dropped the ball repeatedly and never maintained this in a
consistent way that anybody could use. With Android 12 out now, just
drop it all together. A bummer, but I don't see much of a choice.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
- The `copied_to_clipboard` translation for Farsi does not include
the placeholder, so it has been removed.
- A couple lints that are errors but we cannot particularly do anything about
were downgraded to warnings.
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
wg-quick has supported this for a while, but not the config layer, and
not the Go backend, so wire this all up.
Requested-by: Alexis Geoffrey <alexis.geoffrey97@gmail.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This should've been updated when we switched the distribution type to -bin
Fixes: a23c57bab0 ("gradle: switch to -bin distribution")
Reported-by: Vladimir Nikishkin <lockywolf@gmail.com>
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
-all is a noticeably larger distribution than -bin and the sources
it packages can be fetched on-demand by IDEs.
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This has several problems: 1) it blocks the main thread; 2) it doesn't
distinguish between a permanent error and a transient one; 3) the 10
seconds is hard coded; 4) there's no way for the user to cancel it.
We'll have to improve this.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>