<feat: New project structure>

<feat: New release>
This commit is contained in:
Alessandro Autiero
2023-09-02 15:34:15 +02:00
parent 64b33102f4
commit b41e22adeb
953 changed files with 1373072 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
import 'dart:io';
import 'package:reboot_common/common.dart';
bool isLocalHost(String host) => host.trim() == "127.0.0.1"
|| host.trim().toLowerCase() == "localhost"
|| host.trim() == "0.0.0.0";
Future<bool> isPortFree(int port) async {
try {
final server = await ServerSocket.bind(InternetAddress.anyIPv4, port);
await server.close();
return true;
} catch (e) {
return false;
}
}
Future<void> resetWinNat() async {
var binary = File("${authenticatorDirectory.path}\\winnat.bat");
await runElevatedProcess(binary.path, "");
}