🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
10 lines
288 B
Dart
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();
|
|
} |