Commit graph

67 commits

Author SHA1 Message Date
Jupeyy bde7e854ac Update GLEW 2021-08-24 14:05:35 +02:00
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
def 7c86dd8e5c Fix external directory in .clang-tidy 2020-10-14 15:45:47 +02:00
Edgar baa8b93d2f Add clang-tidy to CI and enable clang-analyzer checks
The actual work will be fixing those or at least
NOLINT(clang-analyzer-optin.cplusplus.VirtualCall) them so we can enable
this. Disable checks that we don't want.

Exclude external directory from clang-tidy.
2020-10-14 14:54:33 +02:00
def 0bac9f0de8 Manual preparation for cleaner clang-format
Also include what you use explicitly
2020-09-26 21:41:01 +02:00
def 017b8c3621 Move DDNet-custom json code out of external directory (fixes #2022) 2020-01-01 20:07:04 +01:00
heinrich5991 e44b1ca986 Use OpenSSL md5 if it is available
Fixes #1582.
2019-04-06 02:56:29 +02:00
yangfl 81a39c229b Fix typo 2018-07-10 17:29:02 +08:00
heinrich5991 c2aaef2adf Remove vendored libwebsockets 2018-02-14 12:55:37 +01:00
Dennis Felsing 5a75dc7f27 New glew try 2017-10-20 11:35:44 +02:00
Dennis Felsing 88c0778b21 Bundle glew instead 2017-10-20 11:12:27 +02:00
def 2fb5835980 Update json-parser to 1.1.0, zlib to 1.2.11 2017-07-22 11:07:29 +02:00
def db2256e827 Fix a few whitespace-at-end-of-file issues 2015-08-22 15:27:41 +02:00
def 23b6b02534 Remove inlines in json.c to fix VS compilation 2015-08-13 12:26:49 +02:00
Chairn 3f4ed266fb Fix debug compilation on Windows with MinGW.(by Savander) 2015-08-12 00:35:25 +02:00
def 7f8ce3c8dd Rename json.cpp to json.c again 2015-07-01 14:13:06 +02:00
def 84cdcdb414 Remove wrong include 2015-04-19 11:23:25 +02:00
def 0ffa79671b Get rid of all GCC warnings 2015-04-18 21:33:51 +02:00
fisted 68e30c29b3 added free md5 implementation w/o deps 2015-03-05 00:13:48 -08:00
eeeee 5971c1cb68 added libwebsockets source code 2015-02-08 18:31:30 -08:00
def c65458ca06 Fix compilation on MSVC (by coffee) (fixes #138) 2015-01-20 13:46:26 +01:00
Learath Lea d7771f8f7d Fix debug build on MinGW. Add json_get_boolean. 2015-01-19 22:14:50 +01:00
def 795fc9702b Add forgotten files 2014-12-20 11:47:52 +01:00
def df754072e0 Update zlib to version 1.2.8 2014-12-20 04:13:19 +01:00
def 24881449b3 Revert "Add OGG"
This reverts commit 28d276cd7e.
2014-10-28 01:34:15 +01:00
def 3b1d23f42c Revert "Add Opus"
This reverts commit a7dafa40c7.
2014-10-28 01:34:09 +01:00
def ca52f841b0 Revert "Add opusfile"
This reverts commit 827699263c.
2014-10-28 01:34:03 +01:00
def 827699263c Add opusfile 2014-10-27 09:25:24 +01:00
def a7dafa40c7 Add Opus 2014-10-27 09:22:52 +01:00
def 28d276cd7e Add OGG 2014-10-27 09:05:49 +01:00
def d2ef256f06 Final compilation fix for Windows 2014-09-20 14:42:12 +02:00
def 4a703576ab Revert "Now Windows compiling (by Tobii)"
This reverts commit 5b4878d0d4.
2014-09-20 14:41:38 +02:00
def 5b4878d0d4 Now Windows compiling (by Tobii) 2014-09-20 14:30:18 +02:00
def 3b3955632c Hopefully fix Windows compile 2014-09-20 14:20:43 +02:00
east 6ab9279211 json related updates 2014-09-18 16:11:22 +02:00
east d161005658 json parser added 2014-09-18 14:40:29 +02:00
GreYFoX cd4ba53bae Merge branch 'master' of git://github.com/teeworlds/teeworlds into DDRace
Conflicts:
	bam.lua
	scripts/build.py
	scripts/make_release.py
	src/engine/server.h
	src/game/client/gameclient.cpp
	src/game/server/gamecontext.cpp
	src/game/server/gamecontext.h
	src/game/server/gamecontroller.cpp
	src/game/server/gamecontroller.h
	src/game/server/player.cpp
	src/game/version.h
2012-04-12 02:09:31 +02:00
oy 45302957f1 removed some unused zlib stuff. Closes #907 2012-01-07 23:50:47 +01:00
GreYFoX ee670118a5 Merge branch 'master' of git://github.com/oy/teeworlds into DDRace
Conflicts:
	src/engine/console.h
	src/engine/server/server.cpp
	src/engine/server/server.h
	src/engine/shared/config.h
	src/engine/shared/console.cpp
	src/engine/shared/console.h
	src/engine/shared/network_server.cpp
@heinrich5991 todo
2012-01-01 00:11:56 +02:00
oy 80835d2c11 added version files for pnglite and wavepack(both up-to-date). Closes #900 2011-12-29 14:00:28 +01:00
GreYFoX 1446d0980b Merge branch 'master' of git://github.com/oy/teeworlds into DDRace
* Version 1.098a
Conflicts:
	bam.lua
	src/game/client/gameclient.h
	src/game/mapitems.h
2011-12-05 11:32:01 +02:00
oy 55fe59fa8a updated zlib to 1.2.5 2011-12-04 17:50:52 +01:00
GreYFoX cc63cf2553 Merge branch 'master' of git://github.com/oy/teeworlds
Conflicts:
	src/engine/external/pnglite/pnglite.c
	src/engine/external/pnglite/pnglite.h
	src/engine/shared/config_variables.h
	src/game/client/components/menus_browser.cpp
	src/game/server/entities/character.cpp
	src/game/server/entities/laser.cpp
	src/game/server/gamecontext.cpp
	src/game/server/player.cpp
	src/game/version.h
2011-05-09 18:36:13 +02:00
Choupom 694be7dfb5 fixed the pnglite fix 2011-05-03 18:44:55 +02:00
Choupom f1df704d78 fixed pnglite requiring a std header include 2011-05-03 18:44:46 +02:00
Choupom bbd7a75849 fixed a pnglite crash on save if the image is too small 2011-05-03 18:43:26 +02:00
GreYFoXGTi 7f8fb7a5a7 Merging the client manually into the server
but i can't get the client to accept the console class of the server -.-" yet..

Signed-off-by: GreYFoXGTi <GreYFoXGTi@GMaiL.CoM>
2010-08-25 17:31:49 +02:00
oy a41d930a85 fixed some compiler warnings. Closes #76 2010-06-06 17:16:52 +02:00
Magnus Auvinen 4004d13b48 applied patch from Richie Nyhus to convert CRLF to LF, as it should be 2008-11-29 06:39:22 +00:00
Magnus Auvinen 6eb17ec50c corrected the zlib include 2008-11-08 08:28:24 +00:00