[go: up one dir, main page]

Menu

Tree [33903a] master /
 History

HTTPS access


File Date Author Commit
 .devcontainer 2024-07-15 Bob Tanner Bob Tanner [75e72d] feat: Add development container setup with Dock...
 .github 2025-02-20 Bob Tanner Bob Tanner [e78ab5] Refactor DevContainer configuration and Docker ...
 docker 2024-07-15 Bob Tanner Bob Tanner [e69ad6] feat: Add development container setup with Dock...
 html 2025-12-23 Kevin Zheng Kevin Zheng [eab74d] Add Prometheus-compatible metaserver output
 scripts 2025-12-23 Kevin Zheng Kevin Zheng [33903a] Update test script to connect to localhost
 .dockerignore 2024-07-21 Bob Tanner Bob Tanner [4013f2] Add Docker Compose, Docker ignore file, GitHub ...
 .env.sample 2025-02-20 Bob Tanner Bob Tanner [d00d9a] Refactor DevContainer configuration and Docker ...
 .gitignore 2025-12-18 Kevin Zheng Kevin Zheng [5f9154] Update README and consolidate CONTRIBUTING
 .pre-commit-config.yaml 2024-07-15 Bob Tanner Bob Tanner [700d47] feat: Add development container setup with Dock...
 .yamllint 2025-02-20 Bob Tanner Bob Tanner [d00d9a] Refactor DevContainer configuration and Docker ...
 COPYING 2024-07-13 Bob Tanner Bob Tanner [b70509] Refactor: Remove extraneous control characters ...
 Makefile 2025-02-21 Bob Tanner Bob Tanner [e420e3] Refactor Devcontainer and Docker Setup
 README.md 2025-12-18 Kevin Zheng Kevin Zheng [5f9154] Update README and consolidate CONTRIBUTING
 TECHNICAL 2025-12-18 Kevin Zheng Kevin Zheng [5f9154] Update README and consolidate CONTRIBUTING
 docker-compose.override.yml.example 2024-07-23 Bob Tanner Bob Tanner [1aca49] Update .gitignore, add docker-compose.override....
 docker-compose.yml 2025-02-23 Bob Tanner Bob Tanner [c20ff1] It is KEY_PATH
 schema.sql 2025-12-23 Kevin Zheng Kevin Zheng [6acb44] Give database schema its own file

Read Me

Crossfire Metaserver

This is the Crossfire Metaserver, a set of PHP web pages that implement a public Crossfire server directory.
For a technical overview, see TECHNICAL.

Development Quickstart

You can set up a development environment for the metaserver on your local machine or inside a Docker container.

Local Machine

  1. Install PHP and the php command-line utility
  2. Install MySQL
  3. Follow the setup instructions below
  4. Run cd html && php -S localhost:8000. This starts a local development web server at http://localhost:8000.

With Docker Desktop + VS Code

  1. Install Visual Studio Code
  2. Install Docker Desktop
  3. Clone the crossfire-metaserver
  4. Open the folder crossfire-metaserver

VSCode should 3 docker containers

  • crossfire-metaserver-mysql
  • crossfire-metaserver-www
  • crossfire-metaserver-vscode

Testing

To populate the metserver list with test data:

cd scripts && ./curl-metaserver-port.sh
neither forward nor reverse DNS look corresponds to incoming ip address.
incoming ip: 172.20.0.4, DNS of that: crossfire-metaserver-vscode.devel
User specified hostname: localhost IP of that hostname: 127.0.0.1

Setup

  1. Prerequisites: You need a webserver that has php script support, and
    the php script support must have mysql database support.

  2. Connect to your MySQL database as an administrator, e.g. mysql -u root -p. Create the metaserver database and a database account for the metaserver:

    mysql> create database metaserver;
    
    mysql> CREATE USER 'metaserver'@'localhost' IDENTIFIED BY 'metaserver';
    
    mysql> GRANT ALL ON metaserver.* TO 'metaserver'@'localhost';
    
  3. As the metaserver database user, create the tables:

    $ mysql -u metaserver -p < schema.sql
    
  4. Edit html/mysql_db.php with the database name, username, and password as you created above.

  5. Edit html/common.php to configure logging options. Note that if you comment out the
    $LOGFILE, you will get no logging.

  6. If you have issues with bad/misbehaving hosts, you may wish to blacklist
    them. See the TECHNICAL file for details.

CRITICAL: It is highly recommend to use a unique and complex password for the MySQL database
once the initial setup and testing is completed!

License

Copyright (C) 2007 Mark Wedel & Crossfire Development Team

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

The author can be reached via e-mail to crossfire-devel@real-time.com