Commit graph

40 commits

Author SHA1 Message Date
heinrich5991 436e202cbd Add client-side HTTP server info
Summary
=======

The idea of this is that clients will not have to ping each server for
server infos which takes long, leaks the client's IP address even to
servers the user does not join and is a DoS vector of the game servers
for attackers.

For the Internet, DDNet and KoG tab, the server list is entirely fetched
from the master server, filtering out servers that don't belong into the
list.

The favorites tab is also supposed to work that way, except for servers
that are marked as "also ping this server if it's not in the master
server list".

The LAN tab continues to broadcast the server info packet to find
servers in the LAN.

How does it work?
=================

The client ships with a list of master server list URLs. On first start,
the client checks which of these work and selects the fastest one.
Querying the server list is a HTTP GET request on that URL. The
response is a JSON document that contains server infos, server addresses
as URLs and an approximate location.

It can also contain a legacy server list which is a list of bare IP
addresses similar to the functionality the old master servers provided
via UDP. This allows us to backtrack on the larger update if it won't
work out.

Lost functionality
==================

(also known as user-visible changes)

Since the client doesn't ping each server in the list anymore, it has no
way of knowing its latency to the servers.

This is alleviated a bit by providing an approximate location for each
server (continent) so the client only has to know its own location for
approximating pings.
2021-05-14 01:00:39 +02:00
Jupeyy fb74bcbb55 Don't sort on entry adding 2020-12-22 11:30:20 +01:00
Jupeyy 74515d4b95 UI Elements 2020-10-19 23:52:29 +02:00
def 3be8a592e5 Run clang-format
Purely automatic change. In case of conflict with this change, apply the
other change and rerun the formatting to restore it:

$ python scripts/fix_style.py
2020-09-26 21:50:15 +02:00
def 00b66362c3 Allow zooming on city mod 2020-09-24 19:05:30 +02:00
def 7aed6476dc Allow larger map names 2020-06-18 18:29:27 +02:00
def 31ae4c4d5a use pid in file names of temporary files
to prevent race conditions with multiple clients running when saving
maps, config on quit, during upgrade
2020-02-12 23:14:30 +01:00
trml 0b3f3b03b5 Rewrite of prediction code, with additional prediction 2019-04-21 16:12:20 +02:00
def bf576723a3 Add KoG tab in server browser
- As requested by qshar and KoG players
- Similar to DDNet tab
- Info fetched from servers-kog entry from https://info.ddnet.tw/info
- Also supports countries and types
- Doesn't inform whether map has been finished
- Generalized the code a bit but it's still ugly
- Depends on #1533, also shows KoG servers as official/verified
2019-03-24 23:15:40 +01:00
def 4f515bf67e Add symbol for official servers in server browser (fixes #1501)
- Also fix favorites checkbox when removing favorite
- Might need a nicer looking symbol
2019-03-19 07:46:50 +01:00
fokkonaut cf09fbd1ea Merge BW support into IsDDNet 2019-01-14 16:50:06 +01:00
def faf388b853 Fix #1350 2018-10-29 22:03:57 +01:00
fokkonaut 3240f6fbc5 fix bw support 2018-09-28 18:27:51 +02:00
Dennis Felsing e295a121e4 DDNET_INFO(_TMP) 2018-08-23 09:57:35 +02:00
Dennis Felsing e2eb4a66dc Add Filter for connecting players (fixes #1263) 2018-08-21 09:03:48 +02:00
Redix 1c377ed00f Added Fastcap support for ghost and race demo 2017-09-28 16:01:57 +02:00
def 040fc9ca32 Implement right click and middle click on country and type filters
Right click: exclusively activate one
Middle click: reset (reenable all)
2017-08-30 22:36:39 +02:00
def 16f3ddc5a7 Show if user has rank on map in browser (+filter)
UI implementation by timakro
2017-08-30 21:34:04 +02:00
heinrich5991 1d81d56850 Introduce new, vanilla-compatible server info protocol
This means that we have a reliable and fast way to query for extended info,
while also not wasting network bandwidth.

The protocol is designed to be extensible, there's four bytes space for
encoding more request types (currently zeroed), and there's one string in each
response packet and one string for each player available (currently the empty
string).

The protocol itself has no problems with more than 64 players, although the
current client implementation will drop the player info after the 64th player,
because it uses a static array for storage.

Also fixes #130, the player list is just sorted each time new player info
arrives.
2017-03-29 12:56:13 +02:00
Tim Schumacher 4a22e762ff added entities clear for other gametypes 2016-04-29 19:29:19 +02:00
Chairn 3552e1a042 Added eye wheel. Render only on ddrace/race/ictf+/dm+/gctf+ server. 2015-08-30 21:42:16 +02:00
def 5f2c91d160 Fix server browser to refresh first time when initially on news tab 2015-08-25 00:51:01 +02:00
def b6008f5b20 Only refresh serverbrowser when necessary 2015-05-11 21:51:06 +02:00
def 8d945fe968 Exclude DDNet servery by type 2014-12-14 16:45:18 +01:00
def 8b108a2311 Clean up gametype determination 2014-12-10 03:39:15 +01:00
east 202d5d8866 Filter flag grid added 2014-09-19 23:52:09 +02:00
east e732008157 DDNet serverlist added 2014-09-13 16:36:25 +02:00
Shereef Marzouk c6fd4a2cc5 General whitespace and tab cleanup 2011-08-11 10:59:14 +02:00
oy fb309436b4 improved friends feature 2011-06-26 17:10:13 +02:00
oy 06115dd49d added "Whitespace and line Endings cleanup" by GreYFoX 2011-04-13 20:37:12 +02:00
oy 34a9ca20a7 added ipv6 support from the old lua branch 2011-03-28 20:11:28 +02:00
oy 96808a1145 made it possible to just show the number of player slots of a server (instead of client ones). Closes #68 2011-03-20 15:33:49 +01:00
oy f8ae9f7732 made server browser show clan name and country code for players 2011-03-18 17:59:48 +01:00
oy 7412fabb9c made serverinfo use clan name and country code for players 2011-03-16 12:37:41 +01:00
oy 0ae19e1339 removed support for old server infos 2011-03-04 18:14:08 +01:00
oy d939b84125 removed no longer needed progression browse info 2011-02-16 12:31:47 +01:00
Sworddragon fc9211c777 Updated copyrights 2010-11-20 21:26:06 +01:00
oy f1ce0d1949 improved loading progression in the server browser 2010-11-17 12:43:24 +01:00
Choupom a7f37446b6 added loading progression in server browser 2010-11-17 12:31:44 +01:00
Magnus Auvinen 72c06a2589 copied refactor to trunk 2010-05-29 07:25:38 +00:00