1
0
Fork
You've already forked lwsp
0
Easy multiplexer for multiple ContentDB and Serverlist urls for Luanti clients
  • Python 94.9%
  • Dockerfile 2.8%
  • Shell 2.3%
Find a file
2025年09月10日 09:40:27 -04:00
app rearrange files for cdbp and slp 2025年09月10日 09:40:27 -04:00
.gitignore initial commit 2025年08月27日 13:50:08 -04:00
config.cfg.example rearrange files for cdbp and slp 2025年09月10日 09:40:27 -04:00
docker-compose.yml initial commit 2025年08月27日 13:50:08 -04:00
Dockerfile change branding 2025年09月10日 08:56:23 -04:00
LICENSE.md initial commit 2025年08月27日 13:50:08 -04:00
README.md change branding 2025年09月10日 08:56:23 -04:00
requirements.txt initial commit 2025年08月27日 13:50:08 -04:00
start.sh initial commit 2025年08月27日 13:50:08 -04:00

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:

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.

Further reading

  1. https://github.com/luanti-org/contentdb/blob/master/docs/luanti_client.md