Refactor peer creation to include geolocation data and server details

This commit is contained in:
ImBenji
2025-08-05 18:37:10 +01:00
parent 5de98ec501
commit 62853ca63a
3 changed files with 18 additions and 28 deletions

View File

@@ -50,15 +50,6 @@ PersistentKeepalive = 25
}
}
Future<String> generateClientConfigForPeer(WireGuardPeer peer) async {
String serverEndpoint = '${await getWanIp()}:51820';
String serverPublicKey = await getServerPublicKey();
return peer.generateClientConfig(
serverPublicKey: serverPublicKey,
serverEndpoint: serverEndpoint,
);
}
/// Creates a new WireGuard peer and returns the peer info
Future<WireGuardPeer> createPeer() async {