Scripts that make up the OpenRA project's master server for game broadcasts.
- MiniYAML: http://master.openra.net/games?protocol=2
- JSON: http://master.openra.net/games?protocol=2&type=json
- Players: http://activity.openra.net (code)
Scripts that make up the OpenRA project's master server for game broadcasts
Home Page: http://master.openra.net
Scripts that make up the OpenRA project's master server for game broadcasts.
The most active and popular server by:
amount of players
activity
average game duration
show the most popular map per server too.
So we can render it with JavaScript libraries like http://www.flotcharts.org/ in the way http://cncnet.org/statistics does it.
Game@36:
Id: 106120
Name: hetzner_release_2
Address: 178.63.32.174:1232
State: 2
Players: 8
MaxPlayers: 8
Bots: 0
Spectators: 1
Map: 7e2dc0ffeafa808b34360bd34384cfe564391238
Mods: ra@release-20141029
TTL: 298
Protected: false
Started: 2015-02-21 21:14:46
Location: Germany
Clients:
yes no
Mc.Lovin....\m/
Schefmonstah
z
FiveAces
pax
¦̵̱ ̵̱ ̵̱ ̵̱ ̵̱(Ì¢ ̡͇̅└̅̈́¥&3aó!H
8¥©�5æ(‰
â–ž S∑NP¢$H8¥¦
Lavoriamobene
I think, that fields "latency" and "jitter" (from the Master server to a Playing server) may be useful for outputs of "list.php" and "list_json.php".
What do you think?
1 field: game_started
http://activity.openra.net/ can be easily junked with invalid data such as games with unrealistic large player numbers, which is what @martinalderson did when he tested his exploits OpenRA/OpenRA#11826. Similar to #5, but more annoying as our graphs then scale to the super high player count.
Lines 34 to 39 in 14c6266
There is no need to encode data that will be returned as yaml, and possibly likewise for JSON (I'd expect that to have its own sanitize function that could be done on display). We probably want to remove this to avoid issues like:
via OpenRA/OpenRA#4647 required for OpenRA/OpenRA#4621
root@lubuntu:/tmp/monotest# mono --version
Mono JIT compiler version 4.6.2 (Debian 4.6.2.7+dfsg-1ubuntu1)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: sgen
root@lubuntu:/tmp/monotest# mono tlstest.exe https://master.openra.net
https://master.openra.net
FAILED: #-2146232800
System.IO.IOException: The authentication or decryption has failed. ---> System.IO.IOException: The authentication or decryption has failed. ---> Mono.Security.Protocol.Tls.TlsException: The authentication or decryption has failed.
at Mono.Security.Protocol.Tls.RecordProtocol.EndReceiveRecord (System.IAsyncResult asyncResult) [0x00040] in <1d0bb82c94e7435eb09324cf5ef20e36>:0
at Mono.Security.Protocol.Tls.SslClientStream.SafeEndReceiveRecord (System.IAsyncResult ar, System.Boolean ignoreEmpty) [0x00000] in <1d0bb82c94e7435eb09324cf5ef20e36>:0
at Mono.Security.Protocol.Tls.SslClientStream.NegotiateAsyncWorker (System.IAsyncResult result) [0x00071] in <1d0bb82c94e7435eb09324cf5ef20e36>:0
--- End of inner exception stack trace ---
at Mono.Security.Protocol.Tls.SslClientStream.EndNegotiateHandshake (System.IAsyncResult result) [0x0003b] in <1d0bb82c94e7435eb09324cf5ef20e36>:0
at Mono.Security.Protocol.Tls.SslStreamBase.AsyncHandshakeCallback (System.IAsyncResult asyncResult) [0x0000c] in <1d0bb82c94e7435eb09324cf5ef20e36>:0
--- End of inner exception stack trace ---
at Mono.Security.Protocol.Tls.SslStreamBase.EndNegotiateHandshake (Mono.Security.Protocol.Tls.SslStreamBase+InternalAsyncResult asyncResult) [0x00028] in <1d0bb82c94e7435eb09324cf5ef20e36>:0
at Mono.Security.Protocol.Tls.SslStreamBase.NegotiateHandshake () [0x00035] in <1d0bb82c94e7435eb09324cf5ef20e36>:0
at Mono.Security.Protocol.Tls.SslStreamBase.Write (System.Byte[] buffer, System.Int32 offset, System.Int32 count) [0x00076] in <1d0bb82c94e7435eb09324cf5ef20e36>:0
at System.IO.StreamWriter.Flush (System.Boolean flushStream, System.Boolean flushEncoder) [0x00094] in <8f2c484307284b51944a1a13a14c0266>:0
at System.IO.StreamWriter.Flush () [0x00006] in <8f2c484307284b51944a1a13a14c0266>:0
at TlsTest.GetStreamPage (System.String url) [0x000c2] in <7ad9caa5280c42fa9e47b5cc3d9b1e0e>:0
at TlsTest.Main (System.String[] args) [0x002aa] in <7ad9caa5280c42fa9e47b5cc3d9b1e0e>:0
Recently, it appears that the server listings are sorted in some manner other than alphabetical. In the past, server names have determined the order in which servers without any players appear in the server listing, and similarly among the group of servers that have current active players.
It is not clear how they are now being sorted or if this change in sorting mechanism was intentional.
Can be fixed by checking for a custom user agent, suggested to be enforced in next version.
That's why /games
does not show client names field.
Probably required to drop and create table clients
again.
This table does not store anything over time, it's for current online games, so no data is going to be lost.
probably using services like http://api.hostip.info/country.php?ip=IP
This will create new ID. Can happen because of issues with physical connnection
Hi,
I would like to ask, if it is possible to include basic information to games endpoint ?
For example, if you open developer tools on page http://www.openra.net/games/, you can see there is another request to obtain map info for every displayed game in list. IMO, it would be better to include basic map info right into games/
endpoint, so it would save several request.
The point, why I'm asking is that I'm trying to implement own games browser, where user can filter games based on mods, players, maps, etc. So, when my games browser will show for example 50 games, it needs also send another 50 request to get map info.
Line 537 in 2458c3b
RewriteRules in .htaccess don't work on xampp machines. Tested with xampp 1.7.7 and xampp 1.8.2 on Win7 and WinXP.
An overall redirection does the trick there:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^.]+)?$ $1.php
Required for OpenRA/OpenRA#4495.
We are currently working around an issue with the ordering of mods in the MP game browser by filtering out empty games for all but the current version.
This is done by adding
$filter_empty = NULL;
if (isset($_REQUEST['modversion']))
$filter_empty = $_REQUEST['modversion'];
between the try
and the $db
lines at the start of games.php
, and then
// Filter empty servers from all but the current version
if ($row['players'] == 0 && $filter_empty != NULL && explode("@", $row['mods'])[1] != $filter_empty)
continue;
as the first line after the foreach
.
This hack can and should be removed once most of the empty servers have migrated from release-20170421
to release-20170527
.
port check is done on $_SERVER["REMOTE_ADDR"] yet address in body is used in the database insert/update clause. perhaps you want to add a check that remote address matches body address and/or store remote address.
by setting the ip address to any active game ip address you can update/overwrite the database record for that game server.
in general many of the input fields are not checked, but the address being part of the key may be harmful.
also note that a dos attack is possible by executing an unlimited number of pings. i understand this may be by design, it being an open game.
and provide a page to serve saved info for external clients.
structure: new table with: id, hash, played_counter, version
api: request a page by hash and return a json: [{"hash":"hash", "played_counter":"amount","version":"version"}].
For example, resource site will have scheduled trigger (in background) which will update internal database with fresh data from master server, using API, several times per month.
This non-up-to-date info is enough to be trusted.
Having this fixed and a "community maps" tab added into OpenRA, there will be a possibility to have a filter ordered by "Playing Activity", requested by @X-A-N-A-X
Primary table "servers":
id | name | address | players | state | ts | map | mods | bots | spectators | maxplayers | protected | started |
---|---|---|---|---|---|---|---|---|---|---|---|---|
integer | varchar | varchar | integer | integer | integer | varchar | varchar | integer | integer | integer | boolean | datetime |
Table "finished":
id | game_id | name | address | map | mod | version | protected | started | finished |
---|---|---|---|---|---|---|---|---|---|
integer | integer (identical to servers.id) | varchar | varchar | varchar | varchar | varchar | boolean | datetime | datetime |
Table "map_stats":
id | map | played_counter | mod | version | last_change |
---|---|---|---|---|---|
integer | varchar | integer | varchar | varchar | datetime |
Table "activity":
id | game_id | timestamp | address | mod | version | state_old | state_new | players |
---|---|---|---|---|---|---|---|---|
integer | integer (identical to servers.id and finished.game_id) | datetime | varchar | varchar | varchar | integer | integer | integer |
INFO.md contains instructions for configuring nginx, but the server is running on apache.
What must be: 1 game == 1 ID for the game's lifetime
What really happens: game's ID is randomly (unpredicted moment) changed
What does it break: the uniqueness of the game is violated, which clients do not suspect about (bots, stream servers). Impossible to define the game's start moment for bots. Stream servers are unable to work because impossible to define a minor changes in a particular game (or at least impossible to rely on it).
What is probably causing such a behavior: ping.php -> $insert = $db->prepare('INSERT OR REPLACE INTO servers .......
create some indexes as well perhaps.
Line 25 in 2458c3b
games.php serves the the content-type application/javascript when selecting json as output.
this should be application/json.
by also being able to insert any string in the database this in some situations could lead to javascript being executed in the web clients that make the request. possible cross site scripting attack.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.