Quatria i tried one whole list while developing the script consisting of 904 servers (at that time), loaded them all in a clean ddnet client config and it was able to get all server infos.
Getting the server list is a bit more difficult.
First, you send a REQ package (ff ff ff ff ff ff ff ff ff ff 72 65 71 32; 10 times FF, then ASCII encoded 'req2') to a master server via udp on port 8300.
Next, the server is going to respond in as many packages as the server want, maximum containing 75 servers (excluding header 1364 bytes long), each of them beginning with the LIST header (ff ff ff ff ff ff ff ff ff ff 6c 69 73 32; 10 times FF, then ASCII 'lis2').
Behind that list header the list of server ips begin, each address 18 bytes long.
Each of the ip starts with 00 00 00 00 00 00 00 00 00 00 ff ff (10 times 00, two times FF) if it is an ipv4 address, so far i didn't find out about ipv6.
after that, at position 13-18 of each part of the package is the actual ip address, on position 13-16 is each part of an ip address, as unsigned 8 bit integer and the last two positions (17 and 18) are the port, an unsigned big endian 16 bit integer (or, if you read per-byte, position 17 * 256 + position 18; basic positional notation).
I hope this is clear so far.
Note: this applies for 0.6, 0.7 does afaik a bit more magic
Another note: all series of bytes are in hexadecimal notation
Edit: I found most of these values in the teeworlds source, in various files.
Edit 2: worth mentioning: all actual packages sent by teeworlds are actually prefixed by 6 FF as identifier for teeworlds, so the REQ header as you find it in the source is only 4 times FF plus req2
Edit 3: Here the more general source for contacting the master server, excluded my pastebin upload and the add_favorite: https://gist.github.com/Schwertspize/50 … cc9727642c
Having troubles finding servers in the serverlist? Go to
Pastebin (its a referer cause there is daily a new pastebin) and add the lines to your settings.cfg (in %APPDATA%\teeworlds). Then open teeworlds and go to the favorites tab. (Note however, standard teeworlds client can only show 256 favorites, use ddnet instead)