wsmc

Quick rating

wsmc

No reviews yet

Enable Websocket support for Minecraft Java.

No Theme
No Genre
QoL & Tweaks
Server Utility
Mod Loaders
Forge
NeoForge
Fabric
Minecraft
26.2

Community voices

Reviews

Versions
Loading versions…
Match includes

Click once to include, again to exclude, again to clear

Rating Any
Any 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0
Min
Max
Play Status
Reviews
Time Played
hrs+
Verified developers only
Has developer response
List view
Grid view
Compact view
Sort by
Date
Rating
Helpful
Unhelpful
Edited
Sort ascending
Delete this review?

This removes your review from the project. You can write a new review after.

Review submitted for moderation

Your review has been sent to moderators, who will check that it meets our guidelines before it appears publicly.

No reviews yet. Be the first to review this project!

Get it on

Available Platforms

About

Project Details

Type
Mod
Latest Version
1.20.5-1.21.10-0.7.2-forge
Authors

For authors

Embed Badge

If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.

Custom banner text
ModDex rating badge preview

Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.

Identifiers

Platform IDs

CurseForge ID

Resources

External Links

Source Issues Wiki Discord

About

Description

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:

  • The server would allow players to connect via WebSocket.
  • Players can still join using vanilla TCP.
  • The server accepts and handles TCP and WebSocket connections on the same listening port.
  • Without installing this mod on the client side, a player can still join a server that has this mod using vanilla TCP.
  • The server can acquire client statistics (e.g., real IP) from the WebSocket handshake..

When this mod is installed on a client:

  • The client can join WebSocket-enabled servers using URI like ws://hostname.com:port/path_to_minecraft_endpoint.
  • The client can join any servers using vanilla TCP using the old syntax, e.g. hostname_or_ip:port.

Note

  • This mod does not affect any gameplay.
  • This mod does not modify any GUI.
  • Vanilla clients can join your server even if you install this mod, note that other mods you have may prevent vanilla clients from joining.
  • Installing this mod on your client does not prevent you from joining other vanilla or mod servers.
  • The server can still get the real IP of the players who joined via CDN-proxied WebSocket.
  • This mod is compatible with other TCP-WebSocket proxies, such as websocat.

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://[email protected]

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

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://:[email protected][:port]

Set sni, http hostname, and the server address seperately
wss://sni.com:[email protected]

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.

Screenshots

Gallery

This project has no gallery images yet.

Versions

Files

Relations

Project Relations

More like this

Similar Mods

Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.

On ModDex

Community snapshot

0
Ratings
0
Followers
0
In stacks

By the numbers

Statistics

~2,000
Downloads
Last Updated
Created
Last synced
When ModDex last fetched this project from CurseForge or Modrinth. Every project is re-checked on a schedule, and any project that ships a new file is synced automatically within hours of the release.
New file updates sync automatically
How syncing works