-
-
Notifications
You must be signed in to change notification settings - Fork 625
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
428 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
83 changes: 83 additions & 0 deletions
83
...c/main/java/com/velocitypowered/proxy/connection/backend/BackendConfigSessionHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
/* | ||
* Copyright (C) 2018-2023 Velocity Contributors | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package com.velocitypowered.proxy.connection.backend; | ||
|
||
import com.velocitypowered.api.event.player.ServerLoginPluginMessageEvent; | ||
import com.velocitypowered.api.network.ProtocolVersion; | ||
import com.velocitypowered.api.proxy.crypto.IdentifiedKey; | ||
import com.velocitypowered.api.proxy.messages.MinecraftChannelIdentifier; | ||
import com.velocitypowered.proxy.VelocityServer; | ||
import com.velocitypowered.proxy.config.PlayerInfoForwarding; | ||
import com.velocitypowered.proxy.config.VelocityConfiguration; | ||
import com.velocitypowered.proxy.connection.MinecraftConnection; | ||
import com.velocitypowered.proxy.connection.MinecraftSessionHandler; | ||
import com.velocitypowered.proxy.connection.VelocityConstants; | ||
import com.velocitypowered.proxy.connection.client.ConnectedPlayer; | ||
import com.velocitypowered.proxy.connection.util.ConnectionRequestResults; | ||
import com.velocitypowered.proxy.connection.util.ConnectionRequestResults.Impl; | ||
import com.velocitypowered.proxy.protocol.ProtocolUtils; | ||
import com.velocitypowered.proxy.protocol.StateRegistry; | ||
import com.velocitypowered.proxy.protocol.packet.Disconnect; | ||
import com.velocitypowered.proxy.protocol.packet.EncryptionRequest; | ||
import com.velocitypowered.proxy.protocol.packet.LoginPluginMessage; | ||
import com.velocitypowered.proxy.protocol.packet.LoginPluginResponse; | ||
import com.velocitypowered.proxy.protocol.packet.ServerLoginSuccess; | ||
import com.velocitypowered.proxy.protocol.packet.SetCompression; | ||
import com.velocitypowered.proxy.protocol.packet.config.StartUpdate; | ||
import com.velocitypowered.proxy.util.except.QuietRuntimeException; | ||
import io.netty.buffer.ByteBuf; | ||
import io.netty.buffer.ByteBufUtil; | ||
import io.netty.buffer.Unpooled; | ||
import net.kyori.adventure.text.Component; | ||
import org.apache.logging.log4j.LogManager; | ||
import org.apache.logging.log4j.Logger; | ||
|
||
import javax.crypto.Mac; | ||
import javax.crypto.SecretKey; | ||
import javax.crypto.spec.SecretKeySpec; | ||
import java.security.InvalidKeyException; | ||
import java.security.NoSuchAlgorithmException; | ||
import java.util.concurrent.CompletableFuture; | ||
|
||
/** | ||
* Handles the initial server configuration setup | ||
*/ | ||
public class BackendConfigSessionHandler implements MinecraftSessionHandler { | ||
|
||
private static final Logger logger = LogManager.getLogger(BackendConfigSessionHandler.class); | ||
|
||
private final VelocityServer server; | ||
private final VelocityServerConnection serverConn; | ||
private final CompletableFuture<Impl> resultFuture; | ||
private boolean informationForwarded; | ||
|
||
BackendConfigSessionHandler(VelocityServer server, VelocityServerConnection serverConn, | ||
CompletableFuture<Impl> resultFuture) { | ||
this.server = server; | ||
this.serverConn = serverConn; | ||
this.resultFuture = resultFuture; | ||
} | ||
|
||
|
||
@Override | ||
public boolean handle(StartUpdate packet) { | ||
|
||
return true; | ||
} | ||
|
||
} |
Oops, something went wrong.