Refactor peer creation to include geolocation data and server details
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user