This commit is contained in:
Frank Harris 2026-07-02 18:11:32 -05:00
parent a49371c3dd
commit 251af10faf
1190 changed files with 12636 additions and 12476 deletions

View file

@ -29,7 +29,7 @@ home.php module request
-> optional agent RPC through lib_remote.php
external automation
-> Panel/ogp_api.php
-> Panel/gsp_api.php
-> api_* handler
-> same module/library logic
-> optional agent RPC
@ -51,7 +51,7 @@ Transport:
- XML-RPC over HTTP
- endpoint path `/RPC2`
- wrapper `Panel/includes/lib_remote.php`
- server implementations in `Agent_Linux/ogp_agent.pl` and `Agent-Windows/OGP64/OGP/ogp_agent.pl`
- server implementations in `Agent_Linux/gsp_agent.pl` and `Agent-Windows/GSP64/GSP/gsp_agent.pl`
Primary categories:
@ -70,7 +70,7 @@ See the full command table in:
## Panel Wrapper Methods
Most Panel modules do not build XML-RPC directly. They call `OGPRemoteLibrary`.
Most Panel modules do not build XML-RPC directly. They call `GSPRemoteLibrary`.
| Wrapper Method | Agent Command | Common Modules |
|---|---|---|
@ -90,7 +90,7 @@ Most Panel modules do not build XML-RPC directly. They call `OGPRemoteLibrary`.
Primary endpoint:
- `Panel/ogp_api.php`
- `Panel/gsp_api.php`
Auth model:
@ -99,7 +99,7 @@ Auth model:
- requests can be GET, POST, or JSON body
- host allowlist can be enforced
Top-level API handlers implemented in `ogp_api.php`:
Top-level API handlers implemented in `gsp_api.php`:
| Handler Function | Route Prefix | Purpose |
|---|---|---|
@ -179,7 +179,7 @@ Return shape:
## Internal Module Endpoints
These are not public APIs in the same sense as `ogp_api.php`, but they matter architecturally.
These are not public APIs in the same sense as `gsp_api.php`, but they matter architecturally.
| Endpoint | Module | Purpose |
|---|---|---|
@ -278,18 +278,18 @@ Panel fallback behavior:
Agent cron jobs often execute URLs like:
- `ogp_api.php?gamemanager/start`
- `ogp_api.php?gamemanager/stop`
- `ogp_api.php?gamemanager/restart`
- `ogp_api.php?gamemanager/update&type=steam`
- `ogp_api.php?server_content/run_scheduled_action`
- `gsp_api.php?gamemanager/start`
- `gsp_api.php?gamemanager/stop`
- `gsp_api.php?gamemanager/restart`
- `gsp_api.php?gamemanager/update&type=steam`
- `gsp_api.php?server_content/run_scheduled_action`
This means `ogp_api.php` is part of the scheduler runtime and must stay backward compatible with those generated URLs.
This means `gsp_api.php` is part of the scheduler runtime and must stay backward compatible with those generated URLs.
## Search Coverage Used For This Document
- `sed -n '1,240p' Panel/ogp_api.php`
- `rg -n "^function api_" Panel/ogp_api.php`
- `sed -n '1,240p' Panel/gsp_api.php`
- `rg -n "^function api_" Panel/gsp_api.php`
- `sed -n '1,240p' Panel/status_api.php`
- `find Website/api -maxdepth 1 -type f`
- `sed -n '1,220p' Website/webhook.php`

View file

@ -31,7 +31,7 @@ No separate `Panel/libraries/` or `Panel/common/` tree is currently used as the
| `Panel/includes/refreshed.php` | refresh helper | cron/events and refresh-style pages |
| `Panel/includes/debug.php` | debug support | limited / diagnostic use |
| `Panel/includes/ip_in_range.php` | CIDR / IP-range helper | API host authorization |
| `Panel/includes/api_functions.php` | `ogp_api.php` argument maps and API-side helper logic | external API, scheduler URLs |
| `Panel/includes/api_functions.php` | `gsp_api.php` argument maps and API-side helper logic | external API, scheduler URLs |
## `lib_remote.php` Wrapper Surface
@ -83,7 +83,7 @@ Practical rule:
## API Helper Layer
`Panel/includes/api_functions.php` supports `Panel/ogp_api.php`.
`Panel/includes/api_functions.php` supports `Panel/gsp_api.php`.
Responsibilities:
@ -92,7 +92,7 @@ Responsibilities:
- RCON dispatch helper
- API host authorization checks
This file is also indirectly used by the scheduler because cron jobs call back into `ogp_api.php`.
This file is also indirectly used by the scheduler because cron jobs call back into `gsp_api.php`.
## XML / Game Config Parsing
@ -149,7 +149,7 @@ These are not in `includes/`, but they function as shared update infrastructure
|---|---|
| Agent RPC | `includes/lib_remote.php` |
| Database | `includes/database_mysqli.php` |
| API | `includes/api_functions.php`, `ogp_api.php` |
| API | `includes/api_functions.php`, `gsp_api.php` |
| Routing / page shell | `includes/navig.php`, `includes/view.php` |
| XML config | `modules/config_games/server_config_parser.php` |
| Query metadata | `protocol/lgsl`, `protocol/GameQ` |

View file

@ -27,7 +27,7 @@ User / admin UI
-> Linux / Windows agents
AJAX / external API
-> module endpoint PHP files or ogp_api.php / status_api.php
-> module endpoint PHP files or gsp_api.php / status_api.php
-> same shared libraries and DB layer
-> agent RPC where needed
```
@ -52,7 +52,7 @@ AJAX / external API
| `billing` | Yes for server provisioning/expiry actions | embeds storefront runtime; shares logic with `Website/` | DB layer, `lib_remote.php`, payment helpers | orders, invoices, coupons, server provisioning state | webhook and checkout entrypoints under module and website | PayPal, Stripe/manual gateways, email |
| `circular` | No | own helper file | DB layer | announcement/content records | `show_circular.php` | none |
| `config_games` | No direct agent use in main UI | `server_config_parser.php`, `cli-params.php`, `set_mods.php`, `set_params.php` | XML parser, DB layer | `config_homes`, `config_mods` | XML editor-like pages | GameQ, LGSL references |
| `cron` | Yes | `shared_cron_functions.php`, uses `ogp_api.php` URLs as scheduled payloads | `lib_remote.php`, XML parser, DB layer | Panel-side scheduler intent; agent-owned cron entries | `events.php`, `thetime.php`, `user_cron.php` | agent scheduler, `wget`, panel API |
| `cron` | Yes | `shared_cron_functions.php`, uses `gsp_api.php` URLs as scheduled payloads | `lib_remote.php`, XML parser, DB layer | Panel-side scheduler intent; agent-owned cron entries | `events.php`, `thetime.php`, `user_cron.php` | agent scheduler, `wget`, panel API |
| `dashboard` | Yes | `query_ref.php`, `updateWidgets.php` | `lib_remote.php`, DB layer | widget prefs, server overview | `updateWidgets.php` | query protocols |
| `dsi` | Yes | shared DSI includes, `gamemanager/home_handling_functions.php`, XML parser | `lib_remote.php`, XML parser, GameQ, LGSL | server and game metadata | `image.php`, list/admin pages | GameQ, LGSL, GeoIP |
| `editconfigfiles` | Yes | its own helpers/config lists | `lib_remote.php`, DB layer | file edit permissions by home | `modify.php` | remote file editing |
@ -88,8 +88,8 @@ AJAX / external API
|---|---|---|
| `gamemanager` | `config_games/server_config_parser.php` | build startup commands, query definitions, control protocol metadata |
| `gamemanager` | `addonsmanager/monitor_buttons.php` and content helpers indirectly | content/update actions shown on monitor pages |
| `cron` | `addonsmanager/server_content_actions.php` via `ogp_api.php?server_content/run_scheduled_action` | scheduled content checks and installs |
| `cron` | `gamemanager` via `ogp_api.php?gamemanager/*` | start, stop, restart, Steam auto update |
| `cron` | `addonsmanager/server_content_actions.php` via `gsp_api.php?server_content/run_scheduled_action` | scheduled content checks and installs |
| `cron` | `gamemanager` via `gsp_api.php?gamemanager/*` | start, stop, restart, Steam auto update |
| `user_games` | `gamemanager/home_handling_functions.php` | delete / teardown and lifecycle-related helpers |
| `user_games` | `billing/create_servers.php` | provisioning integration |
| `dsi` | `gamemanager/home_handling_functions.php` | shared game-home status logic |
@ -107,7 +107,7 @@ AJAX / external API
| `Panel/modules/cron/events.php` | `cron` | scheduler log refresh |
| `Panel/modules/litefm/get_file.php` | `litefm` | streamed download chunks |
| `Panel/status_api.php` | architecture / public status | panel-local public node summary API |
| `Panel/ogp_api.php` | architecture / external API | token-authenticated external automation API |
| `Panel/gsp_api.php` | architecture / external API | token-authenticated external automation API |
## Major Database Ownership
@ -120,7 +120,7 @@ This is not a full schema map. It identifies ownership boundaries.
| `remote_servers`, `remote_server_ips` | `server`, provisioning, `status`, `dashboard` |
| `server_homes`, `home_ip_ports`, `game_mods` | `user_games`, `gamemanager`, `cron`, provisioning |
| `config_homes`, `config_mods` | `config_games`, `user_games`, `gamemanager` |
| `api_tokens` | `ogp_api.php`, user session helpers |
| `api_tokens` | `gsp_api.php`, user session helpers |
| `server_content_manifest`, `server_content_workshop`, `addons` | `addonsmanager` |
| billing/order/invoice/coupon tables | `billing`, `Website/` |
| ticket/support tables | `tickets`, `support` |
@ -145,6 +145,6 @@ This is not a full schema map. It identifies ownership boundaries.
Key searches:
- `rg -n "new OGPRemoteLibrary|->remote_|->scheduler_|->component_update|->steam_workshop" Panel/modules Panel/includes`
- `rg -n "new GSPRemoteLibrary|->remote_|->scheduler_|->component_update|->steam_workshop" Panel/modules Panel/includes`
- `rg -n "require|require_once|include|include_once" Panel/modules -g '*.php'`
- `find Panel/modules -maxdepth 2 -type f \\( -name '*.php' -o -name '*.js' \\)`

View file

@ -9,24 +9,24 @@ This file is the command catalog for the XML-RPC surface between the Panel and t
Primary files:
- `Panel/includes/lib_remote.php`
- `Agent_Linux/ogp_agent.pl`
- `Agent-Windows/OGP64/OGP/ogp_agent.pl`
- `Agent_Linux/gsp_agent.pl`
- `Agent-Windows/GSP64/GSP/gsp_agent.pl`
Transport:
- Panel -> agent uses XML-RPC over HTTP to `/RPC2`
- Arguments are encrypted by `OGPRemoteLibrary`
- Arguments are encrypted by `GSPRemoteLibrary`
- Agents validate the encryption marker before executing commands
## Command Dispatch
Linux dispatch table:
- `Agent_Linux/ogp_agent.pl`
- `Agent_Linux/gsp_agent.pl`
Windows dispatch table:
- `Agent-Windows/OGP64/OGP/ogp_agent.pl`
- `Agent-Windows/GSP64/GSP/gsp_agent.pl`
Important parity note:
@ -149,7 +149,7 @@ Important implementation note:
- the Panel scheduler stores intent in the UI
- the agent owns execution timing and the actual cron entries
- many agent cron commands are `wget` calls back into `Panel/ogp_api.php`
- many agent cron commands are `wget` calls back into `Panel/gsp_api.php`
## Internal Agent Scheduler Actions
@ -213,5 +213,5 @@ Notable wrapper methods:
Commands were confirmed from:
- `rg -n "methods =>" Agent_Linux Agent-Windows`
- `rg -n "^sub .*without_decrypt|^sub component_update|^sub remote_query|^sub steam_workshop|^sub scheduler_" Agent_Linux/ogp_agent.pl Agent-Windows/OGP64/OGP/ogp_agent.pl`
- `rg -n "^sub .*without_decrypt|^sub component_update|^sub remote_query|^sub steam_workshop|^sub scheduler_" Agent_Linux/gsp_agent.pl Agent-Windows/GSP64/GSP/gsp_agent.pl`
- `rg -n "public function .*\\(" Panel/includes/lib_remote.php`

View file

@ -9,9 +9,9 @@ The Panel does not directly run servers. It prepares the request, sends it to th
```text
User action
-> Panel module page
-> OGPRemoteLibrary in lib_remote.php
-> GSPRemoteLibrary in lib_remote.php
-> XML-RPC request to agent /RPC2
-> ogp_agent.pl method
-> gsp_agent.pl method
-> local screen/process/port work
-> return status or payload
-> Panel renders result

View file

@ -56,8 +56,8 @@ The agents are the execution layer. They:
Important agent files:
- `Agent_Linux/ogp_agent.pl`
- `Agent-Windows/OGP64/OGP/ogp_agent.pl`
- `Agent_Linux/gsp_agent.pl`
- `Agent-Windows/GSP64/GSP/gsp_agent.pl`
- `Agent_Linux/startups/`
- `Agent-Windows/ServerFiles/`
- `Agent_Linux/php-query/`
@ -74,7 +74,7 @@ The Website is separate from the server runtime path. It is used for:
## Panel <-> Agent Communication
The Panel uses XML-RPC over HTTP to call methods exposed by `ogp_agent.pl`.
The Panel uses XML-RPC over HTTP to call methods exposed by `gsp_agent.pl`.
The remote wrapper lives in:

View file

@ -16,8 +16,8 @@ The scope of this pass was status/RPC communication only. Steam Workshop, update
The repository agents currently expose the structured `server_status` RPC on both Linux and Windows/Cygwin:
- Linux: `Agent_Linux/ogp_agent.pl`
- Windows/Cygwin: `Agent-Windows/OGP64/OGP/ogp_agent.pl`
- Linux: `Agent_Linux/gsp_agent.pl`
- Windows/Cygwin: `Agent-Windows/GSP64/GSP/gsp_agent.pl`
The Panel also contains a fallback path for older or stale live agents where `server_status` is unavailable:
@ -153,7 +153,7 @@ Linux also exposes `renice_process` and `lock_additional_files`, which are absen
| Mismatch | Impact |
|---|---|
| Documentation referenced `Agent-Windows/ogp_agent.pl`, but the current tracked file is `Agent-Windows/OGP64/OGP/ogp_agent.pl`. | Confuses future debugging and validation. Documentation was updated. |
| Documentation referenced `Agent-Windows/gsp_agent.pl`, but the current tracked file is `Agent-Windows/GSP64/GSP/gsp_agent.pl`. | Confuses future debugging and validation. Documentation was updated. |
| Panel fallback port regex inserted a shell-quoted port into a grep regex. | Prevented `ss`/`netstat` fallback from detecting running servers after `server_status` RPC was unavailable. Fixed. |
| Some non-status wrappers in `lib_remote.php` reference legacy RPC names whose current support should be checked before future work, such as `steam` and `game_update_active`. | Out of scope for this status repair. |
@ -173,9 +173,9 @@ Run from repository root:
```bash
php -l Panel/modules/gamemanager/home_handling_functions.php
perl -c Agent_Linux/ogp_agent.pl
perl -c Agent-Windows/OGP64/OGP/ogp_agent.pl
rg -n "p=\\$port_arg|\\[:\\.\\]\\$p|Agent-Windows/ogp_agent\\.pl" \
perl -c Agent_Linux/gsp_agent.pl
perl -c Agent-Windows/GSP64/GSP/gsp_agent.pl
rg -n "p=\\$port_arg|\\[:\\.\\]\\$p|Agent-Windows/gsp_agent\\.pl" \
Panel/modules/gamemanager/home_handling_functions.php \
docs/features/STATUS_SYSTEM.md \
docs/modules/GAMEMANAGER.md \