Skip to content

Commit 3dfc999

Browse files
committed
Removed UPnP port mapping.
1 parent 9389c1c commit 3dfc999

File tree

6 files changed

+2
-119
lines changed

6 files changed

+2
-119
lines changed

MLAPI/Data/NetworkingConfiguration.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ public class NetworkingConfiguration
2727
//Should only be used for dedicated servers and will require the servers RSA keypair being hard coded into clients in order to exchange a AES key
2828
//TODO
2929
public bool EncryptMessages = false;
30-
public bool UseUPnP = false;
31-
public Action<bool, IPAddress> UPnPCompleteCallback = null;
3230

3331
//Cached config hash
3432
private byte[] ConfigHash = null;

MLAPI/Helper/UPnPHelper.cs

Lines changed: 0 additions & 87 deletions
This file was deleted.

MLAPI/MLAPI.csproj

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,8 @@
3434
<WarningLevel>4</WarningLevel>
3535
</PropertyGroup>
3636
<ItemGroup>
37-
<Reference Include="Open.Nat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f22a6a4582336c76, processorArchitecture=MSIL">
38-
<HintPath>..\packages\Open.NAT.2.1.0.0\lib\net35\Open.Nat.dll</HintPath>
39-
</Reference>
4037
<Reference Include="System" />
4138
<Reference Include="System.Core" />
42-
<Reference Include="System.Threading, Version=1.0.2856.102, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
43-
<HintPath>..\packages\Open.NAT.2.1.0.0\lib\net35\System.Threading.dll</HintPath>
44-
</Reference>
4539
<Reference Include="System.Xml.Linq" />
4640
<Reference Include="System.Data.DataSetExtensions" />
4741
<Reference Include="System.Data" />
@@ -52,7 +46,6 @@
5246
</Reference>
5347
</ItemGroup>
5448
<ItemGroup>
55-
<Compile Include="Helper\UPnPHelper.cs" />
5649
<Compile Include="MonoBehaviours\Core\NetworkedBehaviour.cs" />
5750
<Compile Include="Data\NetworkedClient.cs" />
5851
<Compile Include="MonoBehaviours\Core\NetworkedObject.cs" />
@@ -62,8 +55,5 @@
6255
<Compile Include="NetworkingManagerComponents\SpawnManager.cs" />
6356
<Compile Include="Properties\AssemblyInfo.cs" />
6457
</ItemGroup>
65-
<ItemGroup>
66-
<None Include="packages.config" />
67-
</ItemGroup>
6858
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
6959
</Project>

MLAPI/MonoBehaviours/Core/NetworkingManager.cs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
using MLAPI.Helper;
2-
using MLAPI.NetworkingManagerComponents;
1+
using MLAPI.NetworkingManagerComponents;
32
using System;
43
using System.Collections;
54
using System.Collections.Generic;
@@ -124,10 +123,6 @@ public void StartServer(NetworkingConfiguration netConfig)
124123
Debug.LogWarning("MLAPI: No ConnectionApproval callback defined. Connection approval will timeout");
125124
}
126125
}
127-
if (NetworkConfig.UseUPnP)
128-
{
129-
UPnPHelper.AttemptPortMap(NetworkConfig.Port, NetworkConfig.UPnPCompleteCallback);
130-
}
131126
HostTopology hostTopology = new HostTopology(cConfig, NetworkConfig.MaxConnections);
132127
hostId = NetworkTransport.AddHost(hostTopology, NetworkConfig.Port);
133128
isServer = true;
@@ -192,10 +187,6 @@ public void StartHost(NetworkingConfiguration netConfig)
192187
Debug.LogWarning("MLAPI: No ConnectionApproval callback defined. Connection approval will timeout");
193188
}
194189
}
195-
if(NetworkConfig.UseUPnP)
196-
{
197-
UPnPHelper.AttemptPortMap(NetworkConfig.Port, NetworkConfig.UPnPCompleteCallback);
198-
}
199190
HostTopology hostTopology = new HostTopology(cConfig, NetworkConfig.MaxConnections);
200191
hostId = NetworkTransport.AddHost(hostTopology, NetworkConfig.Port, null);
201192
isServer = true;

MLAPI/packages.config

Lines changed: 0 additions & 4 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ It's licenced under the MIT licence :D
1818

1919
## Done features
2020
* Host support (Client hosts the server) (done)
21-
* Port forwarding using Open.NAT using the UPnP protcol (done)
2221
* Object and player spawning (done)
2322
* Connection approval (done)
2423
* Message names (done)
@@ -33,8 +32,4 @@ That's all I can think of right now. But there is more to come, especially if pe
3332

3433

3534
## Indepth
36-
The project is not yet very tested. Examples will be created when it's more functional.
37-
38-
39-
## Dependencies
40-
Open.NAT - https://github.com/lontivero/Open.NAT (MIT)
35+
The project is not yet very tested. Examples will be created when it's more functional.

0 commit comments

Comments
 (0)