Home›Java›Mods›wsmc
wsmc
ModsJava

wsmc

Java mod listed for Minecraft 1.18–1.21. Downloads from the MC Java Mods app on Android.

by rikka0w0 · on CurseForge

Which build do you need?

This mod ships a separate file for every mod loader and every version of the game. Pick both, then download — the wrong build installs fine and then does nothing in the game.

Mod loader

Minecraft version

⬇ Download for 1.21.11 · Fabric⬇ Download for 1.20.5–1.21.10 · Fabric⬇ Download for 1.20.2–1.20.4 · Fabric⬇ Download for 1.20.1 · Fabric⬇ Download for 1.19.2–1.20 · Fabric⬇ Download for 1.21.11 · Forge⬇ Download for 1.20.5–1.21.10 · Forge⬇ Download for 1.20.2–1.20.4 · Forge⬇ Download for 1.20.1 · Forge⬇ Download for 1.19.2–1.20 · Forge⬇ Download for 1.21.11 · NeoForge⬇ Download for 1.20.5–1.21.10 · NeoForge⬇ Download for 1.20.3–1.20.4 · NeoForge
I don't know my version or loader
Open the Minecraft launcher and look at the profile you play on — it names both, like fabric-loader-1.21.4. The version also shows in the bottom-right corner of the game's main menu.
No loader in the profile name? Then it's plain Minecraft, and these mods won't run — you need Fabric or NeoForge installed first.

WSMC

Enable Websocket support for Minecraft Java. Since most CDN providers(at least for their free tier) do not support raw TCP proxy, with the help of this mod, the owner can now hide the server behind a CDN and let the players connect via WebSocket, thus preventing DDoS attacks.

For Minecraft 1.20.1 to 1.20.4, Forge and Fabric.

If you want to run this mod on a Minecraft version that is currently not supported, please post a GitHub issue or leave a comment here.

This mod runs standalone and does not have any dependency.

When this mod is installed on a server:

When this mod is installed on a client:

Note

Client Options

Sometimes the DNS returns a slow IP for the HTTP hostname (ws) or the SNI (wss). The client may want to control how to resolve the IP address.

The client can optionally control the HTTP hostname and the SNI used during WebSocket handshake:

Insecure WebSocket connection with http hostname specified:
ws://host.com@ip.ip.ip.ip

Specify sni and http hostname to the same value(sni-host.com), resolve server IP from ip.ip.ip.ip:
wss://sni-host.com@ip.ip.ip.ip

Set sni and http hostname differently, resolve server IP from host.com:
wss://sni.com:@host.com[:port]

Set sni and http hostname differently, resolve server IP from sni.com:
wss://:host.com@sni.com[:port]

Set sni, http hostname, and the server address seperately
wss://sni.com:host.com@ip.ip.ip.ip

Port and path specification can be appended at the same time.

Configuration

The configuration of this mod is passed in the "system properties". You can use -D in the JVM command line to pass such options.

Property Key Type Usage Side Default Example
wsmc.disableVanillaTCP boolean Disable vanilla TCP login and server status. Server false true
wsmc.wsmcEndpoint string Set the WebSocket Endpoint for Minecraft login and server status. If this property does not exist, a client can join the game via ANY WebSocket Endpoint. Must start with /, case-sensitive. Server Not set /mc
wsmc.debug boolean Show debug logs. Server Client false true
wsmc.dumpBytes boolean Dump raw WebSocket binary frames. Work only if wsmc.debug is set to true. Server Client false true
wsmc.maxFramePayloadLength string Maximum allowable frame payload length. Setting this value to your modpack's requirement else Netty will throw error "Max frame length of x has been exceeded". Server Client 65536 65536

For developers

On the server side, if a client joins via WebSocket, its handshake request can be accessed via the vanilla net.minecraft.network.Connection class. To obtain such information, cast a Connection instance into IConnectionEx, then calls IConnectionEx.getWsHandshakeRequest().

This is useful for obtaining information about the original request if the Minecraft server is behind a reverse proxy (e.g. a CDN). For example, header X-Forwarded-For and CF-IPCountry indicate the client IP address and the client country code, respectively.

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

File checked by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more