82 Commits

Author SHA1 Message Date
sfan5 7da2aacbc1 Reject updates with screwy uptime
Might seem like a minor detail, but if somehow someone runs two
servers that think they are on the same IP & port, then the uptime
will tell us that something is wrong.
2026-04-16 16:08:48 +02:00
sfan5 ae2f30d13e Improve logging 2026-04-16 15:15:30 +02:00
sfan5 569afe4454 Sort client and mod list 2026-02-07 14:28:58 +01:00
sfan5 2f66e1deca Fix logic error in server duplicate check 2025-10-16 13:45:09 +02:00
sfan5 258add93e0 Fix average client calculation 2025-02-17 19:55:30 +01:00
sfan5 de30a4e1ac Limit updates of list to disk to every 5s 2025-02-17 19:38:27 +01:00
sfan5 b93b50ad11 Move sorting into save operation 2025-02-17 19:38:27 +01:00
sfan5 431ac110c7 Adjust legacy support penalty 2025-02-17 19:38:27 +01:00
sfan5 aedabc50a8 Logically deduplicate servers on list 2025-02-17 19:38:27 +01:00
sfan5 6df3b93f48 Encapsulate server data into class, split persistency 2025-02-17 19:38:27 +01:00
sfan5 f71be0af67 Drop intended verification changes
As discussed internally there are some edge cases where this
would require unreasonable changes on the server owner's part
2025-02-17 19:38:27 +01:00
sfan5 4d320bbcf5 Set short max_age for list.json 2024-11-03 12:42:37 +01:00
sfan5 5d191896f3 Some documentation adjustments 2024-11-03 12:38:50 +01:00
sfan5 77951100b9 Apply Luanti rename 2024-11-02 18:25:05 +01:00
sfan5 6edaa91315 Rework domain verification a bit (#67)
Co-authored-by: ShadowNinja <ShadowNinja@users.noreply.github.com>
2024-10-22 22:53:17 +02:00
sfan5 a8a9d92077 Fix some complaints from pylint 2024-10-14 23:54:06 +02:00
sfan5 3d08cd4ff4 Report delayed errors (#66) 2024-10-14 22:39:09 +02:00
sfan5 dcc8d5ec74 Get rid of uptime tracking and point penalty
closes #37
2024-10-05 15:22:54 +02:00
sfan5 1f1af8828c Check request data more carefully 2024-07-08 19:51:55 +02:00
sfan5 4584459fca Don't penalize no clients_list 2024-07-08 18:53:26 +02:00
sfan5 78e6c48c85 Drop support for announce via GET 2024-03-06 23:07:08 +01:00
sfan5 cb8fa58df4 Sanity check server addresses against common mistakes 2024-03-03 23:57:09 +01:00
sfan5 c02ed9f07a Fix serverUp error handling 2024-03-03 23:57:09 +01:00
sfan5 d945b26f9f Add minimal lint workflow 2024-03-02 18:55:10 +01:00
Buckaroo Banzai 6fba704bb0 use max_age instead of cache_timeout (for flask > 2.0) 2023-05-05 10:36:08 +02:00
sfan5 218f8d9bc5 Fix cache control for geoip response
Storing this in public caches is not actually safe.
2022-09-20 22:49:13 +02:00
sfan5 b0fed2e9f7 Switch GeoIP backend to be able to use an up-to-date database 2022-09-20 22:23:11 +02:00
sofar d2f09370f7 Add interface for client to lookup it's own continent (#34)
This adds `/geoip` which returns a json object with one key-value pair,
`continent` = `unknown` or one of `NA`, `SA` etc. plus a 200 exit code,
or a 500 code if things went south badly.
2022-09-20 21:53:04 +02:00
sfan5 84a40e406b Remove "guest" user penalty
Much overdue as the mobile apps that justified this are long gone
closes #50, closes #17
2021-09-05 21:06:57 +02:00
sfan5 5d5f31d295 Only apply uptime penalty on repeated restarts 2021-03-15 12:35:02 +01:00
sfan5 a9ecf55b38 Avoid unnecesary disk writes 2021-03-15 11:38:49 +01:00
sfan5 9f144f3e3c Adjust server ranking
specificially, penalize servers that support both v4 and v5
Reasoning: We, as a project, have no interest in promoting servers
that intentionally restrict themselves to the feature set of an old,
potentially buggy version.
2021-03-15 11:27:38 +01:00
sfan5 04810a094c Improve lookup failure logging 2019-07-17 12:53:11 +02:00
sfan5 85c3048cd4 Fix handling of GeoIP lookup failure 2019-07-17 12:46:57 +02:00
Auke Kok 772fc29cb8 Detect geo of server.
Using geolite2, we attempt to detect the continent of the server
and store the 'continent code' in the serverlist. This is reasonably
broad enough to help players in the client find truly "nearby" server.

The client will have to be changed to select a continent to change
ordering or filtering.
2019-07-17 12:33:48 +02:00
sfan5 ac66259801 Less confusing status codes 2019-07-17 12:23:35 +02:00
sfan5 794807c9ff Raise JSON length limit
it's not hard to hit 5000 if you just throw in a lot of mods
2019-05-07 17:30:15 +02:00
sfan5 6f51e2f00f Tune server ranking (again) 2018-11-11 23:16:43 +01:00
sfan5 e7c4d2c20a Tune server ranking 2018-10-27 22:46:12 +02:00
sfan5 57fb13cbb8 Use most compact JSON representation 2018-06-25 13:19:49 +02:00
sfan5 0a3d05baf5 Use portable os.replace instead of relying on POSIX behaviour 2018-06-25 12:48:23 +02:00
nOOb3167 a2b47ff52b Document serverUp protocol
serverUp uses hex spaghetti to send and receive a short sequence of packets, to see whether a server is online.
The packet format is now annotated for easier cross-reference with minetest source.
2018-06-04 16:27:08 +02:00
nOOb3167 e49da8f1b9 Compatibility fix (string field conversion) 2018-05-18 10:09:36 +02:00
nOOb3167 48020105af Schedule purging using plain python, obviating the need for APScheduler 2018-05-18 10:05:57 +02:00
nOOb3167 f43f201af5 Fix potential use-before-defined of serverList variable 2018-05-18 10:05:57 +02:00
nOOb3167 23d45c0a15 Improve use of os.path.join 2018-03-18 14:07:59 +01:00
nOOb3167 f5bddaaef5 Fix locking
Calls to save() in purgeOld() and update() were in race condition.
Race condition was eliminated by extending the lock scope within purgeOld().
Calls to load() were in race condition with themselves.
While current use of load() (called only during construction of class ServerList()) does not manifest the bug, any future change introducing concurrent use of load() would.
Race condition potential was eliminated by extending the lock scope within load().
2018-03-18 14:07:59 +01:00
nOOb3167 78abbee771 Fix server purging 2018-03-18 14:07:59 +01:00
sfan5 2f87286475 Make hostname blacklist case insensitive 2017-12-24 20:42:47 +01:00
sfan5 0d93321f6d Restrict protocol of "server_url" values to HTTP(S) 2017-11-06 19:45:28 +01:00