Author Topic: unwanted guests  (Read 3104 times)

riomoko

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 9
    • View Profile
unwanted guests
« on: January 02, 2015, 02:10:42 PM »
ok I have my vps server running the tnet server...
the question is: if someone discover my ip and port what prevent another guy to use my server to host his game?  :o

MCoburn

  • Jr. Member
  • **
  • Thank You
  • -Given: 1
  • -Receive: 7
  • Posts: 69
    • View Profile
Re: unwanted guests
« Reply #1 on: January 02, 2015, 08:27:07 PM »
Are you using the lobby server functionality or game server from the TNet binary?

If you're using the lobby server (which I am using for my project) then you can tell the binary to be a lobby-server-only configuration. People could discover the IP and ports, I usually set my lobby server to run on a high-number port that is uncommon.

Otherwise if you're using the (dumb) game server, then yes, people could connect to it and make their own channels. You'd need to make something to check if the server is only for a certain project/game and if not, force a disconnection. If you use the game server executable, IIRC it's just a relay between the host (first player that joins) and the other players. I use a P2P setup myself with a lobby server being the "directory" for players to connect.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: unwanted guests
« Reply #2 on: January 02, 2015, 10:12:41 PM »
Pick a unique ID (TNet.Player.version). TNet automatically rejects clients that use an ID that doesn't match.

riomoko

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 9
    • View Profile
Re: unwanted guests
« Reply #3 on: January 03, 2015, 04:50:27 AM »
Pick a unique ID (TNet.Player.version). TNet automatically rejects clients that use an ID that doesn't match.

Please where, and when I must set it? Is server side? or I must set it client side at connection?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: unwanted guests
« Reply #4 on: January 04, 2015, 07:46:45 AM »
Both client and server. You will want to compile a new TNServer.exe. Solution file for it is in the ZIP in the project folder.

riomoko

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 9
    • View Profile
Re: unwanted guests
« Reply #5 on: January 04, 2015, 09:02:36 AM »
 :o Uh. Please a less tricky solution for next update   ;D

MCoburn

  • Jr. Member
  • **
  • Thank You
  • -Given: 1
  • -Receive: 7
  • Posts: 69
    • View Profile
Re: unwanted guests
« Reply #6 on: January 12, 2015, 01:07:05 AM »
:o Uh. Please a less tricky solution for next update   ;D
You need to learn how to do tricky things otherwise you won't know how to do it next time :P