Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-11-20 06:50:09 +01:00
Fix Xbox authentication and add support for proxies (#1162)
Waterdog and ProxyPass will work when `enable-proxy-connections` is set to true at the expense of security.
Dieser Commit ist enthalten in:
Ursprung
b07433698a
Commit
8c514d9feb
@ -258,6 +258,11 @@ public class GeyserSpongeConfiguration implements GeyserConfiguration {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isEnableProxyConnections() {
|
||||||
|
return node.getNode("enable-proxy-connections").getBoolean(false);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMtu() {
|
public int getMtu() {
|
||||||
return node.getNode("mtu").getInt(1400);
|
return node.getNode("mtu").getInt(1400);
|
||||||
|
@ -36,7 +36,7 @@ import java.util.Map;
|
|||||||
public interface GeyserConfiguration {
|
public interface GeyserConfiguration {
|
||||||
|
|
||||||
// Modify this when you update the config
|
// Modify this when you update the config
|
||||||
int CURRENT_CONFIG_VERSION = 3;
|
int CURRENT_CONFIG_VERSION = 4;
|
||||||
|
|
||||||
IBedrockConfiguration getBedrock();
|
IBedrockConfiguration getBedrock();
|
||||||
|
|
||||||
@ -120,6 +120,9 @@ public interface GeyserConfiguration {
|
|||||||
String getUniqueId();
|
String getUniqueId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if u have offline mode enabled pls be safe
|
||||||
|
boolean isEnableProxyConnections();
|
||||||
|
|
||||||
int getMtu();
|
int getMtu();
|
||||||
|
|
||||||
int getConfigVersion();
|
int getConfigVersion();
|
||||||
|
@ -143,6 +143,9 @@ public abstract class GeyserJacksonConfiguration implements GeyserConfiguration
|
|||||||
private String uniqueId;
|
private String uniqueId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@JsonProperty("enable-proxy-connections")
|
||||||
|
private boolean enableProxyConnections = false;
|
||||||
|
|
||||||
@JsonProperty("mtu")
|
@JsonProperty("mtu")
|
||||||
private int mtu = 1400;
|
private int mtu = 1400;
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ public class LoginEncryptionUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (lastKey != null) {
|
if (lastKey != null) {
|
||||||
EncryptionUtils.verifyJwt(jwt, lastKey);
|
if (!EncryptionUtils.verifyJwt(jwt, lastKey)) return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
JsonNode payloadNode = JSON_MAPPER.readTree(jwt.getPayload().toString());
|
JsonNode payloadNode = JSON_MAPPER.readTree(jwt.getPayload().toString());
|
||||||
@ -105,7 +105,7 @@ public class LoginEncryptionUtils {
|
|||||||
|
|
||||||
connector.getLogger().debug(String.format("Is player data valid? %s", validChain));
|
connector.getLogger().debug(String.format("Is player data valid? %s", validChain));
|
||||||
|
|
||||||
if (!validChain) {
|
if (!validChain && !session.getConnector().getConfig().isEnableProxyConnections()) {
|
||||||
session.disconnect(LanguageUtils.getLocaleStringLog("geyser.network.remote.invalid_xbox_account"));
|
session.disconnect(LanguageUtils.getLocaleStringLog("geyser.network.remote.invalid_xbox_account"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -118,8 +118,13 @@ metrics:
|
|||||||
uuid: generateduuid
|
uuid: generateduuid
|
||||||
|
|
||||||
# ADVANCED OPTIONS - DO NOT TOUCH UNLESS YOU KNOW WHAT YOU ARE DOING!
|
# ADVANCED OPTIONS - DO NOT TOUCH UNLESS YOU KNOW WHAT YOU ARE DOING!
|
||||||
|
|
||||||
|
# Allow connections from ProxyPass and Waterdog.
|
||||||
|
# See https://www.spigotmc.org/wiki/firewall-guide/ for assistance - use UDP instead of TCP.
|
||||||
|
enable-proxy-connections: false
|
||||||
|
|
||||||
# The internet supports a maximum MTU of 1492 but could cause issues with packet fragmentation.
|
# The internet supports a maximum MTU of 1492 but could cause issues with packet fragmentation.
|
||||||
# 1400 is the default.
|
# 1400 is the default.
|
||||||
# mtu: 1400
|
# mtu: 1400
|
||||||
|
|
||||||
config-version: 3
|
config-version: 4
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 94d30c1c6c4518932b813826bfcef680575a3c9c
|
Subproject commit 88678e69bf358cd562bd410a2459384aeb7ba482
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren