| app | rearrange files for cdbp and slp | |
| .gitignore | initial commit | |
| config.cfg.example | rearrange files for cdbp and slp | |
| docker-compose.yml | initial commit | |
| Dockerfile | change branding | |
| LICENSE.md | initial commit | |
| README.md | change branding | |
| requirements.txt | initial commit | |
| start.sh | initial commit | |
Readme for Luanti Web Services Proxy
This project (LWSP) exists as a proof of concept for an easy multiplexer for multiple instances of web services used by a Luanti client, including:
- ContentDB: official instance https://content.luanti.org/
- Serverlist: official instance https://servers.luanti.org/
Use LWSP when you want your Luanti client to easily access multiple ContentDBs or multiple Server lists, or both.
Because of the way a ContentDB instance enforces mod dependencies to be resolvable within that instance, any dependencies for a package will be resolvable from that one instance only.
The purpose of multiplexing ContentDB is to support Luanti clients to browse packages (games, mods, and texture packs) and install them. It is not designed for a general-purpose website to manage multiple ContentDB instances' packages.
The purpose of multiplexing Serverlist is to support Luanti clients to see multiple server lists; it does not attempt to present a nice web view that concatenates multiple server lists.
Using LWSP
Running the proxy server locally
Set up a python3 virtual environment and install any dependencies.
python3 -m venv ~/venv-lwsp
source ~/venv-lwsp
pip3 install -r requirements.txt
Adjust config.cfg from config.cfg.example. This file has comments explaining the config options.
Start the development server.
./start.sh
Running proxy server in docker or docker-compose
See the example docker-compose.yml.
Configuring Luanti client to use the proxy server
This will correctly handle mods that were previously installed directly from a ContentDB instance; you can change config to use a proxy. However, updates will be broken if you change config to point back directly to a ContentDB instance: Each mod mod.conf gets modified by Luanti client, in field author which stores the "corrected" author name of <author>~<host+protocol> which would no longer be relevant.
Using multiplexer for ContentDB
Set contentdb_url in minetest.conf to a string similar to the following. The top of the virtual path is a url-encoded representation of space-delimited connection strings (protocol, hostname, and optionally port).
http://localhost:5124/https%3A%2F%2Fcontent.luanti.org%2F+http%3A%2F%2Fvm4%3A5123%2F
For example, to list https://content.luanti.org/ and http://vm4:5123/ you would place this into a url encoder utility.
https://content.luanti.org/ http://vm4:5123/
Optionally, you can set the list to "default" to use the backends configured by the proxy server, or even just omit the "default" virtual path.
http://localhost:5124/default/
http://localhost:5124/
Using multiplexer for Serverlist
Set serverlist_url in minetest.conf to a line formatted in the same way, but with serverlist urls.
http://localhost:5124/https%3A%2F%2Fservers.luanti.org+http%3A%2F%2Fvm4%3Aserverlist
Like contentdb config, you can omit the top virtual directory of the path, and use the default configured in the server.
http://localhost:5124/
Author
bgstack15
Alternatives
None. This is novel on the www.