Files
waylume_server/lib/wireguard/utils.dart
ImBenji e126e6ff94 Initial commit
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-04 15:38:46 +01:00

10 lines
288 B
Dart

import 'dart:io';
Future<String> getServerPublicKey() async {
final result = await Process.run('wg', ['show', 'wg0', 'public-key']);
if (result.exitCode != 0) {
throw Exception('Failed to get server public key: ${result.stderr}');
}
return result.stdout.toString().trim();
}