diff --git a/MLAPI.Relay.sln b/MLAPI.Relay.sln
index 5902f9f..9bf2458 100644
--- a/MLAPI.Relay.sln
+++ b/MLAPI.Relay.sln
@@ -6,9 +6,6 @@ MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MLAPI.Relay", "MLAPI.Relay\MLAPI.Relay.csproj", "{987C1675-41A5-4587-AAC4-F44C2621E337}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{764D72F2-52B9-4EB8-8FF6-5AB4D65CBE2A}"
- ProjectSection(SolutionItems) = preProject
- RelayTransport.cs = RelayTransport.cs
- EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MLAPI.Relay.Transports", "MLAPI.Relay.Transports\MLAPI.Relay.Transports.csproj", "{19F173D4-3166-46CD-9A00-FE0CC7E3AA5A}"
EndProject
diff --git a/MLAPI.Relay/Client.cs b/MLAPI.Relay/Client.cs
index ce223b0..83d07c1 100644
--- a/MLAPI.Relay/Client.cs
+++ b/MLAPI.Relay/Client.cs
@@ -6,7 +6,7 @@ public class Client
{
public bool IsServer { get; set; }
public ulong ConnectionId { get; set; }
- public bool IsInBandwidthGracePeriod => (DateTime.UtcNow - ConnectTime).TotalSeconds >= Program.Config.BandwidthGracePrediodLength;
+ public bool IsInBandwidthGracePeriod => (DateTime.UtcNow - ConnectTime).TotalSeconds >= Program.Config.BandwidthGracePeriodLength;
public DateTime ConnectTime { get; set; }
public ulong OutgoingBytes { get; set; }
}
diff --git a/MLAPI.Relay/MLAPI.Relay.csproj b/MLAPI.Relay/MLAPI.Relay.csproj
index deb997d..6fe4fc5 100644
--- a/MLAPI.Relay/MLAPI.Relay.csproj
+++ b/MLAPI.Relay/MLAPI.Relay.csproj
@@ -11,6 +11,7 @@
0.0.0.2
1.0.0.0
0.0.0.0
+ true
@@ -46,4 +47,16 @@
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+
diff --git a/MLAPI.Relay/Program.cs b/MLAPI.Relay/Program.cs
index b3156c8..8155188 100644
--- a/MLAPI.Relay/Program.cs
+++ b/MLAPI.Relay/Program.cs
@@ -76,7 +76,7 @@ private static void Main(string[] args)
Transport = TransportType.UNET,
AllowTemporaryAlloc = true,
MaxTemporaryAlloc = 1024 * 16,
- BandwidthGracePrediodLength = 60 * 2,
+ BandwidthGracePeriodLength = 60 * 2,
BandwidthLimit = -1,
EnableRuntimeMetaLogging = true,
GracePeriodBandwidthLimit = -1,
@@ -97,7 +97,7 @@ private static void Main(string[] args)
Transport = TransportType.UNET,
BufferSize = 1024 * 8,
AllowTemporaryAlloc = true,
- BandwidthGracePrediodLength = 60 * 2,
+ BandwidthGracePeriodLength = 60 * 2,
BandwidthLimit = -1,
EnableRuntimeMetaLogging = true,
GracePeriodBandwidthLimit = -1,
@@ -115,7 +115,7 @@ private static void Main(string[] args)
Transport = TransportType.UNET,
BufferSize = 1024 * 8,
AllowTemporaryAlloc = true,
- BandwidthGracePrediodLength = 60 * 2,
+ BandwidthGracePeriodLength = 60 * 2,
BandwidthLimit = -1,
EnableRuntimeMetaLogging = true,
GracePeriodBandwidthLimit = -1,
@@ -136,7 +136,7 @@ private static void Main(string[] args)
{
Transport = TransportType.Ruffles,
AllowTemporaryAlloc = true,
- BandwidthGracePrediodLength = 60 * 2,
+ BandwidthGracePeriodLength = 60 * 2,
BandwidthLimit = -1,
BufferSize = 1024 * 8,
EnableRuntimeMetaLogging = true,
diff --git a/MLAPI.Relay/RelayConfig.cs b/MLAPI.Relay/RelayConfig.cs
index 5ed0426..62c62d3 100644
--- a/MLAPI.Relay/RelayConfig.cs
+++ b/MLAPI.Relay/RelayConfig.cs
@@ -7,11 +7,11 @@ namespace MLAPI.Relay
public class RelayConfig
{
[JsonConverter(typeof(StringEnumConverter))]
- public TransportType Transport = TransportType.Ruffles;
+ public TransportType Transport = TransportType.UNET;
public object TransportConfig;
public ushort BufferSize = 1024 * 8;
public bool EnableRuntimeMetaLogging = true;
- public int BandwidthGracePrediodLength = 60;
+ public int BandwidthGracePeriodLength = 60;
public int GracePeriodBandwidthLimit = 4000;
public int BandwidthLimit = 2000;
public bool AllowTemporaryAlloc = true;
diff --git a/MLAPI.Relay/Libs/UNETServerDLL.dll b/MLAPI.Relay/UNETServerDLL.dll
similarity index 100%
rename from MLAPI.Relay/Libs/UNETServerDLL.dll
rename to MLAPI.Relay/UNETServerDLL.dll
diff --git a/MLAPI.Relay/Libs/libUNETServerDLL.dylib b/MLAPI.Relay/libUNETServerDLL.dylib
similarity index 100%
rename from MLAPI.Relay/Libs/libUNETServerDLL.dylib
rename to MLAPI.Relay/libUNETServerDLL.dylib
diff --git a/MLAPI.Relay/Libs/libUNETServerDLL.so b/MLAPI.Relay/libUNETServerDLL.so
similarity index 100%
rename from MLAPI.Relay/Libs/libUNETServerDLL.so
rename to MLAPI.Relay/libUNETServerDLL.so
diff --git a/README.md b/README.md
index d9527ca..e42a9e2 100644
--- a/README.md
+++ b/README.md
@@ -52,3 +52,18 @@ Relay config contains many different fields:
* **bandwidthGracePeriodLength** is the length of the bandwidth grace period from the point when a client connects.
* **gracePeriodBandwidthLimit** is the amount of bytes per second that is allowed during the bandwidth grace period for each client. If this 0 or less, the traffic will not be limited during the grace period.
* **bandwidthLimit** is the amount of bytes per second that is allowed for each client after their respective the grace periods. If this is 0 or less, no limit will be set.
+
+### Quickstart Guide
+
+See below for a basic setup guide for building and deploying the MLAPI relay to a Amazon EC2 instance (Free tier - Windows server 2012)
+
+* Clone the repository
+* Open the MLAPI.Relay.sln file inside an IDE (Visual Studio 2019)
+* Build the release, following the onscreen prompts for the required config
+* Copy the contents of the build directory i.e. bin\release onto the Amazon EC2 instance
+* Install dotnet-sdk-2.2.402-win-x64.exe on the server - https://dotnet.microsoft.com/download/dotnet-core/2.2 (It's also possible to use Mono rather than dotnet)
+* Run "dotnet MLAPI.Relay.dll" in the Release\netcoreapp2.0 folder to start the server
+* Ensure that firewall rules for inbound and outbound traffic have been setup to allow connections for your desired port (default 8888)
+* Ensure the EC2 instance has the correct security settings to allow connections from any IPs you wish to connect to the server
+
+Now you should be ready to connect to the server from unity. This can be achieved with MLAPI by creating an empty game object with the NetworkingManager script (adding the UNET transport) and configuring the settings to match the config.json settings used in the relay. The connect address should be your normal player hosted server address, the relay address should be the address to the relay (has to be set on both client and server). Then enable relaying and use NetworkingManager.Singleton.StartHost() on the Server and NetworkingManager.Singleton.StartClient() on the client and they should connect to the relay.