From e3a42d6b81a3a0d45a8d18348d87016d3cb865a4 Mon Sep 17 00:00:00 2001 From: Alessandro Autiero Date: Sat, 15 Jun 2024 18:23:43 +0200 Subject: [PATCH 1/4] Fixed small bug --- common/lib/src/extension/path.dart | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/common/lib/src/extension/path.dart b/common/lib/src/extension/path.dart index 2f847c3..f5fc2fd 100644 --- a/common/lib/src/extension/path.dart +++ b/common/lib/src/extension/path.dart @@ -23,16 +23,31 @@ extension FortniteVersionExtension on FortniteVersion { return null; } - final lastModified = await result.lastModified(); + final lastModified = await _getLastModifiedTime(result); if(lastModified != _marker) { - print("Applying patch"); await Isolate.run(() => patchHeadless(result)); - await result.setLastModified(_marker); + await _setLastModifiedTime(result); } return result; } + Future _setLastModifiedTime(File result) async { + try { + await result.setLastModified(_marker); + }catch(_) { + // Ignored + } + } + + Future _getLastModifiedTime(File result) async { + try { + return await result.lastModified(); + }catch(_) { + return null; + } + } + File? get launcherExecutable => findExecutable(location, "FortniteLauncher.exe"); File? get eacExecutable => findExecutable(location, "FortniteClient-Win64-Shipping_EAC.exe"); From 47adb572ea234602fe37a3d7e5d19ab7ab4b9276 Mon Sep 17 00:00:00 2001 From: Alessandro Autiero Date: Sat, 15 Jun 2024 18:40:46 +0200 Subject: [PATCH 2/4] Added back logging --- common/lib/src/util/process.dart | 9 +++------ gui/lib/src/widget/game_start_button.dart | 1 - 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/common/lib/src/util/process.dart b/common/lib/src/util/process.dart index 77fccb1..204c48e 100644 --- a/common/lib/src/util/process.dart +++ b/common/lib/src/util/process.dart @@ -202,7 +202,7 @@ Future watchProcess(int pid) async { return await completer.future; } -List createRebootArgs(String username, String password, bool host, GameServerType hostType, bool log, String additionalArgs) { +List createRebootArgs(String username, String password, bool host, GameServerType hostType, String additionalArgs) { if(password.isEmpty) { username = '${_parseUsername(username, host)}@projectreboot.dev'; } @@ -223,14 +223,11 @@ List createRebootArgs(String username, String password, bool host, GameS "-AUTH_TYPE=epic" ]; - if(log) { - args.add("-log"); - } - if(host) { args.addAll([ "-nosplash", - "-nosound" + "-nosound", + "-log" ]); if(hostType == GameServerType.headless){ args.add("-nullrhi"); diff --git a/gui/lib/src/widget/game_start_button.dart b/gui/lib/src/widget/game_start_button.dart index 27dedcb..9dd2d1c 100644 --- a/gui/lib/src/widget/game_start_button.dart +++ b/gui/lib/src/widget/game_start_button.dart @@ -239,7 +239,6 @@ class _LaunchButtonState extends State { _gameController.password.text, host, hostType, - false, "" ); log("[${host ? 'HOST' : 'GAME'}] Generated game args: ${gameArgs.join(" ")}"); From 0d642516235f4ba9df0e301f8505732ef2dc992f Mon Sep 17 00:00:00 2001 From: Alessandro Autiero Date: Sat, 15 Jun 2024 18:48:42 +0200 Subject: [PATCH 3/4] Reversed logging --- common/lib/src/util/process.dart | 9 ++++++--- gui/lib/src/widget/game_start_button.dart | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/common/lib/src/util/process.dart b/common/lib/src/util/process.dart index 204c48e..77fccb1 100644 --- a/common/lib/src/util/process.dart +++ b/common/lib/src/util/process.dart @@ -202,7 +202,7 @@ Future watchProcess(int pid) async { return await completer.future; } -List createRebootArgs(String username, String password, bool host, GameServerType hostType, String additionalArgs) { +List createRebootArgs(String username, String password, bool host, GameServerType hostType, bool log, String additionalArgs) { if(password.isEmpty) { username = '${_parseUsername(username, host)}@projectreboot.dev'; } @@ -223,11 +223,14 @@ List createRebootArgs(String username, String password, bool host, GameS "-AUTH_TYPE=epic" ]; + if(log) { + args.add("-log"); + } + if(host) { args.addAll([ "-nosplash", - "-nosound", - "-log" + "-nosound" ]); if(hostType == GameServerType.headless){ args.add("-nullrhi"); diff --git a/gui/lib/src/widget/game_start_button.dart b/gui/lib/src/widget/game_start_button.dart index 9dd2d1c..27dedcb 100644 --- a/gui/lib/src/widget/game_start_button.dart +++ b/gui/lib/src/widget/game_start_button.dart @@ -239,6 +239,7 @@ class _LaunchButtonState extends State { _gameController.password.text, host, hostType, + false, "" ); log("[${host ? 'HOST' : 'GAME'}] Generated game args: ${gameArgs.join(" ")}"); From 2df1b8148534b0056e7c01cf68403a70aa85f5cf Mon Sep 17 00:00:00 2001 From: Alessandro Autiero Date: Sat, 6 Jul 2024 18:33:22 +0200 Subject: [PATCH 4/4] Port Forwarding documentation --- documentation/en/PortForwarding,md | 37 ++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 documentation/en/PortForwarding,md diff --git a/documentation/en/PortForwarding,md b/documentation/en/PortForwarding,md new file mode 100644 index 0000000..8761dc2 --- /dev/null +++ b/documentation/en/PortForwarding,md @@ -0,0 +1,37 @@ +# How can I make my server accessible to other players? + +### 1. Set a static IP + +Set a static IP on the PC hosting the game server and copy it for later: + +- [Windows 11](https://pureinfotech.com/set-static-ip-address-windows-11/) +- [Windows 10](https://pureinfotech.com/set-static-ip-address-windows-10/) + + +### 2. Log into Your Router + +You'll need to access your router's web interface at 192.168.1.1. +You might need a username and a password to log in: refer to your router's manual for precise instructions. + +### 3. Find the Port Forwarding Section + +Once logged in, navigate to the port forwarding section of your router's settings. +This location may vary from router to router, but it's typically labelled as "Port Forwarding," "Port Mapping," or "Virtual Server." +Refer to your router's manual for precise instructions. + +### 4. Add a Port Forwarding Rule + +Now, you'll need to create a new port forwarding rule. Here's what you'll typically need to specify: + +- **Service Name:** Choose a name for your port forwarding rule (e.g., "Fortnite Game Server"). +- **Port Number:** Enter 7777 for both the external and internal ports. +- **Protocol:** Select the UDP protocol. +- **Internal IP Address:** Enter the static IP address you set earlier. +- **Enable:** Make sure the port forwarding rule is enabled. + +### 5. Save and Apply the Changes + +After configuring the port forwarding rule, save your changes and apply them. +This step may involve clicking a "Save" or "Apply" button on your router's web interface. + +### 6. Try hosting a game! \ No newline at end of file