Skip to content

Commit

Permalink
detect ViaProxy
Browse files Browse the repository at this point in the history
  • Loading branch information
Jo0001 committed Feb 22, 2025
1 parent 9f1e19b commit beb8fa3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/analyze.js
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ export async function analyze(data) {
const velocity = ["com.velocitypowered.proxy.", "INFO]: Booting up Velocity", "INFO]: [connected player]"];
const paper_spigot = ["io.papermc.paper.", "org.bukkit.plugin.", "This server is running Paper version", ".jar:git-Spigot"];
const fabric_forge = ["net.fabricmc.", " net.minecraftforge.", "Forge Mod Loader version"];
const viaproxy = ["net.raphimc.viaproxy.","(ViaProxy) Initializing ViaProxy"]
let platformType = "unknown";
let isProxy = false;
let isBungee = bungee.some(platformHint => data.includes(platformHint));
Expand All @@ -312,6 +313,9 @@ export async function analyze(data) {
isProxy = true;
} else if (fabric_forge.some(platformHint => data.includes(platformHint))) {
platformType = "Fabric/Forge";
}else if (viaproxy.some(platformHint => data.includes(platformHint))) {
platformType = "ViaProxy";
isProxy = true;
}

let containsVia = data.includes("com.viaversion.") || data.includes("com/viaversion/viaversion/") || data.includes("[ViaVersion]") || data.includes("[ViaBackwards]") || data.includes("[ViaRewind]");
Expand Down

0 comments on commit beb8fa3

Please sign in to comment.