Skip to content
uDevStudioPublic

About

External Java-agent CLI for loading, unloading, and reloading Minecraft proxy plugins. Velocity, BungeeCord, and Waterfall staging validation.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

ProxyCtl

ProxyCtl is an external command-line utility for loading, unloading, and reloading plugins in a running Minecraft proxy JVM. It connects to a local process by PID using the JDK Attach API and loads a Java agent. No management plugin needs to be installed in the proxy's plugins/ directory. After agent installation, commands use an authenticated binary channel bound only to 127.0.0.1 on a random port; there is no HTTP interface.

The current version is a release candidate for qualified staging environments. It has been exercised against specific Velocity, BungeeCord, and Waterfall builds. It does not provide a universal, supported hot-unload API for arbitrary third-party plugins. The remaining limitations and the independently identified JDK 25/BungeeCord logging race are documented below and in TEST_REPORT.md.

Capabilities

  • Discover local attachable JVMs and select a proxy by PID.
  • List loaded plugins and inspect their source JAR, SHA-256, commands, listeners, scheduled tasks, and detectable owned threads.
  • Load a plugin JAR into an already running proxy.
  • Unload a plugin or reload it from its current JAR or a replacement JAR with the same plugin ID.
  • Check JAR integrity, plugin IDs, dependencies, and required proxy implementation fields before mutation.
  • Run targeted plugin lifecycle callbacks and clean known proxy registrations and owned resources.
  • Track retired plugin classloaders through weak references and inspect their collection state.
  • Refuse protected plugins, dependent-plugin conflicts, detected incomplete cleanup, and further changes after an operation timeout.
  • Return human-readable output or a JSON envelope for automation.

The implementation does not use Unsafe, JNI, native injection, manual memory mapping, or direct modification of compiled JIT machine code. It uses standard JVM instrumentation and reflection into proxy implementation details. Those implementation details are not stable public lifecycle APIs.

Tested compatibility

Proxy Exact tested build Plugins exercised through successful reloads
Velocity 3.4.0, build 566 MiniMOTD 2.2.5; Maintenance 4.3.0
Velocity 4.2.0, build 30 MiniMOTD 2.2.5; Maintenance 5.1.1
BungeeCord Build 2111, commit 55e1b0b Maintenance 5.1.1
Waterfall 1.21, build 615 Maintenance 5.1.1

The original integration environment was Windows with Amazon Corretto 25.0.5.1. Version 0.3 includes Windows and Linux integration jobs, transport/native-memory regressions, and explicit Linux cross-user, private-temporary-directory, and PID/mount-namespace regressions; see the current validation report for observed results. The source targets Java 17, but this bytecode target is not a compatibility claim for every JDK, operating system, proxy, or plugin. Use a JDK version supported by the selected proxy. JDK 25 is the baseline for reproducing the complete recorded test matrix.

NullCordX has not been tested because a licensed binary was unavailable. Its relationship to BungeeCord does not establish compatibility with a particular NullCordX build. Other proxy versions remain unverified. Linux coverage is limited to the environments and scenarios listed in the validation report. Waterfall is an end-of-life upstream project.

Exact third-party artifact URLs and SHA-256 values are pinned in tests/artifacts.json. This repository does not redistribute those proxy or plugin binaries.

Requirements

For building:

  • Python 3.11 or newer.
  • A full JDK with java and javac on PATH; JDK 17 or newer can compile the utility.
  • HTTPS access to Maven Central for the pinned ASM dependency on the first build.

For controlling a proxy:

  • A full JDK containing jdk.attach.
  • Permission to attach to the target JVM, normally by running the CLI as the same operating-system user.
  • Access to the target process and its filesystem namespace. The CLI must also run in the target network namespace, or otherwise share its loopback interface. The recorded isolation tests separate PID and mount namespaces, not network namespaces.
  • A target JVM that permits dynamic agent loading and supports retransformation when Velocity discovery is needed.
  • The controller must be able to stage its agent JAR into the target JVM's temporary directory. On Linux, /proc/<host-pid>/root is used to view the target filesystem, and staged code is assigned to the target process owner. A plugin JAR not shared with the target, or supplied by a different controller UID, is staged there as well.

ProxyCtl does not bypass -XX:+DisableAttachMechanism, disabled dynamic-agent loading, operating-system process permissions, or container isolation. If a target JVM forbids attachment, changing its startup options can require a restart. Where appropriate, enable dynamic agents at startup with -XX:+EnableDynamicAgentLoading.

On Windows/JDK 21, the Java launcher can replace characters outside the system ANSI code page before Main receives its arguments. The additional CP1252 CI case reproduced this for Cyrillic replacement paths, while the local Cyrillic-code-page run succeeded. Use an ASCII path for an explicitly supplied JAR on affected systems. The UTF-8 socket protocol cannot reconstruct characters already lost by the launcher; this limitation is separate from the Attach argument-length fix.

Build

python build.py
java -jar dist/proxyctl.jar help

The build produces dist/proxyctl.jar. Maven and Gradle are not required. The build downloads ASM 9.9, verifies its pinned SHA-256, relocates its package to dev.proxyctl.shaded.asm, and embeds it in the JAR. Proxy implementation classes are accessed reflectively rather than bundled.

Compilation uses a fresh temporary classes directory, so deleted classes cannot remain in the output. The JAR is published by atomic replacement rather than rewriting the existing file. If PROXYCTL_JAVA is set, its adjacent javac is used. Archive entry timestamps and permissions are fixed. Repeated builds with identical inputs and the same compiler were verified to produce the same JAR hash. Reproducibility across different compiler versions is not claimed.

Command reference

The PID 12345 and paths in these examples are placeholders. Replace them with the actual proxy PID and readable JAR paths.

Find the target JVM

java -jar dist/proxyctl.jar jvms

The output contains the PID and display name of each locally discoverable JVM. A JVM appearing in this list does not guarantee that attachment is permitted or that it is a supported proxy.

List and inspect plugins

java -jar dist/proxyctl.jar 12345 list
java -jar dist/proxyctl.jar 12345 inspect maintenance

Use the ID reported by the proxy. The inspected output includes the current JAR path and hash, known command aliases, listener and task counts, and detectable owned threads. Inspection is diagnostic; it cannot enumerate every object or resource a plugin may have created.

Load a plugin

java -jar dist/proxyctl.jar 12345 load /srv/staging/Maintenance.jar

On Windows, a full Windows path can be supplied instead:

java -jar dist/proxyctl.jar 12345 load "C:\staging\Maintenance.jar"

Required dependencies must already be loaded. A duplicate plugin ID or a conflicting provided ID is refused. ProxyCtl does not automatically download dependencies or reload a dependency graph.

The selected JAR can be outside plugins/; loading it does not install or copy it into that startup directory. The CLI reads all entries with JAR signature verification enabled, enforces expanded-size limits, and hashes the file before loading the agent for a new JAR. This is not a certificate trust policy or a sandbox. Namespace/user-isolated code staging may create a private immutable-by-convention copy in the target temporary directory. The standard proxy plugin-data location is used. A plugin that assumes a particular JAR location still needs its own compatibility testing.

Reload the current JAR

java -jar dist/proxyctl.jar 12345 reload maintenance

This performs unload followed by load. For a plugin copied into private staging, the agent remembers the original controller path separately from the runtime copy. The CLI rereads, validates, and stages the current original file, so replacing v1 with v2 at that path takes effect even when a root CLI controls a lower-privilege proxy. If that origin is no longer available to the invoking CLI, the operation fails before unloading; supply an explicit replacement path. Startup-loaded/shared JARs use their target source path. This does not call the proxy's global configuration-reload command.

Reload from a replacement JAR

java -jar dist/proxyctl.jar 12345 reload maintenance /srv/updates/Maintenance.jar

The replacement must declare the same plugin ID. Full JAR validation and hashing run in the CLI process. For reload without a replacement path, a read-only source/generation lookup precedes CLI validation. The target checks the validated hash, bounded descriptor, dependencies, generation when applicable, and retirement-history capacity before stopping the existing plugin. The hash is checked again before the new load begins. This detects some concurrent file changes; it is not a general transaction or an immutable snapshot of the JAR.

ProxyCtl does not replace the original installation file. If the new JAR lives outside the proxy's startup plugin directory, arrange the desired files separately before the next proxy restart. Avoid leaving duplicate plugin IDs in that directory.

Unload a plugin

java -jar dist/proxyctl.jar 12345 unload maintenance

A loaded plugin declaring either a required or optional dependency on the target prevents unloading. Optional dependencies are treated conservatively because a plugin may already hold objects from that dependency.

Allow an operation with connected players

java -jar dist/proxyctl.jar 12345 reload maintenance --online

Changes are refused by default while players are connected. --online removes that player-count guard after the operator has qualified the exact deployment on staging. It does not pause network processing, drain every asynchronous event chain, migrate player state, or prove that a third-party plugin is safe to reload.

Audit retired classloaders

java -jar dist/proxyctl.jar 12345 audit
java -jar dist/proxyctl.jar 12345 audit --gc

audit reports the weak-reference state of tracked retired classloaders, loaded/unloaded class counts, heap usage, Metaspace and code-heap usage, thread count, and buffer-pool memory.

COLLECTED confirms that the particular tracked classloader was collected. UNVERIFIED means the loader is still live without a qualifying explicit probe. LIVE_AFTER_REQUESTED_GC means it remained live after a ProxyCtl audit --gc probe during which a recognized old-generation collection count changed. That state is evidence for investigation, not proof of a permanent leak.

--gc requests two garbage collections with short waits. It is intended for staging diagnostics and can cause pauses. A qualifying explicit probe can block affected IDs when no mutation is active. Only entries retired before the probe are eligible. Natural collector counters are informational: a ZGC major cycle, a G1 concurrent cycle, or the absence of a full GC does not automatically refuse a fourth reload. Normal load, unload, and reload operations do not request GC. The 128-entry tracking limit remains a separate capacity guard checked before mutation. Unknown collectors and ignored explicit-GC requests cannot establish collection evidence.

The audit also reports active staged plugin artifacts and pending filesystem cleanup. Live plugin copies and copies retained after incomplete cleanup are kept; successful loader closure permits deletion.

Options and output

Option Meaning
--online Allow mutation when the proxy reports connected players.
--gc Request GC during an audit operation.
--port N Supply the Velocity status port used for initial instance discovery.
--timeout N Set one total operation deadline from 1 to 600 seconds; default: 60. All stage waits use the remaining budget.
--json Emit a JSON object with status, pid, and the textual report.
java -jar dist/proxyctl.jar 12345 list --json
java -jar dist/proxyctl.jar 12345 inspect maintenance --port 25577 --json

The JSON report is a textual diagnostic field, not a fully structured plugin-management API. JVM attachment failures and command-line errors can occur before a response envelope is available.

Exit code Meaning
0 The requested operation completed.
2 The agent refused the operation or reported an operation failure.
Other nonzero code CLI, argument, filesystem, attachment, or JVM-launch failure.

How it works

Attachment and communication

The same JAR contains the CLI entry point, a version-checking bootstrap, and the resident agent. The first CLI invocation installs the agent with loadAgent; subsequent invocations read its endpoint and capability through VirtualMachine.getAgentProperties() and communicate over a persistent local listener. Commands, acknowledgements, and replies never use repeated loadAgent calls or temporary exchange files. Implicit reload performs a source/generation lookup and a mutation over that same channel.

This avoids the native JPLIS allocation retained by each agent-loading invocation, the JDK 21-24 Attach argument limit for ordinary commands, and repeated dynamic-agent warnings. The installation argument contains only a fixed-size build hash. The CLI checks the staged agent path plus that argument against a conservative 1024-byte installation limit and explains when a shorter target java.io.tmpdir is needed. A first installation can still produce the JDK warning unless -XX:+EnableDynamicAgentLoading is configured.

The listener binds explicitly to IPv4 loopback on a random port. A random 256-bit capability is published in private JVM agent properties, which the controller reads using its existing OS Attach privileges. It is absent from ordinary system properties and the standard JMX Runtime system-properties view. Installing this channel uses the tested HotSpot jdk.internal.vm.VMSupport agent-properties accessor, opened through Instrumentation; other JVM implementations are unverified. Every connection must present that capability before any request is parsed or executed; comparison uses MessageDigest.isEqual. This is a portable capability-based design, not Unix SO_PEERCRED authentication. The unencrypted loopback channel assumes the same trusted host/network namespace and Attach security boundary. Do not publish, forward, or log its capability or port. Code already running inside the proxy has the proxy's privileges and is outside this authentication boundary.

Frames use bounded length-prefixed UTF-8 fields, with no Properties date header, ASCII escaping, or base64 expansion on the socket. Requests are limited to 64 KiB, responses to 2 MB, and field counts to 128. Authentication and request upload have a five-second absolute server deadline; incomplete or malformed clients are closed. Eight daemon channel workers and an eight-connection queue bound admitted work. Completed responses have no persistent reply map. Socket/deadline state is released when the connection finishes, including a disconnected CLI. Native attachment and JVM safepoint delays are not forcibly cancelled by channel deadlines.

The controller stages the agent JAR through the target's filesystem view and assigns private Linux permissions and target UID/GID ownership. The bootstrap defines all bundled agent/shaded classes before publishing the channel. Deleting the staged agent file after installation does not require reinstallation or a proxy restart: later commands do not reopen it or load the agent again. The installed classes, listener, capability, and fixed agent state remain resident until JVM exit.

A plugin JAR inaccessible to the target, or supplied by another UID, is copied to a fresh private staging directory. Its marker, original controller path, and runtime path are tracked separately. A live loader keeps its copy. After successful cleanup and loader closure, the known plugin JAR, marker, and empty staging directory are deleted. Copies rejected during preflight or successfully cleaned after failed construction are removed too. Uncertain/incomplete cleanup preserves the copy; deletion failures remain visible as pending cleanup and are retried. Tracking is bounded to 512 staged artifacts. There is no recursive deletion of plugin-created content.

Agent installation can leave one small code directory per installation/JVM, and abrupt controller termination before handing off a staged request can leave an unregistered copy. Never delete live plugin copies indiscriminately. Existing directories left by older versions are not adopted or recursively purged. Remove abandoned directories after their target JVM stops. To protect live staging from systemd-tmpfiles age cleanup, an operator can put the following rule in /etc/tmpfiles.d/proxyctl.conf:

x /tmp/proxyctl-code-* - - - -

Adjust the path if the target uses a different temporary directory. This exclusion does not replace ProxyCtl's own cleanup after successful plugin unload.

Mutations are serialized. Read-only diagnostics use immutable snapshots and do not wait for the mutation lock. Output states the snapshot timestamp and active mutation so that cached data is not mistaken for a live transactional view. A still-executing callback can temporarily keep other mutations busy; it does not permanently block every plugin ID.

Upgrading an installed agent

The agent remains in the JVM after a CLI invocation. A different CLI build is refused before performing plugin work. An installed legacy 0.1 agent is detected explicitly by the new bootstrap rather than receiving a request in an incompatible format. Restart the proxy during a planned maintenance window before switching the installed agent build. Matching plugin reloads do not require proxy restarts; upgrading the resident agent is a separate operation. Rewriting the CLI JAR cannot replace classes already loaded in another JVM.

Locating the proxy instance

For BungeeCord-family proxies, the agent obtains the existing ProxyServer singleton.

For Velocity, the first operation temporarily retransforms selected VelocityServer getters to capture the server instance. It issues a local Minecraft status request to exercise the proxy. In finally, it removes its transformer and requests retransformation again to restore the class without that transformer. The server is then held through a weak reference for subsequent operations.

The initial status request uses the bind address from the target working directory's velocity.toml, or the supplied --port. Both TOML basic double-quoted and literal single-quoted bind strings are accepted. Discovery can fail if local status requests are filtered or the bind configuration is not discoverable. Other agents that also transform these classes have not been qualified.

Lifecycle and resource cleanup

Velocity uses its own plugin loader and Guice module construction. Initialization and shutdown handlers are selected only for the target plugin; lifecycle events are not broadcast to unrelated plugins. EventTask and continuation completion are awaited, and lifecycle exceptions are returned to the CLI.

BungeeCord-family loading uses the proxy's plugin description and classloader implementation, then calls the plugin lifecycle methods. The Waterfall four-argument classloader constructor receives the actual library loader, preserving dependencies declared in libraries:. Synchronous lifecycle code runs on a non-daemon worker using the proxy core classloader as TCCL, matching startup context instead of inheriting the controller's daemon/system-loader context. On unload, cleanup uses the proxy's known registration and scheduler APIs.

Known cleanup covers:

  1. Targeted shutdown callbacks.
  2. Registered event listeners and command aliases, including identifiable Velocity command-graph references.
  3. Scheduled tasks and the executor supplied by the proxy to the plugin.
  4. Additional ThreadPoolExecutor instances whose ThreadFactory class is loaded by the target plugin's classloader. Scheduled-executor shutdown policies are adjusted to stop delayed and periodic work.
  5. Detectable plugin-owned platform threads. Enumeration uses ThreadGroup.enumerate with approximately 200 ms bounded polling, not repeated global stack snapshots. TCCL alone is not treated as proof of thread ownership. A contaminated executor owned by another loaded plugin has its context loader restored; unknown foreign TCCL retainers are reported separately without waiting for their threads to die. Direct or identifiable ThreadLocal references are detected and can refuse unload; they are not automatically cleared.
  6. Velocity handler caches and proxy plugin-instance/container registries.
  7. Global plugin-classloader registrations, JAR handles, and known Bungee library classloaders.
  8. Specific Guice diagnostic-cache entries for already retired loaders after an error is rendered.

This is explicit cleanup of known resources, not heap-wide ownership discovery. Arbitrary plugin resources still depend on the plugin's own shutdown implementation.

Refusal and failure handling

Protected plugin IDs include LuckPerms, ViaVersion, ViaBackwards, ViaRewind, Geyser/Floodgate, PacketEvents, LimboAPI, Protocolize, and core proxy modules. The exact checks are in RuntimeAdapter.protectedPlugin. This denylist is conservative and incomplete; absence from it is not an approval.

An incomplete shutdown or cleanup blocks further mutations of that plugin until restart. A failed initialization triggers available cleanup, then also blocks the plugin. Automatic rollback is not claimed: callbacks may already have changed files, a database, player state, or another external system.

Retired-loader history uses weak references and is bounded to 128 entries. Required capacity is checked before any unload, including room for a possible failed replacement. Natural GC counters never trigger an automatic per-plugin suspicion guard. Still-live loaders from a qualifying explicit audit --gc can block the affected ID; this is a conservative operator-requested diagnostic policy rather than proof of a leak. The blocked-plugin set is also capped by refusing further mutations at its configured limit.

--timeout is a single monotonic deadline for the entire mutation, including synchronous callbacks, asynchronous continuations, executor waits, and thread checks. No replacement load starts after the budget expires. On timeout, the worker is interrupted, the affected plugin is blocked, and diagnostics remain available. Cancelled load rollback attempts resource cleanup with lifecycle invocation disabled; slow shutdown callbacks are not repeated. Cleanup failures are attached as suppressed exceptions rather than hiding the original failure.

A plugin callback can ignore interruption and keep running. ProxyCtl does not call Thread.stop or forcibly destroy it. While that worker remains active, the mutation serializer remains busy. Once it returns, unrelated plugin IDs can be changed again; a global permanent timeout flag is not used. If the callback never returns, restart the proxy. The deadline bounds the controller's wait, not the side effects or lifetime of arbitrary foreign code.

Safety boundaries

Loading arbitrary plugin code gives that code the privileges of the proxy process. ProxyCtl is not a sandbox and cannot make an untrusted JAR safe.

The following are outside the demonstrated guarantees:

  • Complete ownership tracking for plugin channels, injected Netty handlers, packet registries, JVM shutdown hooks, JDBC drivers, and third-party global registries.
  • Arbitrary object graphs held by another plugin or by complex ThreadLocal containers.
  • Exhaustive detection or termination of virtual threads.
  • Stopping every callback already executing or captured in an asynchronous event chain.
  • Atomic state transfer, automatic rollback, database-schema migration, or player-session migration between plugin versions.
  • Guaranteed class unloading at a particular instant, zero allocations, or an indefinitely flat heap, Metaspace, native-memory, or JIT-code footprint.
  • Universal compatibility with proxy forks, future versions, other agents, or different JDK implementations.

Even diagnostic operations are not entirely passive on first attachment: agent installation, module opening, local status traffic, and temporary Velocity retransformation can occur. The agent's classes, module access changes, and bounded state remain in the JVM after the CLI exits. Uninstalling or unloading the agent itself is not implemented.

The agent does not add a permanent per-packet or per-event callback after successful discovery. This does not imply zero allocation or zero timing effects during a reload. JAR parsing, class loading, proxy initialization, instrumentation, JIT compilation, diagnostics, and plugin code allocate memory and can cause pauses.

Recorded validation

The main recorded suites completed 150 reloads of real plugins and 48 fixture version swaps, plus 21 expected-refusal/failure scenarios. Retired plugin classloaders were collected in the successful suites. Connected-client suites retained one Minecraft 1.8 protocol client through the real proxy while sending parallel status requests.

The backend and client were minimal Python protocol peers, not a full Minecraft server and graphical client. These tests do not establish gameplay coverage across modern protocols, large player counts, or arbitrary plugin APIs. See TEST_REPORT.md for counts, measurements, discovered retention paths, the shutdown-race attribution, and the precise limits of the evidence. Compact results are stored in tests/results.json.

Reproduce the tests

Use a full JDK 25 for the complete matrix. Set PROXYCTL_JAVA to its Java executable if that JDK is not the default on PATH.

$env:PROXYCTL_JAVA = "C:\Java\jdk-25\bin\java.exe"
python tests/run.py integration
export PROXYCTL_JAVA=/opt/jdk-25/bin/java
python tests/run.py integration

The shell examples describe configuration; the report distinguishes the original Windows campaign from the subsequent Windows/Linux regression campaign. python tests/run.py build performs the utility build, CLI launch check, Python syntax validation, and Java/Python unit tests for arguments, JSON/protocol encoding, GC observations, history capacity, relocation, compiler selection, stale class output, atomic JAR replacement, and packaging freshness.

The integration runner builds the utility, downloads pinned artifacts, boots the four proxies, builds fixture plugins, and executes the real-plugin, connected-client, negative, startup-loaded, deadline, review-regression, transport, and final-regression suites sequentially. Fixture compilation extracts its API dependencies directly from the pinned Bungee bundle and does not depend on a prior proxy boot. Run it in an isolated checkout with available local ports. The test harness owns its .lab/run-* directories and replaces plugin JARs in those test directories.

Main ports are 26800-26803; the deadline and regression tests use 26810 and 26811; the protocol backend uses 26999. The optional baseline shutdown diagnostic uses 26812. Review regressions use 26820-26832; Linux UID/namespace regressions use 26850-26852; transport regressions use 26860, and the Java 21 Attach check uses 26861. Windows/WSL localhost forwarding can also make nominally separate OS runs compete for the same ports. Use PROXYCTL_TEST_PORT_OFFSET=1000 to shift all fixed harness ports by 1000 when running an independent checkout alongside another local/WSL test environment. Do not run these suites concurrently against the same checkout or ports.

Individual stages can also be run:

python build.py
python tests/download.py
python tests/smoke.py
python tests/build_fixtures.py
python tests/real_plugins.py
python tests/fixture_tests.py
python tests/negative_tests.py
python tests/startup_online.py
python tests/deadline_test.py
python tests/review_tests.py
python tests/transport_tests.py
python tests/attach_compatibility.py
python tests/final_regression.py
python tests/collect_report.py

Increase PROXYCTL_CYCLES above its default of 12 for longer fixture runs, or PROXYCTL_REAL_CYCLES above its default of 20 for longer startup-loaded runs. The test assertions also require a minimum volume of successful status traffic; these variables are intended for extending the suites.

The Linux user/namespace suite must be run as root after fixture compilation: sudo env PROXYCTL_JAVA=/path/to/jdk-25/bin/java python3 tests/linux_isolation.py. It starts only isolated test JVMs as nobody; it does not change the default JDK or global filesystem mounts. CI executes it after the Linux integration suite, then selects JDK 21 for the separate real-Bungee long-Unicode-path Attach regression. Locally, run tests/attach_compatibility.py with PROXYCTL_JAVA set to the intended JDK.

Generated proxies, downloaded dependencies, console logs, JFR recordings, heap dumps, and raw reports stay in ignored .lab/, build/, dist/, and reports/ directories. They are excluded from Git and release packages. JFR, heap dumps, and raw logs can contain local or application data and should be reviewed before sharing.

For offline investigation, python tests/hprof_roots.py capture.hprof searches a captured HPROF for paths retaining plugin classloaders. --soft also includes soft-reference paths. This small parser was used for the observed retention paths; it is a diagnostic helper, not a complete replacement for a heap analyzer. It does not collect dumps or attach to a live JVM itself.

Package a build

python build.py
python release.py

Packaging first verifies that the JAR's embedded source/build fingerprint matches the current compiled inputs. A stale build is refused. It creates dist/proxyctl-0.3.0-rc.1.zip, the standalone JAR, documentation, PowerShell and POSIX shell launchers, and SHA256SUMS. Both launchers honor PROXYCTL_JAVA. The package contains source and reproducible test definitions, not downloaded third-party binaries or raw diagnostic captures.

Troubleshooting

Symptom Action
PID is absent or attachment is denied Check the operating-system user, PID/container namespace, full-JDK availability, and target JVM attachment policy.
Dynamic agent loading is disabled Adjust JVM startup policy during a planned restart; ProxyCtl has no bypass.
Velocity discovery times out Check local status access and the target working directory's bind configuration; supply --port when needed.
Required proxy field or method is missing Treat that proxy build as unsupported. Do not retry mutations by bypassing reflection checks.
A dependency or duplicate ID is reported Resolve the plugin graph or JAR selection before retrying.
Cleanup, an executor, or a plugin thread does not finish Preserve diagnostics and restart the proxy. Repeated changes to the blocked plugin are refused.
A loader remains after audit --gc Inspect heap roots and pending work; do not assume repeated GC will repair the plugin.
An operation times out or the response is missing Use snapshot diagnostics before retrying. The callback may still be running; a deadline is not a rollback. Only the affected plugin ID is permanently blocked.
CLI/agent build mismatch Use the matching CLI or restart the proxy to upgrade the resident agent; replacement on disk does not replace loaded classes.
Updated code disappears after the next restart Install the desired JAR in the startup plugin directory separately and remove duplicate versions.

Repository layout

Path Purpose
src/dev/proxyctl/ CLI, agent, discovery, reflection helpers, and proxy adapters.
build.py Verified dependency download and standalone JAR build.
release.py Source/binary packaging and SHA-256 output.
tests/fixtures/ Normal and deliberately failing plugins used by the integration suites.
tests/network.py Minimal Minecraft 1.8 backend, client, and status-load peers.
tests/artifacts.json Pinned external proxy/plugin artifacts.
tests/results.json Compact recorded validation results without raw logs or local paths.
TEST_REPORT.md Historical test matrix, measurements, findings, and open issues.

License and references

ProxyCtl is distributed under the MIT License. Embedded ASM is covered by its BSD 3-Clause license; see THIRD_PARTY_NOTICES.md. Third-party proxy and plugin artifacts retain their own licenses.

Implementation behavior was checked against Velocity sources, BungeeCord sources, the Instrumentation API, and the Java class-unloading specification.

Related plugin-based managers include PlugManX, BungeePluginManager, and BileTools. ProxyCtl uses an external Attach/agent interface instead of requiring a management plugin.

About

External Java-agent CLI for loading, unloading, and reloading Minecraft proxy plugins. Velocity, BungeeCord, and Waterfall staging validation.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages