Open Luka967 opened 8 years ago
The IP is the ip the server has when connecting to the tracker, so to change the way it looks at the tracker you change the serverName (name='ogar-luka967.c9users.io'
) to show as that on the tracker.
Tried it, didn't work. I meant for the link to connect as
http://ogar.mivabe.nl/?ip=ogar-luka967.c9users.io:8080
instead of
http://ogar.mivabe.nl/?ip=23.251.132.3:8080
because cloud9 won't accept connecting via IP, only by domain.
Changing name=ogar-luka967.c9users.io
will make the tracker assume it's a custom client and will connect via HTML.
@JaraLowell: I recommend to remove ability to use server name as a link to the server. It didn't works properly and vulnerable for hacker attacks. It allows hackers to send links on sites with malicious content (such as trojans, viruses, spyware and other). Just show server name as text, with no link and IP taken as remote client IP which posted ping. It will prevent users to random click on a link which directs to malicious site and downloads trojans and viruses. Showing dns name also is not safe, because hacker can send ping from IP with some dns name, and then change dns record for this dns to follow on malicious site with viruses and trojans
@Jara, could you please provide me with a link for json with online servers info? (or just in text format if it's to hard to implement json on your server). You can protect it with some key if you wish. I will add link on your site as a client for protocol 4/5 servers in my tracker, so your site will be opened for any protocol 4/5 server :)
@Barbosik contact me on Skype jaralowell :smiling_imp:
Working hard on molesting your server to have the same toys as mine lol
One more bug to hunt slash find in https://github.com/Barbosik/MultiOgar,. some where in ejected mass . . . one day later... time to give it a break. Tomorrow will look in to that, and see if i can get my other cells in there as well.
Added now also a json version for those that seek to use that in there servers rather then http,.
var jsondata = { players: this.sinfo.players, alive: this.sinfo.humans, spectators: (this.sinfo.spectate + this.sinfo.death), maxplayers: this.config.serverMaxConnections, port: this.config.serverPort, gamemode: this.gameMode.name, protocol: pversion, name: sName, opp: myos.platform() + ' ' + myos.arch(), uptime: process.uptime(), version: 'OgarServ ' + this.version, starttime: this.startTime.getTime() }; var data = JSON.stringify(jsondata); var xhr = new XMLHttpRequest(); xhr.open("POST", "http://ogar.mivabe.nl/masterjs", !0); xhr.setRequestHeader("Content-Type", "application/json;charset=UTF-8"); xhr.send(data);
Right now it not yet in OgarServ as using it means loading an extra library while we seek to be low on memory.
you need for the above option to work add also:
var XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest;
@Barbosik
(no idea where to ask - if I can ask somewhere else, tell me) So I branched off Ogar, integrated protocol 4, started tracking version and made it able to send info on mivabe master tracker. You can see two servers with version "Ogar beta rev115". The first one, from the US, is from cloud9 which won't allow clients to connect via IP, but through a subdomain (in the server's case, ogar-luka967.c9users.io:8080). You can delete it. The other one, from Serbia is hosted on my laptop and works fine. Currently tweaking stuff here and there.
So I have a question - can the info interpretation be tweaked a bit and enable connection at mivabe.nl via domain? Something like this: