Auto-format the source directories
Blame Jason for writing Java in vim. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
@@ -40,18 +40,6 @@ public final class WgQuickBackend implements Backend {
|
||||
localTemporaryDir = new File(context.getCacheDir(), "tmp");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getVersion() throws Exception {
|
||||
final List<String> output = new ArrayList<>();
|
||||
if (Application.getRootShell()
|
||||
.run(output, "cat /sys/module/wireguard/version") != 0 || output.isEmpty())
|
||||
throw new Exception("Unable to determine kernel module version");
|
||||
return output.get(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTypeName() { return "Kernel module"; }
|
||||
|
||||
@Override
|
||||
public Config applyConfig(final Tunnel tunnel, final Config config) throws Exception {
|
||||
if (tunnel.getState() == State.UP) {
|
||||
@@ -94,6 +82,20 @@ public final class WgQuickBackend implements Backend {
|
||||
return new Statistics();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTypeName() {
|
||||
return "Kernel module";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getVersion() throws Exception {
|
||||
final List<String> output = new ArrayList<>();
|
||||
if (Application.getRootShell()
|
||||
.run(output, "cat /sys/module/wireguard/version") != 0 || output.isEmpty())
|
||||
throw new Exception("Unable to determine kernel module version");
|
||||
return output.get(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public State setState(final Tunnel tunnel, State state) throws Exception {
|
||||
final State originalState = getState(tunnel);
|
||||
|
||||
Reference in New Issue
Block a user