mirror of
https://github.com/PaperMC/Waterfall.git
synced 2025-01-23 08:01:53 +01:00
ce48007a7d
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing BungeeCord Changes: 1ef4d27d #3543: Bump io.netty:netty-bom from 4.1.97.Final to 4.1.99.Final 94a1fb51 #3535: Queue packets of Title api 78aef86a #3533: Don't put initial client in configure phase until server is ready
32 lines
1.7 KiB
Diff
32 lines
1.7 KiB
Diff
From 30d3802d87f843f01a3b02e53d4ca306abe11d42 Mon Sep 17 00:00:00 2001
|
|
From: theminecoder <theminecoder.dev@gmail.com>
|
|
Date: Sun, 19 Jul 2020 10:18:23 +1000
|
|
Subject: [PATCH] Add auth url option
|
|
|
|
|
|
diff --git a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
|
|
index d7c29eb8..f0346fc6 100644
|
|
--- a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
|
|
+++ b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
|
|
@@ -76,6 +76,8 @@ import net.md_5.bungee.util.QuietException;
|
|
public class InitialHandler extends PacketHandler implements PendingConnection
|
|
{
|
|
|
|
+ private static final String MOJANG_AUTH_URL = System.getProperty("waterfall.auth.url", "https://sessionserver.mojang.com/session/minecraft/hasJoined?username=%s&serverId=%s%s");
|
|
+
|
|
private final BungeeCord bungee;
|
|
private ChannelWrapper ch;
|
|
@Getter
|
|
@@ -500,7 +502,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
|
String encodedHash = URLEncoder.encode( new BigInteger( sha.digest() ).toString( 16 ), "UTF-8" );
|
|
|
|
String preventProxy = ( BungeeCord.getInstance().config.isPreventProxyConnections() && getSocketAddress() instanceof InetSocketAddress ) ? "&ip=" + URLEncoder.encode( getAddress().getAddress().getHostAddress(), "UTF-8" ) : "";
|
|
- String authURL = "https://sessionserver.mojang.com/session/minecraft/hasJoined?username=" + encName + "&serverId=" + encodedHash + preventProxy;
|
|
+ String authURL = String.format( MOJANG_AUTH_URL, encName, encodedHash, preventProxy );
|
|
|
|
Callback<String> handler = new Callback<String>()
|
|
{
|
|
--
|
|
2.42.0
|
|
|