The Leoxy command line interface starts the reverse proxy, manages it as a background process, and prints the executable version.
From the repository root, build the executable:
go build -o leoxy ./app/cliOn Windows, build leoxy.exe:
go build -o leoxy.exe ./app/cliRun the commands from the directory containing the leoxy/ configuration directory. The configuration is read from leoxy/config.yaml relative to the current working directory. If it does not exist, Leoxy creates a default configuration.
Run the server in the foreground:
./leoxyStart the server as a background process:
./leoxy startLeoxy appends process output to leoxy/log/leoxy.log and stores the process ID in leoxy/keys/leoxy.pid.
Stop the background process started with leoxy start:
./leoxy stopThe stop command reads the process ID from leoxy/keys/leoxy.pid and removes the PID file after stopping the process.
Print the executable version:
./leoxy versionThe root help (-h or --help) includes the config file location, supported
protocols, security settings, environment overrides, HTTP endpoints, build
instructions, and foreground/background commands. Cobra also provides help for
each visible subcommand:
./leoxy --help
./leoxy start --help
./leoxy stop --help
./leoxy version --helpUse -h instead of --help for the short flag.
Configure the listener and upstreams in leoxy/config.yaml. See the configuration guide for the available YAML settings and security options.
PORT overrides server.port. The RATE_LIMIT, JWT_SECRET, JWT_ISSUER, JWT_AUDIENCE, API_KEYS, and REDIS_PASSWORD environment variables override their corresponding global security settings. Keep credentials in the environment rather than committing them to the YAML file.
The run subcommand is an internal command used by leoxy start; it is hidden from CLI help.