vzgcoders / verifier-server
Valithor's official webserver for BYOND user verification.
Requires
- php: ^7.4 || ^8.0
- monolog/monolog: ^2.1.1 || ^3.0
- react/http: ^1.6
- vlucas/phpdotenv: ^5.4
Requires (Dev)
- phpunit/phpunit: ^9.5
Suggests
- ext-pcntl: Enables process control support for better server management on non-Windows systems when not leveraging ReactPHP
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-10-11 09:15:06 UTC
README
Valithor's official webserver for BYOND user verification.
Overview
Verifier-Server is a web server designed to handle BYOND user verification.
Features
- Handles GET and POST requests for user verification.
- Supports both filesystem and SQL (SQLite/MySQL) storage.
- Configurable via
.envfile. - Logger mode for detailed request and response logging.
- Graceful shutdown support on all systems with ReactPHP.
- Graceful shutdown support on non-Windows systems with
pcntlextension when not leveraging ReactPHP.
Installation
-
Clone the repository:
git clone https://github.com/Valgorithms/Verifier-server.git cd Verifier-server -
Install dependencies (PHP 8.2 or newer):
composer install
-
Create and configure the
.envfile:cp example.env .env
Edit the
.envfile to match your configuration:HOST_ADDR=127.0.0.1 HOST_PORT=8080 TOKEN=changeme STORAGE_TYPE=filesystem JSON_PATH=json/verify.json # SQLite configuration #DB_DSN=sqlite:verify.db #DB_USERNAME= #DB_PASSWORD= #DB_OPTIONS= # MySQL configuration DB_DSN=mysql:host=127.0.0.1;port=3306;dbname=verify_list DB_PORT=3306 DB_USERNAME=your_username DB_PASSWORD=your_password #DB_OPTIONS={"option1":"value1","option2":"value2"}
Usage
-
Start the server:
php run.php
-
The server will listen on the address and port specified in the
.envfile.
Endpoints
GET /verified: Retrieve the list of verified users.POST /verified: Add or delete a verified user. Requires a valid token.
Running Tests
To run the tests, execute the following command:
php runtests.php
Using Scripts
Get Verified List
To get the list of verified users, run the following script:
./scripts/get_verified.sh
Insert a New Record
To insert a new ss13 and discord record, run the following script:
./scripts/post_verified.sh
License
This project is licensed under the MIT License.
Offline verification checks
Run php scripts/lint.php to parse all package source, entry points, scripts, and tests.
CI checks PHP 8.2, 8.3, 8.4, and 8.5.
Run php vendor/bin/phpunit --bootstrap vendor/autoload.php tests/isolated.
These contract tests inject storage that never writes files or opens databases;
they do not load .env, bind a listening socket, or contact verification services.
A server loading test constructs the server and routes a synthetic request without
initializing its network listener.
The older tests outside this directory use configured storage and are not run by CI.
Run php -d xdebug.mode=off scripts/benchmark_lookups.php for a synthetic
lookup comparison. It uses in-memory lists and performs no persistence or HTTP.
Lookup columns are cached until the list changes, preserving existing loose
comparison semantics and original row keys. A snapshot and columns consume
additional memory; database reads still follow the configured storage behavior.
Verification HTTP requests accept application/x-www-form-urlencoded bodies.
Body fields override corresponding legacy headers. Internal header-string calls
remain supported. Successful registrations explicitly return HTTP 200.