update README

This commit is contained in:
onyx-and-iris 2026-02-18 14:28:31 +00:00
parent 6bffa14240
commit 775979bfc8

View File

@ -6,6 +6,8 @@ A modification of [lilproxy][lilproxy_url] that forwards only Q3 rcon/query pack
Unfortunately the Q3Rcon engine ties the rcon port to the game servers public port used for client connections. This proxy will allow you to run rcon through a separate whitelisted port. Unfortunately the Q3Rcon engine ties the rcon port to the game servers public port used for client connections. This proxy will allow you to run rcon through a separate whitelisted port.
---
### Use ### Use
#### Flags #### Flags
@ -16,7 +18,7 @@ Unfortunately the Q3Rcon engine ties the rcon port to the game servers public po
/usr/local/bin/q3rcon-proxy \ /usr/local/bin/q3rcon-proxy \
--proxy-host=0.0.0.0 \ --proxy-host=0.0.0.0 \
--target-host=localhost \ --target-host=localhost \
--ports-mapping=28961:28960 \ --port-map=20000:28960 --port-map=20001:28961 --port-map=20002:28962 \
--session-timeout=20 \ --session-timeout=20 \
--loglevel=debug --loglevel=debug
``` ```
@ -27,18 +29,25 @@ Each of the flags has a corresponding environment variable:
- `Q3RCON_PROXY_HOST`: The host the proxy server sits on. - `Q3RCON_PROXY_HOST`: The host the proxy server sits on.
- `Q3RCON_TARGET_HOST`: The host the game servers sit on. - `Q3RCON_TARGET_HOST`: The host the game servers sit on.
- `Q3RCON_PORTS_MAPPING`: A mapping as a string with `source:target` pairs delimited by `;`. - `Q3RCON_PORT_MAP`: A mapping as a string with `source:target` pairs delimited by `,`.
- `Q3RCON_SESSION_TIMEOUT`: Timeout in seconds for each udp session. - `Q3RCON_SESSION_TIMEOUT`: Timeout in seconds for each udp session.
- `Q3RCON_LOGLEVEL`: The application's logging level (see [Logging][logging]). - `Q3RCON_LOGLEVEL`: The application's logging level (see [Logging][logging]).
Multiple rcon proxies may be configured by setting *--ports-mapping/Q3RCON_PORTS_MAPPING* like so: example .envrc:
```console ```bash
export Q3RCON_PORTS_MAPPING="20000:28960;20001:28961;20002:28962" #!/usr/bin/env bash
export Q3RCON_PROXY_HOST="0.0.0.0"
export Q3RCON_TARGET_HOST="localhost"
export Q3RCON_PORT_MAP="20000:28960,20001:28961,20002:28962"
export Q3RCON_SESSION_TIMEOUT=20
``` ```
This would configure q3rcon-proxy to run 3 proxy servers listening on ports 20000, 20001 and 20002 that redirect rcon requests to game servers on ports 28960, 28961 and 28962 respectively. This would configure q3rcon-proxy to run 3 proxy servers listening on ports 20000, 20001 and 20002 that redirect rcon requests to game servers on ports 28960, 28961 and 28962 respectively.
---
### Logging ### Logging
Set the log level with environment variable `Q3RCON_LOGLEVEL`. Set the log level with environment variable `Q3RCON_LOGLEVEL`.
@ -55,6 +64,8 @@ Acceptable values are:
If not set it will default to `info`. If not set it will default to `info`.
---
### Special Thanks ### Special Thanks
[Dylan][user_link] For writing [lilproxy][lilproxy_url]. [Dylan][user_link] For writing [lilproxy][lilproxy_url].