Skip to content

Commit e853d61

Browse files
Make default protocol source
1 parent 3a35d1e commit e853d61

3 files changed

Lines changed: 12 additions & 11 deletions

File tree

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Hytale HyRCON Mod
1+
# HyRCON Mod
22

33
This mod runs a TCP server that listens for commands from external HyRCON clients to run in the server console, allowing easier commands in headless containerized deployments.
44

@@ -9,15 +9,15 @@ When you first add the mod to your server and start it, a new directory will get
99
This plugin can also read configuration elements directly from the process environment variables for use in things like docker, you can configure this mod with the following variables at server startup.
1010

1111
- `HYRCON_ENABLED` / `RCON_ENABLED`: Enables or disables the HyRCON server. Defaults to `true`.
12-
- `HYRCON_BIND` / `RCON_BIND`: Optional combined bind address in `host:port` (or `[ipv6]:port`) form. Defaults to `0.0.0.0:5522`.
12+
- `HYRCON_BIND` / `RCON_BIND`: Optional combined bind address in `host:port` (or `[ipv6]:port`) form. Defaults to `0.0.0.0:25575`.
1313
- `HYRCON_HOST` / `RCON_HOST`: Host fallback when no bind address is set. Defaults to `0.0.0.0`.
14-
- `HYRCON_PORT` / `RCON_PORT`: Port fallback when no bind address is set. Defaults to `5522`.
15-
- `HYRCON_PROTOCOL` / `RCON_PROTOCOL`: Chooses the remote console protocol to expose. Use `hyrcon` for the legacy line-based protocol or `source` for Source-compatible RCON. Defaults to `hyrcon` for now.
14+
- `HYRCON_PORT` / `RCON_PORT`: Port fallback when no bind address is set. Defaults to `25575`.
15+
- `HYRCON_PROTOCOL` / `RCON_PROTOCOL`: Chooses the remote console protocol to expose. Use `hyrcon` for the legacy line-based protocol or `source` for Source-compatible RCON. Defaults to `source`.
1616
- `HYRCON_PASSWORD` / `RCON_PASSWORD`: Password required for client authentication. Defaults to `changeme`.
1717

1818
## Connecting to the HyRCON Server
1919

20-
We've created a simple Rust client that can be used to connect to the HyRCON server, which you can download from [here](https://github.com/dustinrouillard/hyrcon-client/releases).
20+
I created a simple Rust client that can be used to connect to the HyRCON server, which you can download from [here](https://github.com/dustinrouillard/hyrcon-client/releases), but any tools that can connect to a Source-compatible RCON server should work, if you come across any issues please open an issue on the GitHub repository.
2121

2222
## Running your server in Docker
2323

src/main/java/to/dstn/hytale/hyrcon/HyRconConfiguration.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,9 @@ public final class HyRconConfiguration {
4444

4545
public static final boolean DEFAULT_ENABLED = false;
4646
public static final String DEFAULT_HOST = "0.0.0.0";
47-
public static final int DEFAULT_PORT = 5522;
48-
public static final HyRconProtocol DEFAULT_PROTOCOL = HyRconProtocol.HYRCON;
47+
public static final int DEFAULT_PORT = 25575;
48+
public static final HyRconProtocol DEFAULT_PROTOCOL =
49+
HyRconProtocol.SOURCE_RCON;
4950

5051
private final boolean enabled;
5152
private final String host;

src/main/java/to/dstn/hytale/hyrcon/HyRconProtocol.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public enum HyRconProtocol {
1717
* terminated by newlines and optionally authenticate with the {@code AUTH}
1818
* verb.
1919
*/
20-
HYRCON("hyrcon", HyRconConfiguration.DEFAULT_PORT, false),
20+
HYRCON("hyrcon", 5522, false),
2121

2222
/**
2323
* Source RCON protocol compatible with Valve's specification.
@@ -73,16 +73,16 @@ public boolean isSourceCompatible() {
7373

7474
/**
7575
* Attempts to resolve a protocol from a user-supplied token. Comparison is
76-
* case-insensitive and falls back to the legacy HyRCON protocol if the
77-
* input is {@code null}.
76+
* case-insensitive and falls back to the Source-compatible protocol if the
77+
* input is {@code null} or blank.
7878
*
7979
* @param rawToken candidate token
8080
* @return matching protocol, never {@code null}
8181
* @throws IllegalArgumentException if the token does not map to a protocol
8282
*/
8383
public static HyRconProtocol fromToken(String rawToken) {
8484
if (rawToken == null || rawToken.isBlank()) {
85-
return HYRCON;
85+
return SOURCE_RCON;
8686
}
8787

8888
String normalized = normalize(rawToken);

0 commit comments

Comments
 (0)