Refactor peer creation to include geolocation data and server details
This commit is contained in:
@@ -139,19 +139,6 @@ Future<GeolocationData> getGeolocationData() async {
|
||||
}
|
||||
}
|
||||
|
||||
@deprecated
|
||||
/// Get the current WAN IP address of the device.
|
||||
Future<String> getWanIp() async {
|
||||
// Get the IP address of the server. https://api.ipify.org?format=json
|
||||
var ipResponse = await http.get(Uri.parse('https://api.ipify.org?format=json'));
|
||||
if (ipResponse.statusCode == 200) {
|
||||
var ipData = jsonDecode(ipResponse.body);
|
||||
return ipData['ip'] as String;
|
||||
} else {
|
||||
throw Exception('Failed to get server IP address');
|
||||
}
|
||||
}
|
||||
|
||||
/// Check if Wireguard is installed on the system.
|
||||
Future<bool> isWireguardInstalled() async {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user