Giter VIP home page Giter VIP logo

minecraft-packetfix's Introduction

Minecraft Packet Fix

This project is a solution to the fragile nature of a Minecraft client's connection to a server. This was created in an attempt to prevent in-game DoS attacks such as chunk-banning and chat-kicking.

Features

This proxy boasts a few neat features

  • Oversized packet handling
  • Robust connections

The oversized packet handler replaces packets over 2mb in size with empty buffers. This is because the packet decompressor cannot handle packets over that size.

Robust connections is the name I've given to a better error handling system for Minecraft's network protocol. Instead of ending a connection when the client recieves a malformed or invalid packet, the client will log the packet in chat and silently ignore it.

Installation and usage

This program requires you to have Node JS installed on your system, and in your environment variables. There are plenty of tutorials on how to do this for your specific system.

Within your project directory, run npm install minecraft-protocol to install the latest version of minecraft-protocol.

After that, just clone this repository, open the run.bat file, and change the server address and version as needed. Then, run the .bat file. If it is your first time running the program, the program will kill itself and you'll need to relaunch it. From there you'll need to connect to localhost:25566 from either the direct connect tab or from your server menu within your Minecraft application. If you've followed these steps correctly, you should be forwarded on to the server you entered in the run.bat file.

Notes

Servers with anti-bot plugins will likely flag this program as a bot, and prevent you from connecting. To combat this, I will be releasing a Forge mod later this month that does the same thing as this program.

It's important not to update any of the files with the "node_modules" directory. This only works because of changes made to those core modules. If you copy the index.js file to your machine, and reinstall minecraft-protocol, this program will not work.

Bungeecord was refusing connections because the proxy used the client's preexisting Minecraft session. See the function at line 430 for more information. A username and password are now required to connect to a server from the proxy (Located in login.json.) Still working on other forms of proxy detection from servers.

Minecraft-protocol can now be installed and updated as needed, but modifications will be made to the module files. It's advised that you only use these module files with this project.

This project is built upon a similar proxy that I did not design.

Issues

  • Bungeecord servers still kick players for malformed packets due to a server-side exception. Spigot logs error, but doesn't throw an exception
  • Bungeecord servers require proxy to authenticate with Mojang to connect. Solved, but not fond of using login credentials to auth

minecraft-packetfix's People

Contributors

spryc avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.