- Home /
UNET - Password protection approach.
Hello everyone.
What would you recommend as an approach for password protection in order to prevent server from unwanted players connecting. I don't use matchmaking, just created custom HUD with fields server, port, and password. At this moment it works like this:
1) Host started. Host player spawned. Password set on server.
2) Player connected. Player spawned. Some manager (on server side) checks if connected player object has correct password. If it's not - it makes player disconnected.
I know it's not a good way to protect server. It would be better to do it like this:
public override OnServerConnected(var SomeConnectionInfo)
{
if (SomeConnectionInfo.password == this.ServerPassword)
base.OnServerConnected(SomeConnectionInfo);
else
Disconnect();
}
Or maybe I need to learn and use LLAPI for this.
Any help would be priceless, thank you.
Answer by Stormy102 · Jul 08, 2016 at 03:22 PM
I'm trying to get enougth people to support my feedback to get this integrated into the HLAPI - please vote on it here! https://feedback.unity3d.com/suggestions/password-protection-support-for-unet
Your answer
Follow this Question
Related Questions
How do I connect to a server in LAN from a different computer? I'm using socket.io and nodejs 1 Answer
Issue building Android build with com.unity.transport in it 0 Answers
[UNET] Connection between Client and Server dies without message 0 Answers
Very Confused on Networking HLAPI Practices 1 Answer
Unet: Client/Server end up with two different animations 0 Answers