your current location:首页 > news>WS MC MINECRAFT

WS MC MINECRAFT

2024-12-15 02:05:48|Myriagame |source:minecraft skins

Overview

This module adds Minecraft to add WebSocket support.

Because most CDN providers (such as Cloudflare, Huawei Cloud, etc.) have not provided naked TCP support, DDOS protection, or too expensive, the MineCraft server resisting DDOS attacks is easy to fall down.

By adding WebSocket support for the server and client, this module can be hidden behind the CDN server to effectively avoid DDOS attacks.

Operating environment

This MOD can run independently and support Forge and Fabric without other dependencies.

Will join the support of Neoforge in the future.

Server

When the MOD is installed on the server:

The server can accept the player to access through WebSocket;

In the case of no separate prohibition, players can still directly access through the original TCP;

The server monitors the WebSocket access request on the original TCP port, which is controlled by Server.Properties;

The client without installation of this MOD can still add the server of this MOD through the original TCP (note: other installed MODs may prevent the client from adding);

The server can get client-related information after shaking hands with WebSocket (such as obtaining client real IP through X-FORWARDED-For).

Client

When the MOD is installed on the client:

You can use the format of "WS: // Domain Name .com: Port/WebSocket Path" added to the server that is also installed with this MOD;

The client can still use the original "domain name.Com: port" method to add the original server.

Precautions

This mod does not add any game content;

This mod does not modify any GUI;

This MOD is compatible with other TCP-WebSocket conversion programs, such as WebSocat.

Configuration

The server's server is configured through the System Properties of Java, and the client is not configured.Parameter transmission can be used to use the jvm command line:

WSMC.Disablevanillatcp: default False.Set to TRUE to disable the original TCP login;

WSMC.WSMcendpoint: It is not set in the default. At this time, the client can use any WebSocket path to add to the server.Setting this option will allow the client to use the specified WebSocket path to add the server to the server, which is sensitive;

wsmc.debug: default False.Whether to display debugging information;

wsmc.dumpbytes: default FALSE.Whether to display each frame of WebSocket.Need "-dWSMC.DEBUG = TRUE".

API

For MOD developers, on the server, you can convert "Net.MineCraft.network.Connection" instances for compulsory types to iconnectionEx, and then call the detailed information about the webSocket handshake.

For example, X-Forwarded-FOR and CF-Ipcountry can obtain the client's real IP and regional/national code, respectively.

Minecraft images

The goal of MC Encyclopedia (MCMOD.CN) is to provide players with a better environment for MOD learning and research, and accept and cultivate more hardcore players.Provide Minecraft (Minecraft) MOD (module) item data introduction, tutorial strategy and MOD download, and is committed to improving the player's game experience.About the encyclopedia Encyclopedia help development log Donate Encyclopedia to follow the encyclopedia B station = "Fa Fa-Anagle-Right"> Opinions feedback Email © CopyRight Mc Encyclopedia 2013-2024 mcmod.cn |

Minecraft images

Minecraft images

In addition to other statements, MCMOD.CN, all open public editing content uses the BY-NC-SA 3.0 protocol.