Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Trouble with Agar.io Private Server Connection

Status
Not open for further replies.
Initiate Mage
Joined
Sep 27, 2015
Messages
2
Reaction score
0
Whenever I link my client to my server ip the socket keeps connecting and disconnecting. But when I go on agar.io and enter the connect command in console with my ip it works fine. I am using ogar
 
◝(⁰▿⁰)◜Smile◝ (⁰▿⁰)◜
Developer
Joined
May 29, 2007
Messages
2,167
Reaction score
899
Re: Agar.io private server client socket opening and closing

The server files might be outdated so that's why it keeps disconnecting and re-connecting. The handshake fails so the client or server decides to disconnect. You might want to stick with the files provided in the release section.
 
Upvote 0
Initiate Mage
Joined
Sep 27, 2015
Messages
2
Reaction score
0
Re: Agar.io private server client socket opening and closing

The server files might be outdated so that's why it keeps disconnecting and re-connecting. The handshake fails so the client or server decides to disconnect. You might want to stick with the files provided in the release section.


I use Ogar server and I tried every web client files in the release forum..
 
Upvote 0
Newbie Spellweaver
Joined
Feb 25, 2004
Messages
8
Reaction score
8
Re: Agar.io private server client socket opening and closing

If you look in the Ogar Source, for GameServer.js you will find

Code:
        // ----- Client authenticity check code -----
        // !!!!! WARNING !!!!!
        // THE BELOW SECTION OF CODE CHECKS TO ENSURE THAT CONNECTIONS ARE COMING
        // FROM THE OFFICIAL AGAR.IO CLIENT. IF YOU REMOVE OR MODIFY THE BELOW
        // SECTION OF CODE TO ALLOW CONNECTIONS FROM A CLIENT ON A DIFFERENT DOMAIN,
        // YOU MAY BE COMMITTING COPYRIGHT INFRINGEMENT AND LEGAL ACTION MAY BE TAKEN
        // AGAINST YOU. THIS SECTION OF CODE WAS ADDED ON JULY 9, 2015 AT THE REQUEST
        // OF THE AGAR.IO DEVELOPERS.
        var origin = ws.upgradeReq.headers.origin;
        if (origin != 'http://agar.io' && origin != 'https://agar.io'
            && origin != 'http://localhost' && origin != 'https://localhost'
            && origin != 'http://127.0.0.1' && origin != 'https://127.0.0.1') {
            ws.close();
            return;
        }

What basically means. block all clients except agar.io, localhost and 127.0.0.1 clients. Removing that whole quote will allow any client access.
 
Upvote 0
Status
Not open for further replies.
Back
Top