Initial commit
🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
10
lib/wireguard/utils.dart
Normal file
10
lib/wireguard/utils.dart
Normal file
@@ -0,0 +1,10 @@
|
||||
|
||||
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();
|
||||
}
|
||||
Reference in New Issue
Block a user