comaps/meta-php
15
1
Fork
You've already forked meta-php
0
Simple alternative to the Meta server written in PHP for easy hosting on LAMP shared servers
PHP 100%
Konstantin Pastbin 49348e1c2b
All checks were successful
Publish to host / Publish to host (push) Successful in 32s
Add 260106 map version
Signed-off-by: Konstantin Pastbin <konstantin.pastbin@gmail.com>
2026年01月08日 13:07:25 +07:00
.forgejo/workflows Fix job syntax errors 2025年11月18日 17:05:02 +01:00
.gitignore Add gitignore 2025年08月11日 19:02:26 +02:00
.htaccess Prohibit browsing .git folder 2025年08月11日 19:01:35 +02:00
composer.json Initial commit 2025年06月15日 20:10:40 -07:00
composer.lock Initial commit 2025年06月15日 20:10:40 -07:00
CONTRIBUTORS Add cloud.ru S3 storage 2025年06月29日 19:45:30 +07:00
COPYING Relicense as AGPL 2025年11月18日 17:30:51 +01:00
htaccess.txt Initial commit 2025年06月15日 20:10:40 -07:00
index.php Add 260106 map version 2026年01月08日 13:07:25 +07:00
README.md Relicense as AGPL 2025年11月18日 17:30:51 +01:00

CoMaps Meta Server (PHP)

Copyright (C) 2025 CoMaps Contributors See the end of the file for license conditions.

Description

When the main app in the field checks for map updates, it needs to download the map files from nearby servers that hopefully have the desired files. Also, these servers can change over time, so they shouldn't be hardcoded into the app. So the first step is to ask for this list of CDNs, and the second step is to actually connect to one or more CDN servers to get the map files.

Note that currently our download routine chunks the files and requests multiple chunks at a time from all available servers, so more servers in each list is better. The app will evaluate the health of each server and direct chunk requests accordingly, but won't request multiple chunks from the same server at the same time.

Unlike Organic Maps, features that allowed the metaserver to control donation buttons etc have been removed from CoMaps and are not present in this metaserver.

Currently there is no capability for giving an app newer maps than it was built for. Apps are shipped with a countries.txt file that dictates every possible map and its checksum, which is quite secure, but also limiting. Improvements in this area are being discussed.

Requirements

Setup

  • Copy this meta folder to your wwwroot (like /var/www/html)
  • Copy and rename htaccess.txt to your wwwroot (like /var/www/html/.htaccess)
  • Obtain Composer or composer.phar and run composer install or php composer.phar install in this meta folder.
  • Ensure that Rewrite is enabled on Apache and test that curl -v https://your.example.com/servers results in JSON output, not a redirect
  • For stats, set a crontab: 59 23 * * * /var/www/html/meta/generate-stats.sh

License

You should have received a copy of the GNU Affero General Public License along with meta-php. If not, see https://www.gnu.org/licenses/.

// SPDX-License-Identifier: AGPL-3.0-only