Add WireGuard VPS sync bootstrap flow
This commit is contained in:
@@ -93,4 +93,18 @@ public class WireGuardVpsService {
|
||||
|
||||
return result.stdout();
|
||||
}
|
||||
|
||||
public String showAllowedIps() {
|
||||
SshCommandResult result = sshService.executeOnConfiguredVps(
|
||||
"sudo /usr/local/sbin/lr-wg-used-ips"
|
||||
);
|
||||
|
||||
if (result.exitCode() != 0) {
|
||||
throw new SshCommandException(
|
||||
"Failed to query WireGuard allowed IPs: " + result.stderr()
|
||||
);
|
||||
}
|
||||
|
||||
return result.stdout();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user