• Can Someone Explain Networking to me Please?
    6 replies, posted
Hey there, sorry for the stupid post, but I've been trying to learn Networking in gLua. And I just cannot find any viable tutorials. I know that using the Net Library is one way, but it can lead to security issues. Can someone explain to me the best method or point me in the right direction please?
The net library is the main way that you would be networking. It only leads to security issues if you aren't checking the validity of what is being sent between the player and server. For example, if you send information from the client to the server on banning someone, but you don't check to make sure that the client that information came from actually has permission to ban someone (ie. whether or not the player is an admin) then it can be exploited to ban people.
[URL="http://wiki.garrysmod.com/page/Net_Library_Usage"]http://wiki.garrysmod.com/page/Net_Library_Usage[/URL]
If you haven't already, check out code blue's glua tutorials. They are very well explained and up to date. [url]https://youtu.be/ODlGyS6lR1M[/url]
[QUOTE=john55223;49494583]The net library is the main way that you would be networking. It only leads to security issues if you aren't checking the validity of what is being sent between the player and server. For example, if you send information from the client to the server on banning someone, but you don't check to make sure that the client that information came from actually has permission to ban someone (ie. whether or not the player is an admin) then it can be exploited to ban people.[/QUOTE] Thanks for the Reply! But where would I insert the "IsAdmin()" string? Sorry for the rather stupid questions.
Well, referring back to my banning people example: You would need to send the player to the server, along with all the other ban information. When the server receives the information, you would need to check if the player that sent the information was an admin. If you read the wiki page on net library usage linked kindly by dr.dray, you will understand much more about how it works.
[QUOTE=john55223;49494852]Well, referring back to my banning people example: You would need to send the player to the server, along with all the other ban information. When the server receives the information, you would need to check if the player that sent the information was an admin. If you read the wiki page on net library usage linked kindly by dr.dray, you will understand much more about how it works.[/QUOTE] Ah, thanks for the help guys! I understand now ;-;
Sorry, you need to Log In to post a reply to this thread.