Server Query

Arrange meetings with other people to play MP, announce your servers.
Post Reply
sotn0r
Burner Inserter
Burner Inserter
Posts: 7
Joined: Wed Mar 02, 2016 11:19 am
Contact:

Server Query

Post by sotn0r »

Hi,

is there a possibility yet to query the factorio dedicated server for current player count, max players etc.?

Kane
Filter Inserter
Filter Inserter
Posts: 666
Joined: Fri Sep 05, 2014 7:34 pm
Contact:

Re: Server Query

Post by Kane »

I feel this could be a good mod but I think in 0.13 they will have one for sure since their planning a server list so yeah you will see it in 13 :)

wh1tebird
Manual Inserter
Manual Inserter
Posts: 3
Joined: Fri May 13, 2016 9:40 am
Contact:

Re: Server Query

Post by wh1tebird »

Now that 0.13 is here, is there any information published surrounding the server query protocol?

edit: I looked at the traffic and found that the master server list is served on https://multiplayer.factorio.com/get-ga ... oken=TOKEN , but I haven't found the method yet how the master server list queries for the servers.

(for those intersted as how I found this information, i saw with wireshark that there was a DNS request for multiplayer.factorio.com, but the data is encrypted with ssl. I then locally hosted a dummy webserver with ssl and a self-signed certificate. Added multiplayer.factorio.com to the hosts file and then query the servers and look at the log files.)

Bisa
Filter Inserter
Filter Inserter
Posts: 450
Joined: Fri Jul 17, 2015 3:22 pm
Contact:

Re: Server Query

Post by Bisa »

I guess you could achieve a lot of this stuff using the added rcon feature, at least /players is a command that would give you some output to work with
Hosting a factorio server? Take a look at this || init script ||.

NoPantsMcDance
Filter Inserter
Filter Inserter
Posts: 478
Joined: Fri Jul 17, 2015 6:56 pm
Contact:

Re: Server Query

Post by NoPantsMcDance »

wh1tebird wrote:Now that 0.13 is here, is there any information published surrounding the server query protocol?

edit: I looked at the traffic and found that the master server list is served on https://multiplayer.factorio.com/get-ga ... oken=TOKEN , but I haven't found the method yet how the master server list queries for the servers.

(for those intersted as how I found this information, i saw with wireshark that there was a DNS request for multiplayer.factorio.com, but the data is encrypted with ssl. I then locally hosted a dummy webserver with ssl and a self-signed certificate. Added multiplayer.factorio.com to the hosts file and then query the servers and look at the log files.)
http://pastebin.com/n9GpAJka have fun parsing it

For anyone that's curious in order to query the browserlist you have to take this link https://multiplayer.factorio.com/get-ga ... oken=TOKEN and change "username" and "token" your username is your factorio account username (not your forum name) and you can find your token in the player-data.json located in your gamdir.
Looking for a multiplayer server? Check out my servers Vanilla Server

wh1tebird
Manual Inserter
Manual Inserter
Posts: 3
Joined: Fri May 13, 2016 9:40 am
Contact:

Re: Server Query

Post by wh1tebird »

NoPantsMcDance wrote:
wh1tebird wrote:Now that 0.13 is here, is there any information published surrounding the server query protocol?

edit: I looked at the traffic and found that the master server list is served on https://multiplayer.factorio.com/get-ga ... oken=TOKEN , but I haven't found the method yet how the master server list queries for the servers.

(for those intersted as how I found this information, i saw with wireshark that there was a DNS request for multiplayer.factorio.com, but the data is encrypted with ssl. I then locally hosted a dummy webserver with ssl and a self-signed certificate. Added multiplayer.factorio.com to the hosts file and then query the servers and look at the log files.)
http://pastebin.com/n9GpAJka have fun parsing it

For anyone that's curious in order to query the browserlist you have to take this link https://multiplayer.factorio.com/get-ga ... oken=TOKEN and change "username" and "token" your username is your factorio account username (not your forum name) and you can find your token in the player-data.json located in your gamdir.
Indeed, that's the result that I had. But I'm curious as to how does the server give that information to the master list?

Bisa
Filter Inserter
Filter Inserter
Posts: 450
Joined: Fri Jul 17, 2015 3:22 pm
Contact:

Re: Server Query

Post by Bisa »

Try setting up a ssl proxy and tap the wires with wireshark if you want to see what's going on ;) (please devs, make this easier by publishing the api docs?)
Hosting a factorio server? Take a look at this || init script ||.

wh1tebird
Manual Inserter
Manual Inserter
Posts: 3
Joined: Fri May 13, 2016 9:40 am
Contact:

Re: Server Query

Post by wh1tebird »

Bisa wrote:Try setting up a ssl proxy and tap the wires with wireshark if you want to see what's going on ;) (please devs, make this easier by publishing the api docs?)
Yeah, that's what I was going to do, but don't have the time for it atm.

edit: Currently solved it by making an RCON connection and issue the /players command. The result is then parsed into JSON and served by a local http server.

Khorne
Burner Inserter
Burner Inserter
Posts: 6
Joined: Mon Jul 25, 2016 10:05 am
Contact:

Re: Server Query

Post by Khorne »


Post Reply

Return to “Multiplayer”