Apply Luanti rename
This commit is contained in:
31
README.md
31
README.md
@@ -1,4 +1,4 @@
|
||||
Minetest server list
|
||||
Luanti server list
|
||||
====================
|
||||
|
||||
Setting up the webpage
|
||||
@@ -32,7 +32,7 @@ Embedding the server list in a page
|
||||
...
|
||||
<script>
|
||||
var master = {
|
||||
root: 'https://servers.minetest.net/',
|
||||
root: 'https://servers.luanti.org/',
|
||||
limit: 10,
|
||||
clients_min: 1,
|
||||
no_flags: true,
|
||||
@@ -46,7 +46,7 @@ Embedding the server list in a page
|
||||
...
|
||||
<div id="server_list"></div>
|
||||
...
|
||||
<script src="https://servers.minetest.net/list.js"></script>
|
||||
<script defer src="https://servers.luanti.org/list.js"></script>
|
||||
</body>
|
||||
|
||||
Setting up the server
|
||||
@@ -75,7 +75,7 @@ Setting up the server
|
||||
|
||||
$ ./server.py
|
||||
$ # Or for production:
|
||||
$ uwsgi -s /tmp/minetest-master.sock --plugin python -w server:app --enable-threads
|
||||
$ uwsgi -s /run/serverlist.sock --plugin python -w server:app --enable-threads
|
||||
$ # Then configure according to http://flask.pocoo.org/docs/deploying/uwsgi/
|
||||
|
||||
7. (optional) Configure the proxy server, if any. You should make the server
|
||||
@@ -83,10 +83,12 @@ Setting up the server
|
||||
should be served from `list.json`. Example for nginx:
|
||||
|
||||
root /path/to/server/static;
|
||||
rewrite ^/list$ /list.json;
|
||||
rewrite ^/$ /index.html break;
|
||||
rewrite ^/list$ /list.json break;
|
||||
try_files $uri @uwsgi;
|
||||
location @uwsgi {
|
||||
uwsgi_pass ...;
|
||||
include uwsgi_params;
|
||||
uwsgi_pass unix:/run/serverlist.sock;
|
||||
}
|
||||
|
||||
Setting up the server (Apache version)
|
||||
@@ -96,30 +98,29 @@ If you wish to use Apache to host the server list, do steps 1-2, 4, above. Addit
|
||||
|
||||
# This config assumes you have the server list at DocumentRoot.
|
||||
# Visitors to the server list in this config would visit http://local.server/ and
|
||||
# apache would serve up the output from server.py. Static resources would be served
|
||||
# from http://local.server/static.
|
||||
# apache would serve up the output from server.py.
|
||||
|
||||
# Where are the minetest-server files located?
|
||||
DocumentRoot /var/games/minetest/serverlist
|
||||
# Where are the serverlist files located?
|
||||
DocumentRoot /var/games/luanti/serverlist
|
||||
|
||||
# Serve up server.py at the root of the URL.
|
||||
WSGIScriptAlias / /var/games/minetest/serverlist/server.py
|
||||
WSGIScriptAlias / /var/games/luanti/serverlist/server.py
|
||||
|
||||
# The name of the function that we call when we invoke server.py
|
||||
WSGICallableObject app
|
||||
|
||||
# These options are necessary to enable Daemon mode. Without this, you'll have strange behavior
|
||||
# with servers dropping off your list! You can tweak threads as needed. See mod_wsgi documentation.
|
||||
WSGIProcessGroup minetest-serverlist
|
||||
WSGIDaemonProcess minetest-serverlist threads=2
|
||||
WSGIProcessGroup luanti-serverlist
|
||||
WSGIDaemonProcess luanti-serverlist threads=2
|
||||
|
||||
<Directory /var/games/minetest/serverlist>
|
||||
<Directory /var/games/luanti/serverlist>
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
The Minetest server list code is licensed under the GNU Lesser General Public
|
||||
The Luanti server list code is licensed under the GNU Lesser General Public
|
||||
License version 2.1 or later (LGPLv2.1+). A LICENSE.txt file should have been
|
||||
supplied with your copy of this software containing a copy of the license.
|
||||
|
||||
@@ -8,7 +8,7 @@ HOST = "127.0.0.1"
|
||||
PORT = 5000
|
||||
|
||||
# Amount of time, is seconds, after which servers are removed from the list
|
||||
# if they haven't updated their listings. Note: By default Minetest servers
|
||||
# if they haven't updated their listings. Note: By default Luanti servers
|
||||
# only announce once every 5 minutes, so this should be more than 300.
|
||||
PURGE_TIME = 350
|
||||
|
||||
|
||||
@@ -281,7 +281,7 @@ def checkRequestAddress(server):
|
||||
return ADDR_IS_INVALID
|
||||
# if not ipv6, there must be at least one dot (two components)
|
||||
# Note: This is not actually true ('com' is valid domain), but we'll assume
|
||||
# nobody who owns a TLD will ever host a Minetest server on the root domain.
|
||||
# nobody who owns a TLD will ever host a Luanti server on the root domain.
|
||||
# getaddrinfo also allows specifying IPs as integers, we don't want people
|
||||
# to do that either.
|
||||
if ":" not in name and "." not in name:
|
||||
@@ -302,7 +302,7 @@ def checkRequestAddress(server):
|
||||
return ADDR_IS_INVALID_PORT
|
||||
|
||||
# unicode in hostname
|
||||
# Not sure about Python but the Minetest client definitely doesn't support it.
|
||||
# Not sure about Python but the Luanti client definitely doesn't support it.
|
||||
if any(ord(c) > 127 for c in name):
|
||||
return ADDR_IS_UNICODE
|
||||
|
||||
@@ -358,7 +358,7 @@ def checkRequestSchema(server):
|
||||
server[name] = server[name].lower() in ("true", "1")
|
||||
continue
|
||||
# Accept strings in integer fields but convert it to an
|
||||
# integer, for interoperability with e.g. minetest.write_json.
|
||||
# integer, for interoperability with e.g. core.write_json().
|
||||
if data[1] == "int":
|
||||
server[name] = int(server[name])
|
||||
continue
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Minetest server list</title>
|
||||
<title>Luanti server list</title>
|
||||
<link rel="stylesheet" href="modern-normalize.min.css">
|
||||
<style>
|
||||
body {
|
||||
@@ -29,7 +29,7 @@
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<span class="h"><strong>Minetest server list</strong> | <a href="https://www.minetest.net/get-involved/#reporting-issues">Contact</a> | <a href="https://www.minetest.net/app-privacy-policy/">Privacy</a></span>
|
||||
<span class="h"><strong>Luanti server list</strong> | <a href="https://www.minetest.net/get-involved/#reporting-issues">Contact</a> | <a href="https://www.minetest.net/app-privacy-policy/">Privacy</a></span>
|
||||
<hr />
|
||||
<div id="server_list"></div>
|
||||
<script src="list.js"></script>
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
{{? master.show_proto_select}}
|
||||
, Protocol: <select class="proto_select">
|
||||
<option value="">All</option>
|
||||
<option value="[11,32]" {{? master.proto_range=='[11,32]'}}selected{{?}}>11-32 (Minetest 0.4)</option>
|
||||
<option value="[37,99]" {{? master.proto_range=='[37,99]'}}selected{{?}}>37+ (Minetest 5.x)</option>
|
||||
<option value="[11,32]" {{? master.proto_range=='[11,32]'}}selected{{?}}>11-32 (0.4 series)</option>
|
||||
<option value="[37,99]" {{? master.proto_range=='[37,99]'}}selected{{?}}>37+ (5.0 or newer)</option>
|
||||
</select>{{?}}
|
||||
</div>
|
||||
{{?}}
|
||||
|
||||
Reference in New Issue
Block a user